qiskit.result.sampled_expectation_value¶
- sampled_expectation_value(dist, oper)[소스]¶
Computes expectation value from a sampled distribution
Note that passing a raw dict requires bit-string keys.
- 매개변수
dist (Counts or QuasiDistribution or ProbDistribution or dict) – Input sampled distribution
oper (str or Pauli or PauliOp or PauliSumOp or SparsePauliOp) – The operator for the observable
- 반환
The expectation value
- 반환 형식
float
- 예외 발생
QiskitError – if the input distribution or operator is an invalid type