1
$\begingroup$

I have a non-Hermitian Matrix nonHM whose size is $n \times n$ and is a function of $c1$.the Eigenvalues are symmetric with respect to $c1$, i.e. $E(c1)=E(-c1)$, however, MMA gives correct results only for small $n$ but we lose the symmetry for large $n$ which is expected (not sure!) to be a matter of accuracy? So, how can increase the accuracy?

here I am calculating the imaginary part of the eigenvalues

org = c1 PauliMatrix[1] + I c2/2 PauliMatrix[2];
cp = 1/2 (PauliMatrix[1]  + I PauliMatrix[2]);
nonHM[n_] := 
 SparseArray[{Band[{1, 1}, {2 n, 2 n}] -> {org}, 
   Band[{1, 3}, {2 n, 2 n}] -> {cp}, 
   Band[{3, 1}, {2 n, 2 n}] -> {ConjugateTranspose[cp]}}]
c2 = 4/3; sizn = 40;
Eign0 = ParallelTable[{c1, Eigenvalues[N@nonHM[sizn]]}, {c1, -3, 3, 
    0.01}];
listIm = Table[{-3 + 0.01 i, Im[Eign0[[i]][[2, j]]]}, {i, 1, 
    Length[Eign0]}, {j, 1, 2 sizn}];
ListPlot[Transpose[listIm], Frame -> True, 
 FrameLabel -> {"c1", "ImE"}, LabelStyle -> {FontSize -> 18, Black}, 
 PlotRange -> {-0.8, 0.8}, Axes -> True, 
 PlotStyle -> Directive[Red, PointSize[Small]], AspectRatio -> 1, 
 ImageSize -> 400]

this is for $n=5$

enter image description here

and for $n=40$

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

Rationalize .01 in the lines Eign0=... and listIm=...:

To get finite evaluation time I decreased the increment {c1, -3, 3,1/10 }

Eign0 = ParallelTable[{c1, Eigenvalues[nonHM[sizn] ]}, {c1, -3, 3,1/10  }];

In the next line index i must be replaced by i-1 I think.

listIm = Table[{-3 + 1/10  (i-1), Im[Eign0[[i]][[2,j]]]}, {i, 1,Length[Eign0]}, {j, 1, 2 sizn}];

ListPlot[Transpose[listIm], Frame -> True,FrameLabel -> {"c1", "ImE"}, LabelStyle ->{FontSize -> 18, Black}, PlotRange -> {-0.8, 0.8}, Axes -> True,PlotStyle -> Directive[Red, PointSize[Small]],AspectRatio -> 1,ImageSize -> 400]

enter image description here

Hope it helps!

$\endgroup$
4
  • $\begingroup$ it takes too long and is not finished?! I am using MMA 12.3.0 on win64 $\endgroup$
    – MMA13
    Commented Nov 4, 2021 at 14:26
  • $\begingroup$ @valarmorghulis See my modified answer. I decreased the discretisation of c1 to get finite evaluation time. $\endgroup$ Commented Nov 4, 2021 at 14:32
  • $\begingroup$ thanks for the help! correct $(i-1)$ but this way it becomes time expensive! $\endgroup$
    – MMA13
    Commented Nov 4, 2021 at 14:51
  • 1
    $\begingroup$ Using Eigenvalues[N[nonHM[sizn], 30]] is faster than calculating analytical Eigenvalues and also more accurate. $\endgroup$
    – Akku14
    Commented May 26, 2022 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.