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.
Dear kwant users,
we have posted new instructions for installing kwant on Windows on the
kwant website: http://www.kwant-project.org/install
The old instructions do not work any more, as the format of the python
packages on Christoph Gohlke's webpage have changed.
the kwant team
Thanks, it is very useful for me. I want to know more about how the
transmission is related to the wave vector kx, because I want to calculate
the transmission contributed from some scale like kx=0~pi. So, how can i
know the wave vector for "2" in S10[3, 2] ? I tried "modes =
Smatrix.lead_info", it seems that it does not give the kx information. I
can take graphene as an example, we have two valleys K and K' in graphene.
Since the wave vectors kx for the two valleys are different, we can
calculate the transmission contributed from K valley and K' valley
separately, but of course we need to know "transmission-mode-kx" first.
Maybe this can be easily solved in another way.
On Fri, Feb 6, 2015 at 8:03 PM, <kwant-discuss-request(a)kwant-project.org>
> Send Kwant-discuss mailing list submissions to
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> You can reach the person managing the list at
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kwant-discuss digest..."
> Today's Topics:
> 1. Transmission of each propagating mode (Lee Kwok-Long)
> 2. Re: Transmission of each propagating mode (Joseph Weston)
> Message: 1
> Date: Fri, 6 Feb 2015 16:43:23 +0800
> From: Lee Kwok-Long <kwoklonglee(a)gmail.com>
> To: kwant-discuss(a)kwant-project.org
> Subject: [Kwant] Transmission of each propagating mode
> Content-Type: text/plain; charset="utf-8"
> Dear all,
> I want to calculate the transmission of each propagating mode separately,
> but I do not know how the propagating modes are related to the scattering
> matrix. For example, we can read from the bandstructure and find a mode at
> E=0.2，kx=0.95pi, how to find the transmission for this mode. Or, we have
> the transmission and how to find the contributions from each mode? Thanks
> in advance!
> Kwok-Long Lee
In the following code what about the parameter 'energy' for smatrix function
Isn't it required for transmission function? And if not in what range the
conductance is being calculated .Please explain more about this parameter
'energy' ? Also, when we are calculating resistance by applying voltages
is it required or not in KWANT to put this 'energy' parameter.?
# smat = smat.data
# smat = abs(smat)**2
# reduce by one dimension G -> G[temp, temp]
temp = [0, 1, 3, 4, 5]
G = G[temp, :]
G = G[:, temp]
# invert R = G^-1
# find out whether it is a numpy object
r = np.linalg.inv(G)
# Voltages follow: V = R I[temp]
V = r.dot(np.array([0, 0, 0, 1, -1]))
# Completely solved the six terminal system.
# Consider the 2x2 conductance now: Use I = sigma U
E_x = V - V
E_y = V - V
sigma_xx = E_x / (E_x**2 + E_y**2)
sigma_xy = E_y / (E_x**2 + E_y**2)
return sigma_xx, sigma_xy
sys = qhe_hall_bar(L=60, W=100, w_lead=90, w_vert_lead=28)
par = SimpleNamespace(t=1.0, mu=0.3, mu_lead=0.3, B=None)
sigmasxx = 
sigmasxy = 
Bs = np.linspace(.02, .15, 200)
for par.B in Bs:
s = kwant.smatrix(sys, args=[par])
G = np.array([[s.transmission(i, j) for i in range(len(sys.leads))]
for j in range(len(sys.leads))])
G -= np.diag(np.sum(G, 0))
sigma = calculate_sigmas(G)
I want to consider a four-layer structure, so I define the lattice for the
four layers like:
lat_layer1 = kwant.lattice.square(name='layer1')
lat_layer2 = kwant.lattice.square(name='layer2')
lat_layer3 = kwant.lattice.square(name='layer3')
lat_layer4 = kwant.lattice.square(name='layer4')
And then i set the hoppings for all the layers and hoppings between the
layers. My question is about adding the lead. Can I do it like this: I have
four left leads according to the sys region. I use a lead0 to include all
the left leads like:
At last, i add the hoppings between layers in lead0. I calculate the
bandstructure of led0. Can I do it like this?
I am calculating the longitudinal resistance (SdHo oscillation) using a
square lattice.The order of leads is as follows:
sys.attach_lead(leadA)# lead no. 0
sys.attach_lead(leadA.reversed())# lead no. 1
# First upper lead
sys.attach_lead(leadB)# lead no. 2
# First lower lead
sys.attach_lead(leadB.reversed())# lead no. 3
# Second upper lead
sys.attach_lead(leadC) # lead no. 4
#second lower lead
sys.attach_lead(leadC.reversed()) # lead no. 5
And using the Folowing piece of code to calculate the Longitudinal resistance:
def plot_conductance(sys, energy, Bs):
data = 
for B in Bs:
smatrix = kwant.smatrix(sys, energy, args=[B])
Trans = np.array([[smatrix.transmission(i, j) for j in xrange(6)]
for i in xrange(6)])
Trans -= np.diag(Trans.sum(axis=0))
cm = Trans[:-1, :-1]
resistance = np.linalg.solve(cm, [-1,1,0, 0, 0])
My question is that it is correct also what is the unit of current being
used here, and units of rest of the quantities?Also How I am supposed to
write code gate voltage. I am trying the same way accept now my arguement is
not B but G (gate voltage). But its wrong I know.Please help me about these
questions. Thank you in advance.
I want make a hexagonal quantum ring. I thought about using straight-lines
(12-lines) for limit the points between its, but I will have many lines
code. Has someone a better idea? Other thing, I want calculate the current
density as function of a defect in a of the arm. Is it possible?
Thank for help me.
I have a rectangular shaped system that should be completely coupled to leads at one side . This means I have leads attached along the horizontal direction as well as the vertical direction. Now, the corners (the transition between the vertical and horizontal leads) act as scatterers. I was wondering if there is some way to define a lead around a corner?
Thanks in advance,
I am using Kwant for 2 months. I've studied the conductance behaviour in a
square lattice for two terminal case. But for the 4 terminal case I've
some confusion about the hall conductance. I've read your post about the
hall resistance. You wrote there,
nonlocal_resistance = np.linalg.solve(cm, [1, 0, -1])
Why did you put the currents I_0=1, I_1=0 and I_2=-1?
Also can you please tell me how do I calculate the longitudinal
conductance for the 4 terminal case.
Dept. of Physics