toqito.channel_ops.choi_to_kraus

toqito.channel_ops.choi_to_kraus(choi_mat, tol=1e-09)[source]

Compute a list of Kraus operators from the Choi matrix [Rigetti20].

Note that unlike the Choi or natural representation of operators, the Kraus representation is not unique.

This function has been adapted from [Rigetti20].

Examples

Consider taking the Kraus operators of the Choi matrix that characterizes the “swap operator” defined as

\[\begin{split}\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}\end{split}\]

The corresponding Kraus operators of the swap operator are given as follows,

\[\begin{split}\begin{equation} \begin{aligned} \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & i \\ -i & 0 \end{pmatrix}, &\quad \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \\ \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, &\quad \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}. \end{aligned} \end{equation}\end{split}\]

This can be verified in toqito as follows.

>>> import numpy as np
>>> from toqito.channel_ops import choi_to_kraus
>>> choi_mat = np.array([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 1]])
>>> kraus_ops = choi_to_kraus(choi_mat)
>>> kraus_ops
[array([[ 0.+0.j        ,  0.+0.70710678j],
       [-0.-0.70710678j,  0.+0.j        ]]), array([[0.        , 0.70710678],
       [0.70710678, 0.        ]]), array([[1., 0.],
       [0., 0.]]), array([[0., 0.],
       [0., 1.]])]

See also

kraus_to_choi

References

[Rigetti20] (1,2)

Forest Benchmarking (Rigetti). https://github.com/rigetti/forest-benchmarking

Parameters:
  • choi_mat – a dim**2 by dim**2 choi matrix

  • tol – optional threshold parameter for eigenvalues/kraus ops to be discarded

Returns:

List of Kraus operators