Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.aqua.operators.legacy.covariance

covariance(data, pauli_1, pauli_2, avg_1, avg_2)

GitHub

Compute the covariance matrix element between two Paulis, given the measurement outcome. Appropriate post-rotations on the state are assumed.

Parameters

  • data (dict) – a dictionary of the form data = {‘00000’: 10} ({str:int})
  • pauli_1 (Pauli) – a Pauli class member
  • pauli_2 (Pauli) – a Pauli class member
  • avg_1 (float) – expectation value of pauli_1 on data
  • avg_2 (float) – expectation value of pauli_2 on data

Returns

the element of the covariance matrix between two Paulis

Return type

float

Was this page helpful?
Report a bug or request content on GitHub.