qiskit-documentation/docs/api/qiskit/0.31/qiskit.quantum_info.gate_er...

44 lines
1.8 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: gate_error (v0.31)
description: API reference for qiskit.quantum_info.gate_error in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.quantum_info.gate_error
---
<span id="qiskit-quantum-info-gate-error" />
# qiskit.quantum\_info.gate\_error
<Function id="qiskit.quantum_info.gate_error" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/quantum_info/operators/measures.py" signature="gate_error(channel, target=None, require_cp=True, require_tp=False)">
Return the gate error of a noisy quantum channel.
The gate error $E$ is given by the average gate infidelity
$$
E(\mathcal{E}, U) = 1 - F_{\text{ave}}(\mathcal{E}, U)
$$
where $F_{\text{ave}}(\mathcal{E}, U)$ is the [`average_gate_fidelity()`](qiskit.quantum_info.average_gate_fidelity "qiskit.quantum_info.average_gate_fidelity") of the input quantum *channel* $\mathcal{E}$ with a *target* unitary $U$.
**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*) check if input and target channels are completely-positive and if non-CP log warning containing negative eigenvalues of Choi-matrix \[Default: True].
* **require\_tp** (*bool*) check if input and target channels are trace-preserving and if non-TP log warning containing negative eigenvalues of partial Choi-matrix $Tr_{\mbox{out}}[\mathcal{E}] - I$ \[Default: True].
**Returns**
The average gate error $E$.
**Return type**
float
**Raises**
**QiskitError** if the channel and target do not have the same dimensions, or have different input and output dimensions.
</Function>