channel_metrics.channel_fidelity¶
Computes the channel fidelity between two quantum channels.
Functions¶
|
Compute the channel fidelity between two quantum channels [1]. |
Module Contents¶
- channel_metrics.channel_fidelity.channel_fidelity(choi_1, choi_2, eps=1e-07)¶
Compute the channel fidelity between two quantum channels [1].
Let \(\Phi : \text{L}(\mathcal{Y}) \rightarrow \text{L}(\mathcal{X})\) and \(\Psi: \text{L}(\mathcal{Y}) \rightarrow \text{L}(\mathcal{X})\) be quantum channels. Then the root channel fidelity defined as
\[\sqrt{F}(\Phi, \Psi) := \text{inf}_{\rho} \sqrt{F}(\Phi(\rho), \Psi(\rho))\]where \(\rho \in \text{D}(\mathcal{Z} \otimes \mathcal{X})\) can be calculated by means of the following semidefinite program (Proposition 50) in [1],
\[\begin{split}\begin{align*} \text{maximize:} \quad & \lambda \\ \text{subject to:} \quad & \lambda \mathbb{I}_{\mathcal{Z}} \leq \text{Re}\left( \text{Tr}_{\mathcal{Y}} \left( Q \right) \right),\\ & \begin{pmatrix} J(\Phi) & Q^* \\ Q & J(\Psi) \end{pmatrix} \geq 0 \end{align*}\end{split}\]where \(Q \in \text{L}(\mathcal{Z} \otimes \mathcal{X})\).
Examples
For two identical channels, we should expect that the channel fidelity should yield a value of \(1\).
import numpy as np from toqito.channels import dephasing from toqito.channel_metrics import channel_fidelity # The Choi matrices of dimension-4 for the dephasing channel choi_1 = dephasing(4) choi_2 = dephasing(4) channel_fidelity(choi_1, choi_2)
np.float64(0.9999999999309465)
We can also compute the channel fidelity between two different channels. For example, we can compute the channel fidelity between the dephasing and depolarizing channels.
import numpy as np from toqito.channels import dephasing, depolarizing from toqito.channel_metrics import channel_fidelity # The Choi matrices of dimension-4 for the dephasing and depolarizing channels choi_1 = dephasing(4) choi_2 = depolarizing(4) channel_fidelity(choi_1, choi_2)
np.float64(0.5003013055043918)
References
- Raises:
ValueError – If matrices are not of equal dimension.
ValueError – If matrices are not square.
- Parameters:
choi_1 (numpy.ndarray) – The Choi matrix of the first quantum channel.
choi_2 (numpy.ndarray) – The Choi matrix of the second quantum channel.
eps (float) – The solver tolerance for convergence to feasability.
- Returns:
The channel fidelity between the channels specified by the quantum channels corresponding to the Choi matrices
choi_1
andchoi_2
.- Return type:
float