ComplementaryMap

From QETLAB
Jump to: navigation, search
ComplementaryMap
Computes the complementary map of a superoperator

Other toolboxes required none
Related functions DualMap
Function category Superoperators

ComplementaryMap is a function that computes the complementary map of a superoperator (in the sense that the output of this function describes the information leaked by the original superoperator to the environment).

Syntax

  • PHIC = ComplementaryMap(PHI)
  • PHIC = ComplementaryMap(PHI,DIM)

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). PHIC will be a cell of Kraus operators if PHI is a cell of Kraus operators, and similarly PHIC will be a Choi matrix if PHI is a Choi matrix.
  • DIM (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of PHI, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix PHI, in that order). If the input or output space is not square, then DIM's first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. DIM is required if and only if PHI has unequal input and output dimensions and is provided as a Choi matrix.

Examples

Non-uniqueness

Complementary maps are not unique, and hence different maps PHIC may be returned depending on the particular representation of the input map PHI. The particular complementary map that is returned by this function is the one that is obtained by placing all of the first rows of Kraus operators of PHI into the first Kraus operator of PHIC, all of the second rows of Kraus operators of PHI into the second Kraus operator of PHIC, and so on. The following code defines two families of Kraus operators Phi and Phi2, verifies that they represent the same map by showing that their Choi matrices are the same, and then shows that nonetheless the different Kraus representations lead to different complementary maps.

>> Phi = {[1 0;0 0] ; [0 1;0 0] ; [0 0;1 0] ; [0 0;0 1]};
>> Phi2 = {[1 0;0 1]/sqrt(2) ; [0 1;1 0]/sqrt(2) ; [0 -1i;1i 0]/sqrt(2) ; [1 0;0 -1]/sqrt(2)};
>> ChoiMatrix(Phi)
 
ans =
 
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
 
>> ChoiMatrix(Phi2)
 
ans =
 
    1.0000         0         0         0
         0    1.0000         0         0
         0         0    1.0000         0
         0         0         0    1.0000
 
>> celldisp(ComplementaryMap(Phi))
 
ans{1} =
 
     1     0
     0     1
     0     0
     0     0
 
 
 
ans{2} =
 
     0     0
     0     0
     1     0
     0     1
 
 
>> celldisp(ComplementaryMap(Phi2))
 
ans{1} =
 
   0.7071                  0          
        0             0.7071          
        0                  0 - 0.7071i
   0.7071                  0          
 
 
 
ans{2} =
 
        0             0.7071          
   0.7071                  0          
        0 + 0.7071i        0          
        0            -0.7071

Source code

Click on "expand" to the right to view the MATLAB source code for this function.

  1. %%  COMPLEMENTARYMAP    Computes the complementary map of a superoperator
  2. %   This function has one required argument:
  3. %     PHI: a superoperator
  4. %
  5. %   PHIC = ComplementaryMap(PHI) is the complementary map of PHI (in the
  6. %   sense that it describes the information sent by PHI to the
  7. %   environment).
  8. %
  9. %   This function has one optional input argument:
  10. %     DIM (default has input and output of equal dimension)
  11. %
  12. %   PHID = ComplementaryMap(PHI,DIM) is the same as above, where DIM is a
  13. %   1-by-2 vector containing the input and output dimensions of PHI, in
  14. %   that order (equivalently, these are the dimensions of the first and
  15. %   second subsystems of the Choi matrix PHI, in that order). If the input
  16. %   or output space is not square, then DIM's first row should contain the
  17. %   input and output row dimensions, and its second row should contain its
  18. %   input and output column dimensions. DIM is required if and only if PHI
  19. %   has unequal input and output dimensions and is provided as a Choi
  20. %   matrix.
  21. %
  22. %   URL: http://www.qetlab.com/ComplementaryMap
  23.  
  24. %   requires: ApplyMap.m, ChoiMatrix.m, iden.m, IsCP.m, IsHermPreserving.m,
  25. %             IsPSD.m, KrausOperators.m, MaxEntangled.m, opt_args.m,
  26. %             PermuteSystems.m, sporth.m, Swap.m, superoperator_dims.m
  27. %
  28. %   author: Nathaniel Johnston (nathaniel@njohnston.ca)
  29. %   package: QETLAB
  30. %   last updated: November 24, 2014
  31.  
  32. function PhiC = ComplementaryMap(Phi,varargin)
  33.  
  34. isc = iscell(Phi);
  35. if(~isc) % don't alter the Kraus operators -- will change the returned complementary map!
  36.     Phi = KrausOperators(Phi,varargin{:});
  37. end
  38.  
  39. % Compute the dimensions of PHI.
  40. [da,db,de] = superoperator_dims(Phi,1,varargin{:});
  41.  
  42. % The complementary map is obtained by placing all of the first rows of
  43. % Kraus operators of PHI into the first of PHIC's Kraus operators, all of
  44. % the second rows of the Kraus operators of PHI into the second of PHIC's
  45. % Kraus operators, and so on.
  46. PhiC = mat2cell(Swap(cell2mat(Phi),[1,2],[de,db(1)],1),de*ones(1,db(1)),da(1)*ones(1,size(Phi,2)));
  47.  
  48. if(~isc) % return a Choi matrix if that was the input
  49.     PhiC = ChoiMatrix(PhiC);
  50. end