channel_ops.choi_to_kraus¶
Computes a list of Kraus operators from the Choi matrix.
Functions¶
|
Compute a list of Kraus operators from the Choi matrix from [1]. |
Module Contents¶
- channel_ops.choi_to_kraus.choi_to_kraus(choi_mat, tol=1e-09, dim=None)¶
Compute a list of Kraus operators from the Choi matrix from [1].
Note that unlike the Choi or natural representation of operators, the Kraus representation is not unique.
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]
.For completely positive maps the output is a single flat list of numpy arrays since the left and right Kraus maps are the same.
This function has been adapted from [1] and QETLAB [1].
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} \big[ \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}, \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \big], \big[ \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \big], \big[ \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} \big], \big[ \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} \big] \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.70710678], [-0.70710678, 0. ]]), array([[-0. , -0.70710678], [ 0.70710678, -0. ]])], [array([[0. , 0.70710678], [0.70710678, 0. ]]), array([[0. , 0.70710678], [0.70710678, 0. ]])], [array([[1., 0.], [0., 0.]]), array([[1., 0.], [0., 0.]])], [array([[0., 0.], [0., 1.]]), array([[0., 0.], [0., 1.]])]]
See also
kraus_to_choi
References
[1]Nathaniel Johnston. QETLAB: A MATLAB toolbox for quantum entanglement. URL: https://github.com/nathanieljohnston/QETLAB, doi:10.5281/zenodo.44637.
- Parameters:
choi_mat (numpy.ndarray) – A Choi matrix
tol (float) – optional threshold parameter for eigenvalues/kraus ops to be discarded
dim (int | list[int] | numpy.ndarray) – A scalar, vector or matrix containing the input and output dimensions of Choi matrix.
- Returns:
List of Kraus operators
- Return type:
list[numpy.ndarray] | list[list[numpy.ndarray]]