qiskit.quantum_info.StabilizerState.expectation_value¶
- StabilizerState.expectation_value(oper, qargs=None)[ソース]¶
Compute the expectation value of a Pauli operator.
- パラメータ
oper (Pauli) – a Pauli operator to evaluate expval.
qargs (None or list) – subsystems to apply the operator on.
- 戻り値
the expectation value (only 0 or 1 or -1 or i or -i).
- 戻り値の型
complex
- 例外
QiskitError – if oper is not a Pauli operator.