IsCP: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{Function |name=IsCP |desc=Determines whether or not a superoperator is completely positive |req=ApplyMap<br />ChoiMatrix<br />iden<br />IsPSD<br />[[..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
|name=IsCP | |name=IsCP | ||
|desc=Determines whether or not a [[superoperator]] is [[completely positive]] | |desc=Determines whether or not a [[superoperator]] is [[completely positive]] | ||
| | |rel=[[IsHermPreserving]] | ||
|upd=January | |cat=[[List of functions#Superoperators|Superoperators]] | ||
|v= | |upd=January 4, 2013 | ||
<tt>'''IsCP'''</tt> is a [[List of functions|function]] that determines whether or not a given superoperator is [[completely positive]]. | |v=0.50}} | ||
<tt>'''IsCP'''</tt> is a [[List of functions|function]] that determines whether or not a given [[superoperator]] is [[completely positive]]. | |||
==Syntax== | ==Syntax== | ||
| Line 16: | Line 17: | ||
==Examples== | ==Examples== | ||
The following code verifies that the map $\Phi$ defined by $\Phi(X) = X - UXU^*$ is not completely positive, where $U = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}$. | |||
<syntaxhighlight> | |||
>> U = [1 1;-1 1]/sqrt(2); | |||
>> Phi = {eye(2),eye(2); U,-U}; | |||
>> IsCP(Phi) | |||
ans = | |||
0 | |||
</syntaxhighlight> | |||
{{SourceCode|name=IsCP}} | |||
Latest revision as of 15:28, 29 September 2014
| IsCP | |
| Determines whether or not a superoperator is completely positive | |
| Other toolboxes required | none |
|---|---|
| Related functions | IsHermPreserving |
| Function category | Superoperators |
IsCP is a function that determines whether or not a given superoperator is completely positive.
Syntax
- CP = IsCP(PHI)
- CP = IsCP(PHI,TOL)
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).
- TOL (optional, default eps^(3/4)): The numerical tolerance used when determining complete positivity.
Examples
The following code verifies that the map $\Phi$ defined by $\Phi(X) = X - UXU^*$ is not completely positive, where $U = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}$.
>> U = [1 1;-1 1]/sqrt(2);
>> Phi = {eye(2),eye(2); U,-U};
>> IsCP(Phi)
ans =
0Source code
Click here to view this function's source code on github.