Calculating the Log Negativity

Hi,

There are a few issues with your code even before coming to the point of computing the negativity. I ran it and found the following :

1 - Firstly, the sum of eigenvalues of your reduced density matrices is \neq 1, which means you are not constructing density matrices. This is because, in the example code you posted, you are orthogonalizing at c+6 but then making ket1 at (c,c+1). You must either orthogonalize at c, or create ket1 at (c+6,c+7).

2 - In the partial transpose function, there are a few incorrect operations. One can’t reshape an itensor object. You have to first convert the itensor object to an Array object, but even doing that produces dimension mismatch, which is understandable presumably because one has to figure out which indices of the itensor object you want for your Array objects. I didn’t dig much into this as this approach is confusing to me, so i am writing below an alternative that I have used in similar calculations.

orthogonalize!(psi,c+6)
ket1 = psi[c+6]*psi[c+7]    
bra1 = dag(ket1)
rho1 = prime(ket1,"Site")*bra1         # if the two sites are not adjacent, something else needs to be added to the construction of the red. density matrix.

#@show inds(rho1) # this shows that inds(rho1)[2] and inds(rho1)[4] belong to the second site c+7. Suppose you now want to partial-transpose with respect to the basis at this site, then do 

rho1_PT = swapinds(rho1,inds(rho1)[2],inds(rho1)[4])

d,u = eigen(rho1_PT)
#@show diag(real(d))  # if this reduced density matrix fails the PPT criterion, it will show some negative eigenvalues signaling mixed state entanglement.

Now one way to define the entanglement negativity is \mathcal{N} = \frac{1}{2} \sum_i (|\lambda_i| - \lambda_i ) and logarithmic negativity being = log(1+2\mathcal{N}), where \lambda_i are the eigenvalues of the partial-transposed reduced density matrix (rho1_PT above).

2 Likes