channel_props.is_unital¶
Determines if a channel is unital.
Functions¶
|
Determine whether the given channel is unital. |
Module Contents¶
- channel_props.is_unital.is_unital(phi, rtol=1e-05, atol=1e-08, dim=None)¶
Determine whether the given channel is unital.
A map \(\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)\) is unital if it holds that:
\[\Phi(\mathbb{I}_{\mathcal{X}}) = \mathbb{I}_{\mathcal{Y}}.\]If the input channel maps \(M_{r,c}\) to \(M_{x,y}\) then
dim
should be the list[[r,x], [c,y]]
. If it maps \(M_m\) to \(M_n\), thendim
can simply be the vector[m,n]
.More information can be found in Chapter: Unital Channels And Majorization from [1]).
Examples
Consider the channel whose Choi matrix is the swap operator. This channel is an example of a unital channel.
from toqito.perms import swap_operator from toqito.channel_props import is_unital choi = swap_operator(3) is_unital(choi)
True
Additionally, the channel whose Choi matrix is the depolarizing channel is another example of a unital channel.
from toqito.channels import depolarizing from toqito.channel_props import is_unital choi = depolarizing(4) is_unital(choi)
True
References
- Parameters:
phi (numpy.ndarray | list[list[numpy.ndarray]]) – The channel provided as either a Choi matrix or a list of Kraus operators.
rtol (float) – The relative tolerance parameter (default 1e-05).
atol (float) – The absolute tolerance parameter (default 1e-08).
dim (int | list[int] | numpy.ndarray) – A scalar, vector or matrix containing the input and output dimensions of PHI.
- Returns:
True
if the channel is unital, andFalse
otherwise.- Return type:
bool