Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK 의 이전 버전에서 가져온 것으로, 최신 버전에는 존재하지 않습니다. 최신 버전으로 업데이트하시기를 권장합니다. 자세한 정보는 릴리스 정보를 참조하십시오.

AerPauliExpectation

class qiskit.opflow.expectations.AerPauliExpectation

GitHub

Bases: ExpectationBase

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

Deprecated since version 0.24.0

The class qiskit.opflow.expectations.aer_pauli_expectation.AerPauliExpectation is deprecated as of qiskit-terra 0.24.0. It will be removed in the Qiskit 1.0 release. For code migration guidelines, visit https://qisk.it/opflow_migration.


Methods

compute_variance

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.

Parameters

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

Returns

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

Return type

list | float

convert

convert(operator)

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

Parameters

operator (OperatorBase) – The operator to convert. If it contains non-hermitian terms, the operator is decomposed into hermitian and anti-hermitian parts.

Returns

The converted operator.

Return type

OperatorBase

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.