Difference between revisions of "ComplementaryMap"
(Created page with "{{Function |name=ComplementaryMap |desc=Computes the complementary map of a superoperator |rel=DualMap |upd=January 22, 2013 |v=1.00}} <tt>'''ComplementaryMap'''</tt> ...") |
m |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Function | {{Function | ||
|name=ComplementaryMap | |name=ComplementaryMap | ||
| − | |desc=Computes the | + | |desc=Computes the complementary map of a superoperator |
|rel=[[DualMap]] | |rel=[[DualMap]] | ||
| − | | | + | |cat=[[List of functions#Superoperators|Superoperators]] |
| − | | | + | |upd=November 24, 2014}} |
| − | <tt>'''ComplementaryMap'''</tt> is a [[List of functions|function]] that computes the | + | <tt>'''ComplementaryMap'''</tt> is a [[List of functions|function]] that computes the complementary map of a superoperator (in the sense that the output of this function describes the information leaked by the original superoperator to the environment). |
==Syntax== | ==Syntax== | ||
| Line 12: | Line 12: | ||
==Argument descriptions== | ==Argument descriptions== | ||
| − | * <tt>PHI</tt>: A superoperator. Should be provided as either a | + | * <tt>PHI</tt>: A superoperator. Should be provided as either a Choi matrix, or as a cell with either 1 or 2 columns (see the [[tutorial]] page for more details about specifying superoperators within QETLAB). <tt>PHIC</tt> will be a cell of Kraus operators if <tt>PHI</tt> is a cell of Kraus operators, and similarly <tt>PHIC</tt> will be a Choi matrix if <tt>PHI</tt> is a Choi matrix. |
* <tt>DIM</tt> (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of <tt>PHI</tt>, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix <tt>PHI</tt>, in that order). If the input or output space is not square, then <tt>DIM</tt>'s first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. <tt>DIM</tt> is required if and only if <tt>PHI</tt> has unequal input and output dimensions and is provided as a Choi matrix. | * <tt>DIM</tt> (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of <tt>PHI</tt>, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix <tt>PHI</tt>, in that order). If the input or output space is not square, then <tt>DIM</tt>'s first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. <tt>DIM</tt> is required if and only if <tt>PHI</tt> has unequal input and output dimensions and is provided as a Choi matrix. | ||
==Examples== | ==Examples== | ||
===Non-uniqueness=== | ===Non-uniqueness=== | ||
| − | Complementary maps are not unique, and hence different maps <tt>PHIC</tt> may be returned depending on the particular representation of the input map <tt>PHI</tt>. The particular complementary map that is returned by this function is the one that is obtained by placing all of the first rows of Kraus operators of <tt>PHI</tt> into the first Kraus operator of <tt>PHIC</tt>, all of the second rows of Kraus operators of <tt>PHI</tt> into the second Kraus operator of <tt>PHIC</tt>, and so on. The following code defines two families of Kraus operators <tt>Phi</tt> and <tt>Phi2</tt>, verifies that they represent the same map by showing that their | + | Complementary maps are not unique, and hence different maps <tt>PHIC</tt> may be returned depending on the particular representation of the input map <tt>PHI</tt>. The particular complementary map that is returned by this function is the one that is obtained by placing all of the first rows of Kraus operators of <tt>PHI</tt> into the first Kraus operator of <tt>PHIC</tt>, all of the second rows of Kraus operators of <tt>PHI</tt> into the second Kraus operator of <tt>PHIC</tt>, and so on. The following code defines two families of Kraus operators <tt>Phi</tt> and <tt>Phi2</tt>, verifies that they represent the same map by showing that their Choi matrices are the same, and then shows that nonetheless the different Kraus representations lead to different complementary maps. |
| − | < | + | <syntaxhighlight> |
>> Phi = {[1 0;0 0] ; [0 1;0 0] ; [0 0;1 0] ; [0 0;0 1]}; | >> Phi = {[1 0;0 0] ; [0 1;0 0] ; [0 0;1 0] ; [0 0;0 1]}; | ||
>> Phi2 = {[1 0;0 1]/sqrt(2) ; [0 1;1 0]/sqrt(2) ; [0 -1i;1i 0]/sqrt(2) ; [1 0;0 -1]/sqrt(2)}; | >> Phi2 = {[1 0;0 1]/sqrt(2) ; [0 1;1 0]/sqrt(2) ; [0 -1i;1i 0]/sqrt(2) ; [1 0;0 -1]/sqrt(2)}; | ||
| − | >> | + | >> ChoiMatrix(Phi) |
ans = | ans = | ||
| Line 30: | Line 30: | ||
0 0 0 1 | 0 0 0 1 | ||
| − | >> | + | >> ChoiMatrix(Phi2) |
ans = | ans = | ||
| Line 75: | Line 75: | ||
0 + 0.7071i 0 | 0 + 0.7071i 0 | ||
0 -0.7071 | 0 -0.7071 | ||
| − | </ | + | </syntaxhighlight> |
| + | |||
| + | {{SourceCode|name=ComplementaryMap}} | ||
Latest revision as of 02:27, 28 November 2014
| ComplementaryMap | |
| Computes the complementary map of a superoperator | |
| Other toolboxes required | none |
|---|---|
| Related functions | DualMap |
| Function category | Superoperators |
ComplementaryMap is a function that computes the complementary map of a superoperator (in the sense that the output of this function describes the information leaked by the original superoperator to the environment).
Syntax
- PHIC = ComplementaryMap(PHI)
- PHIC = ComplementaryMap(PHI,DIM)
Argument descriptions
- PHI: A superoperator. Should be provided as either a Choi matrix, or as a cell with either 1 or 2 columns (see the tutorial page for more details about specifying superoperators within QETLAB). PHIC will be a cell of Kraus operators if PHI is a cell of Kraus operators, and similarly PHIC will be a Choi matrix if PHI is a Choi matrix.
- DIM (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of PHI, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix PHI, in that order). If the input or output space is not square, then DIM's first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. DIM is required if and only if PHI has unequal input and output dimensions and is provided as a Choi matrix.
Examples
Non-uniqueness
Complementary maps are not unique, and hence different maps PHIC may be returned depending on the particular representation of the input map PHI. The particular complementary map that is returned by this function is the one that is obtained by placing all of the first rows of Kraus operators of PHI into the first Kraus operator of PHIC, all of the second rows of Kraus operators of PHI into the second Kraus operator of PHIC, and so on. The following code defines two families of Kraus operators Phi and Phi2, verifies that they represent the same map by showing that their Choi matrices are the same, and then shows that nonetheless the different Kraus representations lead to different complementary maps.
>> Phi = {[1 0;0 0] ; [0 1;0 0] ; [0 0;1 0] ; [0 0;0 1]};
>> Phi2 = {[1 0;0 1]/sqrt(2) ; [0 1;1 0]/sqrt(2) ; [0 -1i;1i 0]/sqrt(2) ; [1 0;0 -1]/sqrt(2)};
>> ChoiMatrix(Phi)
ans =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
>> ChoiMatrix(Phi2)
ans =
1.0000 0 0 0
0 1.0000 0 0
0 0 1.0000 0
0 0 0 1.0000
>> celldisp(ComplementaryMap(Phi))
ans{1} =
1 0
0 1
0 0
0 0
ans{2} =
0 0
0 0
1 0
0 1
>> celldisp(ComplementaryMap(Phi2))
ans{1} =
0.7071 0
0 0.7071
0 0 - 0.7071i
0.7071 0
ans{2} =
0 0.7071
0.7071 0
0 + 0.7071i 0
0 -0.7071Source code
Click here to view this function's source code on github.