2

I have a complex matrix which looks like

H = [[w1-complex(0,g1),k], [k,w2-complex(0,g2)]

and as discussed in this paper,

I want to find the eigenvalues and plot their real and imaginary part on a Riemann surface. It seems that the paper chooses fixed values of g1 and g2 (denoted with Greek letter gamma originally) and uses a detuning parameter delta=(w1-w2)/2 and plots eigenvalues on the k-delta plane. Again, one may choose w2=0 and vary w1 to change delta.

I am attaching the portion of the paper that discusses the plotting.

I couldn't find any discussion on SO that plots Riemann surface plots using Python. Hope the problem is not a duplicate.

enter image description here

I have the following code.

"""
Riemann plot of a non-Hermitian matrix
"""

from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np


XR = np.arange(-1, 1, 0.01)
YR = np.arange(-1, 1, 0.01)

delta, kappa = np.meshgrid(XR, YR)

g1 = 0.2; g2 = 0.1
chi = (g1+g2)/2.0
beta = (g1-g2)/2.0
Gamma = delta + 1j*beta

disc = np.sqrt(kappa**2+Gamma**2)

lambda1 = delta-1j*chi+disc 
lambda2 = delta-1j*chi-disc 


F = plt.figure(1)
A = F.gca(projection='3d')
plt.xlabel('$\delta$')
plt.ylabel('$\kappa$')
A.set_zlabel('Re $\lambda$')
S = A.plot_surface( kappa, delta, lambda1.real, rstride=1, cstride=1, cmap=cm.Reds )
S = A.plot_surface( kappa, delta, lambda2.real, rstride=1, cstride=1, cmap=cm.Greys )

F = plt.figure(2)
A = F.gca(projection='3d')
plt.xlabel('$\delta$')
plt.ylabel('$\kappa$')
A.set_zlabel('Im $\lambda$')

S = A.plot_surface(kappa, delta, lambda1.imag, cmap=cm.Reds)
S = A.plot_surface(kappa, delta, lambda2.imag, cmap=cm.Greys)

plt.show()

which produces the following outputs.

enter image description here

Any way to modify it and get the desired results?

hbaromega
  • 2,317
  • 2
  • 24
  • 32
  • [Plotting the Riemann surface of the cubed root](http://homepages.math.uic.edu/~jan/mcs507f13/riemann_matplotlib.py) might provide some insight? – Parth Shah Jul 25 '20 at 20:11
  • If you notice carefully, you may find that my code got inspired by the code given on your link. ;) – hbaromega Jul 26 '20 at 09:51
  • It's not clear what you need help with: reproducing the paper's figures or fixing the rendering bug in your second figure. The former question is not one of programming, so it's off-topic on Stack Overflow. This is why I closed your question as a duplicate, and the linked dupe targets can be used to solve your second question (the rendering bug). – Andras Deak -- Слава Україні Aug 05 '20 at 23:34

0 Answers0