Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version


average_gate_fidelity(channel, target=None, require_cp=True, require_tp=False)

GitHub(opens in a new tab)

Return the average gate fidelity of a noisy quantum channel.

The average gate fidelity FaveF_{\text{ave}} is given by

Fave(E,U)=dψψUE(ψ ⁣ψ)Uψ=dFpro(E,U)+1d+1\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 Fpro(E,U)F_{\text{pro}}(\mathcal{E}, U) is the process_fidelity() of the input quantum channel E\mathcal{E} with a target unitary UU, and dd is the dimension of the channel.


  • channel (QuantumChannel or Operator) – noisy quantum channel.
  • target (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 Trout[E]ITr_{\text{out}}[\mathcal{E}] - I [Default: True].


The average gate fidelity FaveF_{\text{ave}}.

Return type



QiskitError – if the channel and target do not have the same dimensions, or have different input and output dimensions.

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