Code for constructing a state whose partial transpose has the maximum number of negative eigenvalues
This page contains MATLAB code that can be used to construct a density matrix in Mm ⊗ Mn whose partial transpose has (m-1)(n-1) negative eigenvalues, which is maximal.
Download and Install
Step 1: Download and install CVX. You do not need to know how to use CVX – you just need to install it.
Step 2: Download the PTNegEvals.zip file (file size: 5 kB).
Step 3: Unzip the file.
Step 4: Place all four of the unzipped files in your MATLAB scripts directory.
The function PTNegEvals creates a density matrix in Mm ⊗ Mn such that its partial transpose has (m-1)(n-1) negative eigenvalues, using the method of . The function takes two arguments: m and n.
The following code produces a density matrix in M3 ⊗ M4 whose partial transpose has 6 negative eigenvalues:
>> rho = PTNegEvals(3,4);
We can then verify that rho is positive semidefinite and its partial transpose has 6 negative eigenvalues by using the PartialTranspose function (which is included in the PTNegEvals.zip file):
>> eig(rho) ans = 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0810 0.0810 0.1000 0.1000 0.3191 0.3191 >> eig(PartialTranspose(rho,2,[3,4])) ans = -0.0219 -0.0219 -0.0164 -0.0164 -0.0140 -0.0140 0.1155 0.1155 0.1526 0.1526 0.2842 0.2842
- N. Johnston. Non-positive partial transpose subspaces can be as large as any entangled subspace. Physical Review A, 87:064302, 2013.