Message Boards Message Boards

0
|
2836 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
POSTED BY: Gianluca Gorni
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
POSTED BY: Gianluca Gorni
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

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

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
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