qiskit.quantum_info.DensityMatrix.expectation_value¶
- DensityMatrix.expectation_value(oper, qargs=None)[Quellcode]¶
Compute the expectation value of an operator.
- Parameter
oper (Operator) – an operator to evaluate expval.
qargs (None or list) – subsystems to apply the operator on.
- Rückgabe
the expectation value.
- Rückgabetyp
complex