Difference between revisions of "IsHermPreserving"

From QETLAB
Jump to navigation Jump to search
(Fixed example)
 
Line 3: Line 3:
 
|desc=Determines whether or not a [[superoperator]] is [[Hermiticity preserving]]
 
|desc=Determines whether or not a [[superoperator]] is [[Hermiticity preserving]]
 
|rel=[[IsCP]]
 
|rel=[[IsCP]]
 +
|cat=[[List of functions#Superoperators|Superoperators]]
 
|upd=January 4, 2013
 
|upd=January 4, 2013
|v=1.00}}
+
|v=0.50}}
 
<tt>'''IsHermPreserving'''</tt> is a [[List of functions|function]] that determines whether or not a given [[superoperator]] is [[Hermiticity preserving]].
 
<tt>'''IsHermPreserving'''</tt> is a [[List of functions|function]] that determines whether or not a given [[superoperator]] is [[Hermiticity preserving]].
  
Line 17: Line 18:
 
==Examples==
 
==Examples==
 
The following code verifies that the map $\Phi$ defined by $\Phi(X) = X - UXU^*$ is Hermiticity preserving, where $U = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}$.
 
The following code verifies that the map $\Phi$ defined by $\Phi(X) = X - UXU^*$ is Hermiticity preserving, where $U = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}$.
<pre>
+
<syntaxhighlight>
 
>> U = [1 1;-1 1]/sqrt(2);
 
>> U = [1 1;-1 1]/sqrt(2);
 
>> Phi = {eye(2),eye(2); U,-U};
 
>> Phi = {eye(2),eye(2); U,-U};
Line 25: Line 26:
  
 
     1
 
     1
</pre>
+
</syntaxhighlight>
 +
 
 +
{{SourceCode|name=IsHermPreserving}}

Latest revision as of 15:30, 29 September 2014

IsHermPreserving
Determines whether or not a superoperator is Hermiticity preserving

Other toolboxes required none
Related functions IsCP
Function category Superoperators

IsHermPreserving is a function that determines whether or not a given superoperator is Hermiticity preserving.

Syntax

  • HP = IsHermPreserving(PHI)
  • HP = IsHermPreserving(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.

Examples

The following code verifies that the map $\Phi$ defined by $\Phi(X) = X - UXU^*$ is Hermiticity preserving, 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};
>> IsHermPreserving(Phi)

ans =

     1

Source code

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