qiskit-documentation/docs/api/qiskit/0.26/qiskit.aqua.operators.legac...

31 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: covariance
description: API reference for qiskit.aqua.operators.legacy.covariance
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.aqua.operators.legacy.covariance
---
# qiskit.aqua.operators.legacy.covariance
<Function id="qiskit.aqua.operators.legacy.covariance" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/operators/legacy/common.py" signature="covariance(data, pauli_1, pauli_2, avg_1, avg_2)">
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*](qiskit.quantum_info.Pauli "qiskit.quantum_info.Pauli")) a Pauli class member
* **pauli\_2** ([*Pauli*](qiskit.quantum_info.Pauli "qiskit.quantum_info.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
</Function>