toqito.channel_metrics.channel_distinguishability¶
Computes the maximum probability of distinguishing two quantum channels.
Module Contents¶
- toqito.channel_metrics.channel_distinguishability.channel_distinguishability(phi, psi, p, dim=None, strategy='bayesian', solver='cvxopt', primal_dual='dual', **kwargs)[source]¶
Compute the optimal probability of distinguishing two quantum channels.
Bayesian and minimax discrimination of two quantum channels are implemented.
For Bayesian discrimination, channels to be distinguished should have a given a priori probability distribution. The task of discriminating channels can be connected to the completely bounded trace norm (Section 3.3.3 of [@Watrous_2018_TQI]). The problem is finding POVMs for which error probability of discrimination of output states is minimized after input state is acted on by the two quantum channels. In the language of statistical decision theory, the problem is equivalent to minimizing quantum Bayes’ risk.
In the minimax problem, there are no a priori probabilities. Minimax discrimination of two channels consists of finding the optimal input state so that the two possible output states are discriminated with minimum risk. ([@d2005minimax]).
QETLAB’s functionality inspired the Bayesian option [@QETLAB_link] and the minimax option is adapted from QuTIpy [@QuTIpy_link].
Examples
Optimal probability of distinguishing two amplitude damping channels in the Bayesian setting:
```python exec=”1” source=”above” from toqito.channels import amplitude_damping from toqito.channel_ops import kraus_to_choi from toqito.channel_metrics import channel_distinguishability # Define two amplitude damping channels with gamma=0.25 and gamma=0.5 choi_ch_1 = kraus_to_choi(amplitude_damping(gamma=0.25)) choi_ch_2 = kraus_to_choi(amplitude_damping(gamma=0.5))
p = [0.5, 0.5]
print(channel_distinguishability(choi_ch_1, choi_ch_2, p)) ```
Optimal probability of distinguishing two amplitude damping channels in the minimax setting:
```python exec=”1” source=”above” from toqito.channels import amplitude_damping from toqito.channel_ops import kraus_to_choi from toqito.channel_metrics import channel_distinguishability # Define two amplitude damping channels with gamma=0.25 and gamma=0.5 choi_ch_1 = kraus_to_choi(amplitude_damping(gamma=0.25)) choi_ch_2 = kraus_to_choi(amplitude_damping(gamma=0.5))
print(channel_distinguishability(choi_ch_1, choi_ch_2, None, [2, 2], strategy=”minimax”,primal_dual=”primal”)) ```
- Raises:
ValueError – If prior probabilities not provided at all for Bayesian strategy.
ValueError – If strategy is neither Bayesian nor minimax.
ValueError – If channels have different input or output dimensions.
ValueError – If prior probabilities do not add up to 1.
ValueError – If number of prior probabilities not equal to 2.
- Parameters:
phi (numpy.ndarray | list[numpy.ndarray] | list[list[numpy.ndarray]]) – A superoperator. It should be provided either as a Choi matrix, or as a (1d or 2d) list of numpy arrays whose entries are its Kraus operators.
psi (numpy.ndarray | list[numpy.ndarray] | list[list[numpy.ndarray]]) – A superoperator. It should be provided either as a Choi matrix, or as a (1d or 2d) list of numpy arrays whose entries are its Kraus operators.
p (list[float] | None) – Prior probabilities of the two channels.
dim (int | list[int] | numpy.ndarray | None) – Input and output dimensions of the channels.
strategy (str) – Whether to perform Bayesian or minimax discrimination task. Possible values are “Bayesian” and “minimax”. Default option is strategy=”Bayesian”.
solver (str) – Optimization option for picos solver. Default option is solver=”cvxopt”.
primal_dual (str) – Option for the optimization problem. Default option is solver=”cvxopt”.
kwargs – Additional arguments to pass to picos’ solve method.
- Returns:
The optimal probability of discriminating two quantum channels.
- Return type:
float | numpy.floating