qiskit.quantum_info.process_fidelity¶
-
process_fidelity
(channel, target=None, require_cp=True, require_tp=True)[source]¶ Return the process fidelity of a noisy quantum channel.
The process fidelity \(F_{\text{pro}}(\mathcal{E}, \mathcal{F})\) between two quantum channels \(\mathcal{E}, \mathcal{F}\) is given by
\[F_{\text{pro}}(\mathcal{E}, \mathcal{F}) = F(\rho_{\mathcal{E}}, \rho_{\mathcal{F}})\]where \(F\) is the
state_fidelity()
, \(\rho_{\mathcal{E}} = \Lambda_{\mathcal{E}} / d\) is the normalizedChoi
matrix for the channel \(\mathcal{E}\), and \(d\) is the input dimension of \(\mathcal{E}\).When the target channel is unitary this is equivalent to
\[F_{\text{pro}}(\mathcal{E}, U) = \frac{Tr[S_U^\dagger S_{\mathcal{E}}]}{d^2}\]where \(S_{\mathcal{E}}, S_{U}\) are the
SuperOp
matrices for the input quantum channel \(\mathcal{E}\) and target unitary \(U\) respectively, and \(d\) is the input dimension of the channel.- Parameters
channel (Operator or QuantumChannel) – input quantum channel.
target (Operator or QuantumChannel or None) – target quantum channel. 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 process fidelity \(F_{\text{pro}}\).
- Return type
float
- Raises
QiskitError – if the channel and target do not have the same dimensions.