# ReductionMap

 Other toolboxes required ReductionMap Produces the reduction map none ChoiMap Superoperators

ReductionMap is a function that returns the Choi matrix of the linear map that acts as follows:

$\Phi(X) := \mathrm{Tr}(X)I - X,$

where $I$ is the identity matrix. This map is positive.

## Syntax

• R = ReductionMap(DIM)
• R = ReductionMap(DIM,K)

## Argument descriptions

• DIM: The dimension of the reduction map. That is, the size of the matrices that the reduction map acts on.
• K (optional, default 1): If this positive integer is provided, the script will instead return the Choi matrix of the following linear map:

$\Phi(X) := K\cdot\mathrm{Tr}(X)I - X.$

## Examples

### The reduction map is positive

The following code returns the Choi matrix of the 3-dimensional reduction map and then verifies that the reduction map is indeed positive (i.e., verifies that its Choi matrix is block positive):

>> R = ReductionMap(3)

R =

(5,1)       -1
(9,1)       -1
(2,2)        1
(3,3)        1
(4,4)        1
(1,5)       -1
(9,5)       -1
(6,6)        1
(7,7)        1
(8,8)        1
(1,9)       -1
(5,9)       -1

>> IsBlockPositive(R) % verify that the reduction map is positive

ans =

1

### Higher values of K

It is known that the generalization of the reduction map that is provided by the optional argument K is always K-positive, but not (K+1)-positive. The following code verifies this in the K = 2 case:

>> R = ReductionMap(3,2)

R =

(1,1)        1
(5,1)       -1
(9,1)       -1
(2,2)        2
(3,3)        2
(4,4)        2
(1,5)       -1
(5,5)        1
(9,5)       -1
(6,6)        2
(7,7)        2
(8,8)        2
(1,9)       -1
(5,9)       -1
(9,9)        1

>> IsBlockPositive(R,1) % verify that this map is positive

ans =

1

>> IsBlockPositive(R,2) % verify that this map is 2-positive

ans =

1

>> IsBlockPositive(R,3) % see that this map is not 3-positive

ans =

0

## Source code

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

1. %%  REDUCTIONMAP    Produces the reduction map
2. %   This function has one required argument:
3. %     DIM: a positive integer (the dimension of the reduction map)
4. %
5. %   R = ReductionMap(DIM) is the Choi matrix of the reduction map, which is
6. %   a positive map on DIM-by-DIM matrices.
7. %
8. %   This function has one optional argument:
9. %     K (default 1)
10. %
11. %   R = ReductionMap(DIM,K) is the Choi matrix of the map defined by
12. %   R(X) = K*trace(X)*eye(DIM^2) - X. This map is K-positive.
13. %
14. %   URL: http://www.qetlab.com/ReductionMap
15. 
16. %   requires: iden.m, MaxEntangled.m, opt_args.m
17. %   author: Nathaniel Johnston (nathaniel@njohnston.ca)
18. %   package: QETLAB
19. %   last updated: September 29, 2014
20. 
21. function R = ReductionMap(dim,varargin)
22. 
23. % set optional argument defaults: k=1 (the usual reduction map)
24. [k] = opt_args({ 1 },varargin{:});
25. 
26. psi = MaxEntangled(dim,1,0);
27. R = k*speye(dim^2) - psi*psi';