Dear Zhang,
For the hoppings method, kwant puts the hopping t_ij =t_ji* by default. So, you can not make your hamiltonian non hermitian this way.
On the second hand, you can put the potential as a complex number and therefore your Hamiltonian becomes non hermitian.
In this kind of situation, you may want to calculate the scattering matrix or the Green's function. To do so, you need to use the option :
check_hermeticity=False.
As an example, I wrote for you a small program where I have a scatterer connected to two 1D leads.
in this example, I calculate the reflection coefficient R as usual.
in the second part, I treat this problem in a different way where I delete the second lead and take its effect using its complex self energy as an additional potential. This way, my Hamiltonian becomes non-hermitian.
A quick comparison of the result in the two methods shows that I get the same thing.
I hope this helps.
Regards
Adel
###############################
import numpy as np
import kwant
def make_sys(two_leads=False):
def potential(site,energy,V):
if two_leads:
return V
else:
#Here we take into accont the second lead by its complex self energy
self_energy=energy/2-1j*sqrt(1-(energy/2)**2) #self energy of 1D lead
return V+self_energy
lat = kwant.lattice.square(norbs=1)
sys=kwant.Builder()
sys[(lat(i,0) for i in range(1))] = potential
sys[lat.neighbors()] = 1
sym=kwant.TranslationalSymmetry((0,1))
lead=kwant.Builder(sym)
lead[lat(0,0)]=0
lead[lat.neighbors()]=1
sys.attach_lead(lead)
if two_leads:
sys.attach_lead(lead.reversed())
return sys.finalized()
#system with two leads
syst=make_sys(two_leads=True)
kwant.plot(syst)
energies=np.linspace(-1.99,0,50)
Reflection1=[]
for energy in energies:
SM=kwant.smatrix(syst,energy=energy,in_leads=[0],out_leads=[0],params=dict(energy=energy,V=-1.8))
R=SM.transmission(0,0)
Reflection1.append(R)
#system with one lead and a self energy as a potential
syst=make_sys(two_leads=False)
kwant.plot(syst)
Reflection2=[]
#The Hamiltonian is non-hermitian
#We use: check_hermiticity=False
for energy in energies:
SM=kwant.smatrix(syst,energy=energy,check_hermiticity=False,in_leads=[0],out_leads=[0],params=dict(energy=energy,V=-1.8))
R=SM.transmission(0,0)
Reflection2.append(R)
pyplot.plot(energies,Reflection1,'ro',energies,Reflection2,'b-')
pyplot.xlabel("energy",fontsize=20)
pyplot.ylabel("R",fontsize=20)
pyplot.show()