qiskit.opflow.expectations.CVaRExpectation.compute_variance¶
- CVaRExpectation.compute_variance(exp_op)[Quellcode]¶
Returns the variance of the CVaR calculation
- Parameter
exp_op (OperatorBase) – The operator whose evaluation yields an expectation of some StateFn against a diagonal observable.
- Rückgabe
- The variance of the CVaR estimate corresponding to the converted
exp_op.
- Verursacht
ValueError – If the exp_op does not correspond to an expectation value.
- Rückgabetyp
Union[list, float]