Plotting Hamiltonian for overlapping lattices
Dear all, I need some help trying to plot the onsite energy of my system. The problem is that I have two overlapping lattices, one for spin up and one for spin down. From before, I had the following function: def V(i): ham = sys.hamiltonian(i,i) ham = 0.5*np.trace(np.dot(ham,s_z)).real return ham kwant.plotter.map(sys,V) which worked fine when I only had one lattice (and I used pauli matrices to express the spin degrees of freedom instead of having two lattices). What I would like is a function that does the same as V(i) for my system. Plotted H(1,1) - H(2,2) at position (1,1) etc. I am not sure how to do this. I was considering doing it manually and looping through the whole H, but how do I know its size? If you have any better/easier suggestions I would appreciate it. Best, Camilla
Hi Camilla, First of all, I belive that you want a Kronecker product, and not a dot product. Am I correct? Then your eigenstates will be 2-spinors. When you do that, you can separate the two degrees of freedom of the system writing your potential in matrix form, one for each spin component, and even a coupling between them. Maybe if you write explicitly the Hamiltonian you want it will be easy to suggest how you can implement. Cheers, Antônio. ----- Mensagem original -----
De: "Camilla Espedal" <camilla.espedal@ntnu.no> Para: kwant-discuss@kwant-project.org Enviadas: Terça-feira, 8 de Novembro de 2016 7:23:03 Assunto: [Kwant] Plotting Hamiltonian for overlapping lattices
Dear all,
I need some help trying to plot the onsite energy of my system. The problem is that I have two overlapping lattices, one for spin up and one for spin down. From before, I had the following function:
def V(i): ham = sys.hamiltonian(i,i) ham = 0.5*np.trace(np.dot(ham,s_z)).real return ham
kwant.plotter.map(sys,V)
which worked fine when I only had one lattice (and I used pauli matrices to express the spin degrees of freedom instead of having two lattices). What I would like is a function that does the same as V(i) for my system. Plotted H(1,1) – H(2,2) at position (1,1) etc.
I am not sure how to do this. I was considering doing it manually and looping through the whole H, but how do I know its size? If you have any better/easier suggestions I would appreciate it.
Best,
Camilla
participants (2)
-
antoniolrm@usp.br -
Camilla Espedal