qiskit-documentation/docs/api/qiskit/0.24/qiskit.quantum_info.average...

48 lines
2.0 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: average_gate_fidelity
description: API reference for qiskit.quantum_info.average_gate_fidelity
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.quantum_info.average_gate_fidelity
---
<span id="qiskit-quantum-info-average-gate-fidelity" />
# qiskit.quantum\_info.average\_gate\_fidelity
<Function id="qiskit.quantum_info.average_gate_fidelity" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/quantum_info/operators/measures.py" signature="average_gate_fidelity(channel, target=None, require_cp=True, require_tp=False)">
Return the average gate fidelity of a noisy quantum channel.
The average gate fidelity $F_{\text{ave}}$ is given by
$$
\begin{split}F_{\text{ave}}(\mathcal{E}, U)
&= \int d\psi \langle\psi|U^\dagger
\mathcal{E}(|\psi\rangle\!\langle\psi|)U|\psi\rangle \\
&= \frac{d F_{\text{pro}}(\mathcal{E}, U) + 1}{d + 1}\end{split}
$$
where $F_{\text{pro}}(\mathcal{E}, U)$ is the [`process_fidelity()`](qiskit.quantum_info.process_fidelity "qiskit.quantum_info.process_fidelity") of the input quantum *channel* $\mathcal{E}$ with a *target* unitary $U$, and $d$ is the dimension of the *channel*.
**Parameters**
* **channel** (*QuantumChannel*) noisy quantum channel.
* **target** ([*Operator*](qiskit.quantum_info.Operator "qiskit.quantum_info.Operator") *or None*) target unitary operator. If None target is the identity operator \[Default: None].
* **require\_cp** (*bool*) require channel to be completely-positive \[Default: True].
* **require\_tp** (*bool*) require channel to be trace-preserving \[Default: False].
**Returns**
The average gate fidelity $F_{\text{ave}}$.
**Return type**
float
**Raises**
* **QiskitError** if the channel and target do not have the same dimensions, or have different input and output dimensions.
* **QiskitError** if the channel and target or are not completely-positive (with `require_cp=True`) or not trace-preserving (with `require_tp=True`).
</Function>