qiskit.opflow.expectations.ExpectationBase.compute_variance¶
-
abstract
ExpectationBase.
compute_variance
(exp_op)[source]¶ Compute the variance of the expectation estimator.
- Parameters
exp_op (
OperatorBase
) – The full expectation value Operator after sampling.- Return type
Union
[list
,complex
,ndarray
]- Returns
The variances or lists thereof (if exp_op contains ListOps) of the expectation value estimation.