Message Boards Message Boards

0
|
2414 Views
|
15 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Issue with numerical evaluation of eigenvalues

I am calculating eigenvalues of a Hamiltonian numerically but I am getting avoided crossing and gap in the curves which is not correct. Please help me out to resolve this issue in the attached notebook. Thanks.

POSTED BY: Muhammad Zubair
15 Replies

The sorted eigenvalues will of course always show the seventh (for example) below (or equal to) the eighth. If instead you were to compute these paths by tracking smooth (not just continuous) curves, the crossing would I think be more obvious.

POSTED BY: Daniel Lichtblau

I tried to zoom in with a few of the curves:

Plot[{list[B, 93], list[B, 94], list[B, 95], list[B, 96],
  list[B, 97], list[B, 98], list[B, 99]},
 {B, 30, 40}, ImageSize -> 500]

They seem to touch, but they do not cross.

POSTED BY: Gianluca Gorni

Thanks! Yes, you are right but this trend is wrong. The curve must cross each other. If you have any idea how to resolve this issue, please share it.

POSTED BY: Muhammad Zubair

Your functions list[B,n] are the result of a sorting eigenvalues in increasing order:

list[B_?NumericQ] := Sort@Eigenvalues[H[N[B]]]

I don't expect them to cross.

POSTED BY: Gianluca Gorni

But they must cross each other. You can also see from the spectrum another issue of curve gaps e.g., see the red curve around B=20 T.

POSTED BY: Muhammad Zubair

How can they cross, if by your definition, list[B, n] <= list[B, n + 1].?

I don't understand what you mean by "gap", and there are many curves that can be described as red. Please clarify.

POSTED BY: Gianluca Gorni

Please follow the circle in the figure to see the gaps in the curves

enter image description here

POSTED BY: Muhammad Zubair

Perhaps there is a misunderstanding about what we mean by "curve". The functions list[B, n] that you plot are continuous, but their graphics go zigzag.

In the circle I see a violet "curve" on top, below it a yellow curve, then a green one, then a dark red one, and finally a blue curve. They touch each other, but they do not cross.

POSTED BY: Gianluca Gorni

I am calling every line of list[B, n] in plot as curve. Yes, you are right, they are not crossing. But they should not behave like zigzag as you pointed out. Their zigzag behavior means their something wrong in the code.

POSTED BY: Muhammad Zubair

I think that the zigzag is to be expected. Try a simpler example:

mat[x_?NumericQ] := {{2 x, 0}, {0, x + 1}};
eigen1[x_?NumericQ] := Min[Eigenvalues[mat[x]]];
eigen2[x_?NumericQ] := Max[Eigenvalues[mat[x]]];
Plot[{eigen1[x], eigen2[x]}, {x, 0, 2}]

The curves of eigen1 and eigen2 go zigzag and they do not cross.

POSTED BY: Gianluca Gorni

OK. Could you please elaborate your answer further? I am unable to follow , "how can I draw the curves to follow the crossings?" Have you any idea how can I remove the zigzag trend among the curves?

POSTED BY: Muhammad Zubair

One very simple way to remove the zigzag is to give all curves the same color, for example with PlotStyle->Black.

POSTED BY: Gianluca Gorni

You are right but in my case zigzag trend should not be there. Any way to systematically get rid of this trend?

POSTED BY: Muhammad Zubair

Yes, I can. But I need these energies to evaluate transport properties where these zigzag trends make problems. Therefore, I need to get rid of them.

POSTED BY: Muhammad Zubair

Crossposted here.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract