QuantumSeDuMi.m

QuantumSeDuMi.m is a MATLAB script that converts a “quantum semidefinite program” (i.e., the form used by [1] as well as several other quantum information theory papers) into the “standard semidefinite program form” using the procedure described in Appendix I of [1]. The standard form semidefinite program is then fed into the SeDuMi solver and the optimal value of the semidefinite program is computed. The script can be easily modified to use another semidefinite program solver if desired.

Note that you must install SeDuMi (or another semidefinite program solver) before you can use this script. This script just converts the problem into a form that standard SDP solvers can read – it does not actually solve the SDP itself.

Download and Install

In order to solve quantum semidefinite programs using QuantumSeDuMi, you must download and install two things: the QuantumSeDuMi.m script itself, and the SeDuMi SDP solver.

  1. SeDuMi — Please follow the instructions on the SeDuMi website to download and install it. If possible, you should install SeDuMi 1.1R3, not SeDuMi 1.21 or SeDuMi 1.3, since there is a bug with the newer versions when dealing with complex matrices.
  2. QuantumSeDuMi.m — Once SeDuMi is installed, download the QuantumSeDuMi.m MATLAB script and place it in your MATLAB scripts directory. The help file and examples below explain its usage.

MATLAB Help File

QUANTUMSEDUMI     Quantum SDP front-end for SeDuMi
   requires: SeDuMi (http://sedumi.ie.lehigh.edu/)
   author: Nathaniel Johnston
   license: GPL2

   [PRIM,DUAL,Y] = QUANTUMSEDUMI(A,B,PHIA,PHIB) returns the primal and
   dual optimal values, as well as the dual optimal operator Y of the
   "quantum" semidefinite program associated with the primal operator A,
   the dual operator B, and the Hermicity-preserving map defined by the
   left and right Choi-Kraus operators given by the arrays PHIA and PHIB,
   respectively.

   An optional fifth argument, PARS, may be supplied to QUANTUMSEDUMI,
   which performs the same functions as the PARS argument for SeDuMi
   itself. See the SeDuMi documentation to learn more.

   See [1] and its appendix for a description of this "quantum"
   semidefinite program form and how its conversion to the standard
   semidefinite program form takes place.

   You must have SeDuMi installed for this script to function. Use SeDuMi
   1.1 if at all possible, since there is a bug in SeDuMi 1.21 and 1.3
   when dealing with complex matrices that makes it fail sometimes.

   [1] N. Johnston and D. W. Kribs. A family of norms with applications in
   quantum information theory II. Quantum Inf. Comput., 11:104-123, 2011.

Usage Examples

Consider the following simple quantum semidefinite program:

Example SDP

The following code solves this semidefinite program using QuantumSeDuMi.m. The lines involving PhiA and PhiB are used to define a generalized Choi-Kraus representation of Φ.

>> A = [1 1;1 1];
>> B = [2 i;-i 2];
>> PhiA(:,:,1) = [0 1;0 0];
>> PhiA(:,:,2) = [0 0;1 0];
>> PhiA(:,:,3) = [1 0;0 0];
>> PhiB(:,:,1) = [0 0;1 0];
>> PhiB(:,:,2) = [0 -1;0 0];
>> PhiB(:,:,3) = [1 0;0 0];
>> QuantumSeDuMi(A,B,PhiA,PhiB)
QuantumSeDuMi front-end by Nathaniel Johnston, 2009.
SeDuMi 1.1R3 by AdvOL, 2006 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 8, order n = 5, dim = 33, blocks = 2
nnz(A) = 9 + 0, nnz(ADA) = 36, nnz(L) = 23
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            1.08E+001 0.000
  1 :  3.69E+000 6.68E-001 0.000 0.0619 0.9900 0.9900   0.68  1  1  4.6E-001
  2 :  3.30E+000 6.44E-003 0.000 0.0096 0.9990 0.9990   1.24  1  1  4.4E-003
  3 :  3.30E+000 1.89E-003 0.082 0.2934 0.9000 0.9000   1.00  1  1  1.3E-003
  4 :  3.31E+000 4.61E-004 0.000 0.2439 0.9000 0.9000   1.00  1  1  2.9E-004
  5 :  3.31E+000 4.53E-005 0.245 0.0983 0.9900 0.9900   1.00  1  1  2.8E-005
  6 :  3.31E+000 7.46E-007 0.000 0.0165 0.9900 0.6374   1.00  1  1  3.5E-006
  7 :  3.31E+000 2.05E-008 0.007 0.0275 0.9900 0.9902   1.00  1  1  6.7E-008
  8 :  3.31E+000 9.93E-010 0.000 0.0483 0.9904 0.9900   1.00  2  2  2.8E-009

iter seconds digits       c*x               b*y
  8      0.3   Inf  3.3051490600e+000  3.3051490619e+000
|Ax-b| =  2.0e-010, [Ay-c]_+ =  3.3E-009, |x|= 3.1e+000, |y|= 2.5e+000

Detailed timing (sec)
   Pre          IPM          Post
1.560E-002    3.432E-001    1.560E-002
Max-norms: ||b||=1, ||c|| = 2,
Cholesky |add|=0, |skip| = 4, ||L.L|| = 8.60736.

ans =

    3.3051

As you can see, the optimal value of the semidefinite program is 3.3051. The extra output above is information given by SeDuMi that shows how many iterations it took to solve the SDP to the default accuracy threshold, and what algorithm was used. If you wish to suppress the “noisy” SeDuMi output and learn more about the solution to the SDP, change the QuantumSeDuMi call as shown below. In particular, the output below shows that the primal and dual optimal values are equal, and Y is a matrix that attains the optimal value in the dual problem.

>> pars.fid = 0;
>> [prim,dual,Y] = QuantumSeDuMi(A,B,PhiA,PhiB,pars)

prim =

    3.3051

dual =

    3.3051

Y =

   2.1317             0.0000 - 0.7272i
   0.0000 + 0.7272i   0.2480

References

  1. N. Johnston and D. W. Kribs. A Family of Norms With Applications in Quantum Information Theory II. Quantum Inf. Comput., 11:104-123, 2011.
  1. No comments yet.
  1. No trackbacks yet.