channel_props.is_unital

Determines if a channel is unital.

Functions

is_unital(phi[, rtol, atol, dim])

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\), then dim 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

[1]

John Watrous. The Theory of Quantum Information. Cambridge University Press, 2018. URL: https://johnwatrous.com/wp-content/uploads/TQI.pdf, doi:10.1017/9781316848142.

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, and False otherwise.

Return type:

bool