toqito.channel_props.is_unital¶
Determines if a channel is unital.
Module Contents¶
- toqito.channel_props.is_unital.is_unital(phi, rtol=1e-05, atol=1e-08, dim=None)[source]¶
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), then dim can simply be the vector [m,n].
More information can be found in Chapter: Unital Channels And Majorization from [@Watrous_2018_TQI]).
Examples
Consider the channel whose Choi matrix is the swap operator. This channel is an example of a unital channel.
```python exec=”1” source=”above” from toqito.perms import swap_operator from toqito.channel_props import is_unital
choi = swap_operator(3)
Additionally, the channel whose Choi matrix is the depolarizing channel is another example of a unital channel.
```python exec=”1” source=”above” from toqito.channels import depolarizing from toqito.channel_props import is_unital
choi = depolarizing(4)
- 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 | None) – A scalar, vector or matrix containing the input and output dimensions of PHI.
- Returns:
True if the channel is unital, and False otherwise.
- Return type:
bool