Difference between revisions of "ChoiMatrix"

From QETLAB
Jump to navigation Jump to search
(Uploaded v1.01 (fixed a bug when the input or output space isn't square))
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{Function
 
{{Function
 
|name=ChoiMatrix
 
|name=ChoiMatrix
|desc=Computes the [[Choi matrix]] of a [[superoperator]]
+
|desc=Computes the Choi matrix of a superoperator
 
|rel=[[KrausOperators]]
 
|rel=[[KrausOperators]]
|upd=January 21, 2013
+
|cat=[[List of functions#Superoperators|Superoperators]]
|v=1.01}}
+
|upd=November 24, 2014}}
<tt>'''ChoiMatrix'''</tt> is a [[List of functions|function]] that computes the [[Choi matrix]] of a superoperator.
+
<tt>'''ChoiMatrix'''</tt> is a [[List of functions|function]] that computes the Choi matrix of a superoperator.
  
 
==Syntax==
 
==Syntax==
Line 12: Line 12:
  
 
==Argument descriptions==
 
==Argument descriptions==
* <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>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>SYS</tt> (optional, default 2): The subsystem that <tt>PHI</tt> is applied to when constructing the Choi matrix.
 
* <tt>SYS</tt> (optional, default 2): The subsystem that <tt>PHI</tt> is applied to when constructing the Choi matrix.
  
 
==Examples==
 
==Examples==
 
===The transpose map===
 
===The transpose map===
The Choi matrix of the [[transpose]] map is the [[swap operator]], which is verified in the 2-dimensional case by the following code:
+
The Choi matrix of the transpose map is the swap operator, which is verified in the 2-dimensional case by the following code:
<pre<noinclude></noinclude>>
+
<syntaxhighlight>
 
>> T = {[1 0;0 0],[1 0;0 0]';[0 1;0 0],[0 1;0 0]';[0 0;1 0],[0 0;1 0]';[0 0;0 1],[0 0;0 1]'};
 
>> T = {[1 0;0 0],[1 0;0 0]';[0 1;0 0],[0 1;0 0]';[0 0;1 0],[0 0;1 0]';[0 0;0 1],[0 0;0 1]'};
 
>> ChoiMatrix(T)
 
>> ChoiMatrix(T)
Line 28: Line 28:
 
     0    1    0    0
 
     0    1    0    0
 
     0    0    0    1
 
     0    0    0    1
</pre<noinclude></noinclude>>
+
</syntaxhighlight>
 +
 
 +
{{SourceCode|name=ChoiMatrix}}

Latest revision as of 02:27, 28 November 2014

ChoiMatrix
Computes the Choi matrix of a superoperator

Other toolboxes required none
Related functions KrausOperators
Function category Superoperators

ChoiMatrix is a function that computes the Choi matrix of a superoperator.

Syntax

  • C = ChoiMatrix(PHI)
  • C = ChoiMatrix(PHI,SYS)

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).
  • SYS (optional, default 2): The subsystem that PHI is applied to when constructing the Choi matrix.

Examples

The transpose map

The Choi matrix of the transpose map is the swap operator, which is verified in the 2-dimensional case by the following code:

>> T = {[1 0;0 0],[1 0;0 0]';[0 1;0 0],[0 1;0 0]';[0 0;1 0],[0 0;1 0]';[0 0;0 1],[0 0;0 1]'};
>> ChoiMatrix(T)

ans =

     1     0     0     0
     0     0     1     0
     0     1     0     0
     0     0     0     1

Source code

Click here to view this function's source code on github.