Dear Kwant Users,
I am trying to calculate the bulk density of states for an infinite(in x) homogenous 2D superconductor with spin orbit and Zeeman field with 3 sites in the y direction. I have defined the leads and the system according to the superconducting hamiltonian. For the same, I calculate the dos for the first layer(in y) using the following piece of code: def ldos(syst,energy): ldos1=kwant.ldos(syst, energy) #print(ldos) X1 = np.sum(ldos1[0:4]) return X1 Now, the result I get is physically correct, although I would want the DOS to be a little smoother. In the traditional way of doing things, a retarded greens function would have a small imaginary part, increasing which would give me a smoother curve. Is there any way in kwant, that I can control such a broadening parameter?
Thanking you in advance, Wils
alex.black9980@gmail.com wrote:
In the traditional way of doing things, a retarded greens function would have a small imaginary part, increasing which would give me a smoother curve. Is there any way in kwant, that I can control such a broadening parameter?
You should be able to use non-hermitian Hamiltonians with Kwant as well. To this end, set ’check_hermicity=False’ when you call 'ldos()’ (or other solvers).
However, note that by design Kwant builders enforce that hoppings are hermitian: Setting the hopping (i, j) to a constant also sets the hopping (j, i). When a value function is used it will be only evaluated for one direction and the hermitian conjugate will be used for the other direction.
This means that when you use builders, the non-hermitian parts of the Hamiltonian must be limited to onsite elements. But this should be enough for what you want to do.
Christoph
Thanks a lot for your answer, Christoph. I have put the imaginary part while defining the onsite hamiltonian as: def onsite(eta): return ...+1j * eta * np.eye(4) I have imaginary parts in my hopping due to the spin-orbit coupling and then tried to calculate using ldos according to your answer, but it gives an error as : ldos for non-Hermitian Hamiltonians is not implemented yet. Can you please help me further with this matter?
Thank you Many regards, wils
alex.black9980@gmail.com wrote:
I have imaginary parts in my hopping due to the spin-orbit coupling and then tried to calculate using ldos according to your answer, but it gives an error as : ldos for non-Hermitian Hamiltonians is not implemented yet.
Right, I forgot about that. As far as I can reconstruct we have disabled LDOS computation for non-Hermitian Hamiltonians because we considered it ill-defined or at least dangerous. (But I may be wrong, it was a long time ago.)
LDOS in Kwant is computed as the sum over the squared absolute values of the wave functions that are the response of all the incoming modes at a given energy. You should be able to compute the same thing by calling ’kwant.wave_function’ and summing over abs(...)**2 for all modes and all leads. (Do check that you get the same result as the built-in 'ldos’ function for Hermitian Hamiltonians.)
Is this what you would like to compute?
I am not sure whether computing LDOS in this above way makes much physical sense, but it should be possible.
Christoph
Hi Alex, all,
Firstly, if you have the resulting density of states and you want it to look smoother: convolve it with a Lorentzian :) The result is the same, and you aren't losing on efficiency as far as I know.
For a reference I'll also comment along the lines of the prior discussion.
I am not sure whether computing LDOS in this above way makes much physical sense, but it should be possible.
At complex energies one would need to compute the imaginary part of the Green's function diagonal directly (the summation over modes only matches the Im G_ii with a Hermitian Hamiltonian at real energies). To do so efficiently one would need to do two things:
1. Take the linear system for solving the problem (kwant's solvers expose this via solver._make_linear_sys I believe). 2. Feed that matrix to a sparse linear algebra library capable of computing selected elements of the inverse of a sparse matrix.
MUMPS library (wrapped by Kwant) supports computing diagonal of an inverse, although it would probably take longer computation time than solving the original linear system and we didn't benchmark it.
Let me know if you want to go further down that path.
Cheers, Anton