TransWikia.com

Noise in Eigenvalues plot

Mathematica Asked by Hazoor Imran on December 7, 2020

I am trying to Plot Eigenvalues of a Hamiltonian, but I am getting noisy plot, which is incorrect. Here is the code.

A1 = {{0, 1, 0, 0}, {1, 0, 0, 0}, {0, 0, 0, -1}, {0, 0, -1, 0}};
   A2 = {{0, -I, 0, 0}, {I, 0, 0, 0}, {0, 0, 0, -I}, {0, 0, I, 0}};
   A3 = {{0, 0, 0, -1}, {0, 0, 1, 0}, {0, 1, 0, 0}, {-1, 0, 0, 0}};
   A4 = {{0, -I, 0, 0}, {I, 0, 0, 0}, {0, 0, 0, I}, {0, 0, -I, 0}};
   A5 = {{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, -1}};
   A6 = {{0, 0, 0, -I}, {0, 0, I, 0}, {0, -I, 0, 0}, {I, 0, 0, 0}};
   A7 = {{0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}};
   A8 = {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}};
H[d_, λ_, β_, m_] := 
  a (Sin[x] A1 + Sin[ky] A2) + A3 β + 
   d A4 + (t Cos[z] + 2 b (2 - Cos[x] - Cos[ky])) A5 + α*
    Sin[ky] A6 + λ Sin[z] A7+m*A8;
   ky = 0;
   a = 1;
   b = 1;
   t = 1.5;
   α = 0.3;
   Plot3D[Eigenvalues[H[0.1, 0.5, 0.7, 0]][[4]], {x, -π, π}, {z, 0, 2 π}]

Mathematica graphics

Any help will be highly appreciated.

2 Answers

Not sure why you pick the 4th element, but maybe this will help:

ev4 = Eigenvalues[H[p, q, r, s]][[4]] /. 
   Thread[{p, q, r, s} -> {0.1, 0.5, 0.7, 0}];
Plot3D[ev4, {x, -π, π}, {z, 0, 2 π}]

enter image description here

Answered by Michael E2 on December 7, 2020

By default, the eigenvalues are ordered by absolute value. All the eigenvalues of this particular matrix have the same absolute value plus some rounding errors. Thus, it can easily happen, that the fourth eigenvalue is positive or negative, depending on the parameters.

You can use Max to plot the largest eigenvalue:

Plot3D[Max@Eigenvalues[H[0.1, 0.5, 0.7, 0.]], {x, -Pi, Pi}, {z, 0, 2 Pi}]

enter image description here

Alternatively, you may use the "Criteria" suboption of the Method "Arnoldi":

Plot3D[
  Eigenvalues[
   H[0.1, 0.5, 0.7, 0], -1, 
   Method -> {"Arnoldi", "Criteria" -> "RealPart"}
   ], 
  {x, - Pi, Pi}, {z, 0, 2 Pi}]

Answered by Henrik Schumacher on December 7, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP