qiskit.quantum_info.StabilizerState.expectation_value¶
-
StabilizerState.
expectation_value
(oper, qargs=None)[source]¶ Compute the expectation value of an operator.
- Parameters
oper (BaseOperator) – an operator to evaluate expval.
qargs (None or list) – subsystems to apply the operator on.
- Returns
the expectation value (only 0 or 1 or -1).
- Return type
complex