33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
---
|
||
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
|
||
---
|
||
|
||
<span id="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.8/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>
|
||
|