I tried to plot negativity that is defined as follow:
N = Trace(Sqrt(A.A_dagger))-1 (1)
the plot should start from ~0.41 or ~0.82 in r=0.01 (i don't know which one exactly) and decrease versus r. r range is 0 to 0.8
notice that first we must diagonal the matrix (calculating the eigenvalues) then taking square root of the eigenvalues. then we need to sum the eigenvalues using Total function (its like to calculate the trace of the diagonal matrix).
after that we need to do a sum from m = 0 to infinity (i know its not part of the eq (1) but we must do that. for more info look at the https://arxiv.org/abs/1010.6154
page 5 of the article)
also notice that the matrix is equal to its dagger so p = p-dagger
and notice that other way of calculating negativity is that to diagonal the matrix then use the eq (1)
here is my code
Attachments: