-
Notifications
You must be signed in to change notification settings - Fork 61
/
choi.py
106 lines (84 loc) · 3.84 KB
/
choi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
"""Generates the Choi channel."""
import numpy as np
from toqito.states import max_entangled
def choi(a_var: int = 1, b_var: int = 1, c_var: int = 0) -> np.ndarray:
r"""Produce the Choi channel or one of its generalizations :cite:`Choi_1992_Generalized`.
The *Choi channel* is a positive map on 3-by-3 matrices that is capable of detecting some
entanglement that the transpose map is not.
The standard Choi channel defined with :code:`a=1`, :code:`b=1`, and :code:`c=0` is the Choi
matrix of the positive map defined in :cite:`Choi_1992_Generalized`. Many of these maps are capable of detecting
PPT entanglement.
Examples
==========
The standard Choi channel is given as
.. math::
\Phi_{1, 1, 0} =
\begin{pmatrix}
1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & -1 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
-1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & -1 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\
-1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & 1
\end{pmatrix}
We can generate the Choi channel in :code:`toqito` as follows.
>>> from toqito.channels import choi
>>> import numpy as np
>>> choi()
array([[ 1., 0., 0., 0., -1., 0., 0., 0., -1.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 1., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 1., 0., 0., 0., 0., 0.],
[-1., 0., 0., 0., 1., 0., 0., 0., -1.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 1., 0.],
[-1., 0., 0., 0., -1., 0., 0., 0., 1.]])
The reduction channel is the map :math:`R` defined by:
.. math::
R(X) = \text{Tr}(X) \mathbb{I} - X.
The matrix correspond to this is given as
.. math::
\Phi_{0, 1, 1} =
\begin{pmatrix}
0 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & -1 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
-1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -1 \\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\
-1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & 0
\end{pmatrix}
The reduction channel is the Choi channel that arises when :code:`a = 0` and when :code:`b =
c = 1`. We can obtain this matrix using :code:`toqito` as follows.
>>> from toqito.channels import choi
>>> import numpy as np
>>> choi(0, 1, 1)
array([[ 0., 0., 0., 0., -1., 0., 0., 0., -1.],
[ 0., 1., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 1., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 1., 0., 0., 0., 0., 0.],
[-1., 0., 0., 0., 0., 0., 0., 0., -1.],
[ 0., 0., 0., 0., 0., 1., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 1., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 1., 0.],
[-1., 0., 0., 0., -1., 0., 0., 0., 0.]])
See Also
==========
reduction
References
==========
.. bibliography::
:filter: docname in docnames
:param a_var: Default integer for standard Choi map.
:param b_var: Default integer for standard Choi map.
:param c_var: Default integer for standard Choi map.
:return: The Choi channel (or one of its generalizations).
"""
psi = max_entangled(3, False, False)
return np.diag([a_var + 1, c_var, b_var, b_var, a_var + 1, c_var, c_var, b_var, a_var + 1]) - psi @ psi.conj().T