TraceNorm: Difference between revisions

From QETLAB
Jump to navigation Jump to search
Created page with "{{Function |name=TraceNorm |desc=Computes the trace norm of an operator |req=kpNorm |rel=KyFanNorm<br />SchattenNorm |upd=December 1, 2012 |v=1.00}} <tt>'''Tra..."
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Function
{{Function
|name=TraceNorm
|name=TraceNorm
|desc=Computes the [[trace norm]] of an operator
|desc=Computes the trace norm of an operator
|req=[[kpNorm]]
|rel=[[kpNorm]]<br />[[KyFanNorm]]<br />[[SchattenNorm]]
|rel=[[KyFanNorm]]<br />[[SchattenNorm]]
|cat=[[List of functions#Norms|Norms]]
|upd=December 1, 2012
|upd=October 22, 2014
|v=1.00}}
|cvx=yes (convex)}}
<tt>'''TraceNorm'''</tt> is a [[List of functions|function]] that computes the [[trace norm]] of an operator (i.e., the sum of its singular values). It works with both full and sparse matrices.
<tt>'''TraceNorm'''</tt> is a [[List of functions|function]] that computes the trace norm of an operator (i.e., the sum of its singular values). It works with both full and sparse matrices.


==Syntax==
==Syntax==
Line 17: Line 17:
===Trace norm of a density matrix===
===Trace norm of a density matrix===
Density matrices all have trace norm equal to 1:
Density matrices all have trace norm equal to 1:
<pre<noinclude></noinclude>>
<syntaxhighlight>
>> rho = [[RandomDensityMatrix|RandomDensityMatrix(100)]];
>> rho = RandomDensityMatrix(100);
>> TraceNorm(rho)
>> TraceNorm(rho)


Line 24: Line 24:


     1.0000
     1.0000
</pre<noinclude></noinclude>>
</syntaxhighlight>
 
===Can be used with CVX===
This function can be used in the objective function or constraints of a CVX optimization problem. For example, the following code computes the minimum value of $\mathrm{Tr}(S\rho)$ over all density matrices $\rho$ with the property that the trace norm of their [[realignment]] is no larger than 1 (this set of state approximates the set of separable states), where $S$ is the [[SwapOperator|swap operator]]:
<syntaxhighlight>
>> cvx_begin sdp quiet
  variable rho(9,9) hermitian;
  minimize trace(rho*SwapOperator(3));
  subject to
      trace(rho) == 1;
      rho >= 0;
      TraceNorm(Realignment(rho)) <= 1;
  cvx_end
  cvx_optval
 
cvx_optval =
 
  -0.3333
</syntaxhighlight>
 
{{SourceCode|name=TraceNorm}}

Latest revision as of 16:36, 24 December 2014

TraceNorm
Computes the trace norm of an operator

Other toolboxes required none
Related functions kpNorm
KyFanNorm
SchattenNorm
Function category Norms
Usable within CVX? yes (convex)

TraceNorm is a function that computes the trace norm of an operator (i.e., the sum of its singular values). It works with both full and sparse matrices.

Syntax

  • NRM = TraceNorm(X)

Argument descriptions

  • X: An operator to have its trace norm computed.

Examples

Trace norm of a density matrix

Density matrices all have trace norm equal to 1:

>> rho = RandomDensityMatrix(100);
>> TraceNorm(rho)

ans =

    1.0000

Can be used with CVX

This function can be used in the objective function or constraints of a CVX optimization problem. For example, the following code computes the minimum value of $\mathrm{Tr}(S\rho)$ over all density matrices $\rho$ with the property that the trace norm of their realignment is no larger than 1 (this set of state approximates the set of separable states), where $S$ is the swap operator:

>> cvx_begin sdp quiet
   variable rho(9,9) hermitian;
   minimize trace(rho*SwapOperator(3));
   subject to
       trace(rho) == 1;
       rho >= 0;
       TraceNorm(Realignment(rho)) <= 1;
   cvx_end
   cvx_optval

cvx_optval =

   -0.3333

Source code

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