German
Sprachen
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

MatrixExpectation

class MatrixExpectation[Quellcode]

Bases: ExpectationBase

Deprecated: An Expectation converter which converts Operator measurements to be matrix-based so they can be evaluated by matrix multiplication.

Veraltet ab Version 0.24.0: The class qiskit.opflow.expectations.matrix_expectation.MatrixExpectation is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit https://qisk.it/opflow_migration.

Methods Defined Here

compute_variance

Compute the variance of the expectation estimator.

convert

Accept an Operator and return a new Operator with the Pauli measurements replaced by Matrix based measurements.