Dear Sir,
I am a researcher from UFT-Brazil. I am trying to calculate Hall and
longitudinal resistances at six terminal bar with antidots. I have some
doubts about the order assigned to the leads because i create them in
pairs. I sent part of the python code.
# DEFINE-SE A REGIAO DE ESPALHAMENTO INCLUI ANTIDOT
def rect(pos):
(x, y) = pos
return (0 <= x <= L and 0 <= y <= W )
# DEFINE-SE O CAMPO MAGNÉTICO CONTROLADO POR B
def hopx(site1, site2, B=0):
y = site1.pos[1]
return -t * exp(-1j * B * y)
# energia dos sitios
sys[lat.shape(rect, (0, 0))] = 4 * t
# hoppings in x-direction
sys[kwant.builder.HoppingKind((1, 0), lat, lat)] = hopx
# hoppings in y-directions
sys[kwant.builder.HoppingKind((0, 1), lat, lat)] = -t
#DEFINEM-SE OS CONTATOS
############################################################
# left and right leads
sym_lead = kwant.TranslationalSymmetry((-a, 0))
lead = kwant.Builder(sym_lead)
def lead_shape(pos):
(x, y) = pos
return (0 <= y <= W)
lead[lat.shape(lead_shape, (0, 0))] = 4 * t
lead[lat.neighbors()] = -t
#### FIXAR OS DOIS CONTATOS RIGHT AND LEFT ####
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
############################################################
# top lead 1
lead = kwant.Builder(kwant.TranslationalSymmetry((0, a)))
lead[(lat(j+(L/5), 0) for j in xrange(W))] = 4 * t
lead[lat.neighbors()] = -t
#### FIXAR CONTATO SUPERIOR E INFERIOR ####
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
############################################################
# top lead 2
lead = kwant.Builder(kwant.TranslationalSymmetry((0, a)))
lead[(lat(j+(3*L/5), 0) for j in xrange(W))] = 4 * t
lead[lat.neighbors()] = -t
#### FIXAR CONTATO SUPERIOR E INFERIOR ####
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
############################################################
#
return sys
#
def plot_conductance(sys, energy, Bfields):
data = []
for B in Bfields:
smatrix = kwant.smatrix(sys, energy, args=[B])
cond = np.array([[smatrix.transmission(i, j) for j in xrange(6)]
for i in xrange(6)])
cond -= np.diag(cond.sum(axis=0))
cm = cond[:-1, :-1]
nonlocal_resistance = np.linalg.solve(cm, [-1, 1, 0, 0, 0])[2]
print nonlocal_resistance
data.append(nonlocal_resistance)
local_dos = kwant.ldos(sys, energy = 0.25)
pyplot.figure()
pyplot.plot(Bfields, data)
pyplot.xlabel("magnetic field [T]")
pyplot.ylabel("rxy")
pyplot.show()
kwant.plotter.map(sys, local_dos, num_lead_cells=10)
#
def main():
sys = make_system()
# Check that the system looks as intended.
kwant.plot(sys)
# Finalize the system.
sys = sys.finalized()
plot_conductance(sys, energy=0.3, Bfields=[i* 0.002 for i in
xrange(200)])
The order of the leads determine the solution of the linear system of cm.
Could you give me some help?
With the best regards,
M. Sotomayor