I am trying to plot the eigen-energies of the following Hamiltonian
$$ H = 2tau cos(frac{eA}{hc} sin(omega t) + k) $$
Here tau value is set to 1. A is the amplitude. e,h,c are electron charge, Planck’s constant and speed of light respectively. k varies from -pi to +pi.
Here is the code which I used to plot the eigen-energies but it showing error in the Hamiltonian (P.S: I am new here so please excuse any error in asking the question. I will improve it eventually)
import matplotlib.pyplot as plt
import numpy as np
from qutip import (about, expect, FloquetBasis,
num, plot_wigner, ket, sesolve, sigmax, sigmaz)
th=1
e=1.602*10**(-19)
A=2.5 * 2 * np.pi
h=6.626*10**(-34)
c=3*10**8
omega = 1.0 * 2 * np.pi
T = 2 * np.pi / omega
k=np.linspace(-np.pi,np.pi)
H= [
2*th*np.cos(k,[e*A/h*c, "sin({w}*t)".format(w=omega)],)
]
A_list = np.linspace(1.0 * omega, 4.5 * omega, 20)
quasienergies1, quasienergies2 = [], []
for A_temp in A_list:
# temporary Hamiltonian
H_temp= [
2*th*np.cos(k,[e*A_temp/h*c, "sin({w}*t)".format(w=omega)],)
]
# floquet modes and quasienergies
e1, e2 = FloquetBasis(H_temp, T, sort=True).e_quasi
quasienergies1.append(e1), quasienergies2.append(e2)
plt.scatter(A_list / omega, quasienergies1, label="e1")
plt.scatter(A_list / omega, quasienergies2, label="e2")
plt.xlabel("A / w"), plt.ylabel("Quasienergies")
plt.legend();
strings is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.