Dear Sir,
I am a PhD student of Hong Kong University of Science and Technology. I
want to use KWANT to caculate Hall resistance of a Hall bar structure.We
can get the conductance between 6 electrodes, but how to get hall
resistance? Can you give me some help? Thank you very much.
Best Regards,
Zhang Bing

Dear Joe，
Thanks a lot for your reply. Also, I want to tell the authors that I can
not receive the reply through email. Is my email address added to mailing
list?
Kwok-Long Lee

Dear all，
I note that all the shapes of the scattering regions in the tutorials can
be simply realized by using one sentence like "return x ** 2 + y ** 2 < r
** 2". I want to try a scattering region with a shape: 0<=x<=5， 0<=y<=10;
6<=x<=10，-5<=y<=15.So it is a combined two square regions. I know that it
is very convenient to add and delete sites in Kwant, but is there a simple
way to define this scattering region? Can anyone help me with this example?
Thanks in advance.
Kwok-Long Lee

Hello!
I have a question about the conductance formula that you have given in
Kwant paper.It reads as summation over elctrodes of the scattering matrix.My
question is about how the calculation are being done in different regimes as
transmission formula gets changed in different regimes.In diffusive regime
its no of modes multiplied lambda/l+lambda i.e.(M*l/L+l).How kwant deals
with it?And also what about the (-del F/del E ) i.e differene in energy
levels in both the leads(say we have only 2).My apology if it's more of a
physics question,but I want to calculate with hands.Any intuition is
appreciated.

Hello !
I am trying to plot the surface LDOS of a 3d cubic lattice .But I am
having an error .Please have a look at the code this code is for topological
insulator on a cubic lattice.It generates the correct band structure but
not LDOS and conductance:I am not mentioning the libraries to keep it
small.I have tried using the 3rd dimension zero it still not working
lat = kwant.lattice.general([(1,0,0),(0,1,0),(0,0,1)])
# All pauli matrices to define pseuospin and spin degree of freedom.
s_0=np.identity(2)
s_z =np.array([[1, 0], [0, -1]])
s_x = np.array([[0, 1], [1, 0]])
s_y = np.array([[0, -1j], [1j, 0]])
# 4x4 matrices
g1= tinyarray.array(np.kron(s_x,s_x))
g2= tinyarray.array(np.kron(s_y,s_x))
g3 = tinyarray.array(np.kron(s_z,s_x))
g4= tinyarray.array(np.kron(s_0,s_y))
g5 = tinyarray.array(np.kron(s_0,s_z))
def make(a = 14 ,b = 5, c= 0,t=1,delta =.4,m =2):
sym = kwant.TranslationalSymmetry((1,0,0))
sys = kwant.Builder()
def cube(pos):
x,y,z = pos
return 0<=x<=a and 0<=y<=b and 0<=z<=c
#Onsite energy
sys[lat.shape(cube,(0,0,0))] = m*tau_0z
#hopping in x direction
sys[kwant.builder.HoppingKind((1, 0,0), lat,lat)] = -t*tau_0z -
1j*delta*tau_zx
#hopping in y direction
sys[kwant.builder.HoppingKind((0,1,0), lat,lat)] = -t*tau_0z +
1j*delta*tau_0y
#hopping in z direction
sys[kwant.builder.HoppingKind((0,0,1), lat,lat)] = -t*tau_0z -
1j*delta*tau_xx
#leads
lead = kwant.Builder(sym)
def cube1(pos):
x,y,z = pos
return 0<=y<=b and 0<=z<=c
#Onsite energy
lead[lat.shape(cube,(0,0,0))] = m*tau_0z
#hopping in x direction
lead[kwant.builder.HoppingKind((1, 0,0), lat,lat)] = -t*tau_0z -
1j*delta*tau_zx
#hopping in y direction
lead[kwant.builder.HoppingKind((0,1,0), lat,lat)] = -t*tau_0z +
1j*delta*tau_0y
#hopping in z direction
sys[kwant.builder.HoppingKind((0,0,1), lat,lat)] = -t*tau_0z -
1j*delta*tau_xx
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
return sys.finalized()
return sys
energy =.5
def density(sys, energy, args, lead_nr):
wf = kwant.wave_function(sys, energy, args)
return(abs(wf(lead_nr))**2).sum(axis=0)
def lds(sys, energy, args, lead_nr):
dos = kwant.ldos(sys, energy, args)
return dos
#main funcation call
def main():
sys = make()
kwant.plot(sys, site_size=0.19, site_lw=0.01, hop_lw=0.03,site_color = 'c')
d = density(sys, energy, [.0, "" ], 0)
kwant.plotter.map(sys,d)
s = lds(sys,energy,[.0, "" ], 0)
kwant.plotter.map(sys,s)
if __name__ == '__main__':
main()
the error is :
ValueError: Only 2D systems can be plotted this way.