# qiskit.aqua.operators.expectations.AerPauliExpectation¶

class AerPauliExpectation[소스]

An Expectation converter for using Aer’s operator snapshot to take expectations of quantum state circuits over Pauli observables.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

 Initialize self. compute_variance(exp_op) Compute the variance of the expectation estimator. convert(operator) Accept an Operator and return a new Operator with the Pauli measurements replaced by AerSnapshot-based expectation circuits.
compute_variance(exp_op)[소스]

Compute the variance of the expectation estimator. Because Aer takes this expectation with matrix multiplication, the estimation is exact and the variance is always 0, but we need to return those values in a way which matches the Operator’s structure.

매개변수

exp_op (OperatorBase) – The full expectation value Operator after sampling.

반환 형식

Union[list, float]

반환값

The variances or lists thereof (if exp_op contains ListOps) of the expectation value estimation, equal to 0.

convert(operator)[소스]

Accept an Operator and return a new Operator with the Pauli measurements replaced by AerSnapshot-based expectation circuits.

매개변수

operator (OperatorBase) – The operator to convert.

반환 형식

OperatorBase

반환값

The converted operator.