Hi All,
I am testing the module wraparound and trying to understand how to match
the numerical results with the well known formula from literature.
I look at the example of graphene given in the module's test [1]: the
overall band structure seems fine, but when I try to check a set of
eigenvalues for a given (kx,ky) and compare it with the exact formula
enclosed below, I fail whatever the parameter 'a' that I choose!
The command I use is straightforward:
kx,ky=pi/4,pi/6
np.sort(np.linalg.eigvalsh(syst.hamiltonian_submatrix( args + (kx, ky),
sparse=False)).real)
The only matching I get is for kx,ky=0,0 which means that the problem may
be in the choice of the parameter 'a'.
for the example in the module a=1/sqrt(3) and seems not to reproduce the
expected eigenvalues.
Can someone give me some tips ?
Thanks in advance.
[1]
https://gitlab.kwant-project.org/cwg/wraparound/blob/9462edc3c1aee2f391aedf…
The formula shown in the figure was obtained from :
[2] http://www-personal.umich.edu/~sunkai/teaching/Fall_2013/chapter5.pdf

Good day,
My question today is about how (and if) one can implement semi/partially
wrapped around leads in KWANT. I'm unsure of how to do this due to the
requirements of periodic boundary conditions, but perhaps one simply needs
to be clever and approximate the system in a specific way.
What I mean by semi wrapped around leads is illustrated in the following
figure http://i.imgur.com/N03MmV9.png (which I have also attached). We have
a 3D cuboid shown in white (the idea would be to take a nanowire, but this
was easier to draw) and it is deposited on some substrate shown in gray.
On top of the cuboid one deposits two leads, which wrap around the three
exposed faces and in principle continue outwards; in a physical device
they'd end rather soon on one side and continue to some voltage source on
the other side.
So what I am wondering now is what the closest approximation/most accurate
version of this system would be in KWANT. To start with one would of course
not need the substrate, that can be left out. Then for the cuboid itself,
the scattering region, I suppose one only needs to include the part in
which scattering between leads can take part: the section that is covered
by the leads, and the part in the middle. So the two outer ends can be cut
off.
But then the leads. Obviously the 'real' version does not work; the leads
need to be infinite, and in reality they are not. One version would be
having them be infinite in the y direction; I would define some geometry
wrapped around the cuboid, and have it touch only at the ends of the
scattering region, while extending outwards to infinity as a hollow shell.
This would retain the sort of radial entrance of modes into the cuboid.
Would this be a reasonable thing to do?
To me it feels a bit wrong as the direction in which the leads are 'long'
in the physical device is x, not y. Of course all of the relevant physics
of the system does end at the leads in the y-direction, which is why I
thought of that approach. But perhaps both x and y should be infinite, or
only x. I'm not sure if KWANT will allow this, but maybe the leads could
come in from -infinity in the x direction, wrap around the cuboid, and then
continue onwards to infinity. This feels a bit problematic in terms of
periodicity though.
Another option would be ignoring the fact that the leads are wrapped around
the cuboid at all; I could simply strip the leads from the scattering
region and attach them onto the ends of the cuboid, extending to infinity
in the y-directions as a continuation of the scattering region itself. This
I am a bit skeptical about, because that makes the modes ' enter' the
nanowire in a way that should not be possible in pratice. Say that one
introduces some gates into the picture and sets up a field across the wire,
it is probable that the outer parts of the wire will have a very different
potential than the core, but this lead geometry would simply be able to
insert its mode in the center, or at the middle-bottom part. Or am I
looking at this the wrong way? Perhaps these effects would be small in any
case.
And perhaps finally there is a much better option entirely. If you can
think of one, I would be very interested in hearing about it. If not, would
it be possible to comment on the pro's/cons of the methods I sketch above,
and comment on their feasability of implementation?
Kind regards
John

Hi dear developers,
My question is about calculating total current for a finite bias in a
nanowire.
I looked at the Datta book and try to implement it in KWANT but I can not
get
a reliable answer, I think I made a mistake somewhere but I can not find it.
I define a nanowire and assume that by applying the bias at the ends of
that, the energy of each point will decrease linearly.
To calculate the current for each bias point I did the following:
For each value of bias I change the energy of the system, calculate
conductance, and integrate the corresponding conductance
from zero(mu left) to energy=bias (mu left).
Would you please help me, I don't know what I am doing wrong.
Thank you so much,
Arad
import numpy as np
from matplotlib import pyplot
import kwant
import math
from scipy import exp
from scipy.integrate import quad
#the effective mass for InAs is o.o23m0 and a=1nm
t=1.65
L0 = 30
dletaV = 0.025
deltaE = 0.03
beta= 1.0/ 0.025
#becouse of the doping the Fermi level is higher then the conductance band:
Ef-Ec= 0.25
delta=0.25
Itot = []
right_fermies = []
right_fermiesEV = []
current=[]
def make_system(a=1, t=1.65 , W= 10):
lat = kwant.lattice.square(a)
sys = kwant.Builder()
def bias (site, volt):
(x, y) = site.pos
if 0 <= x < L0:
return (volt /(L0)) * (x)
elif x == L0:
return (volt)
else:
return 0
def onsite(site, volt=0):
return 4 * t -bias (site, volt)
def bias_R (site, volt):
(x, y) = site.pos
if x == 0:
return 4 * t -volt
else:
return 0
sys[(lat(x, y) for x in range(0,L0) for y in range(W))] = onsite
sys[lat.neighbors()] = -t
sym_left_lead = kwant.TranslationalSymmetry((-a, 0))
left_lead = kwant.Builder(sym_left_lead)
for j in xrange(W):
left_lead[lat(0, j)] = 4 * t
if j > 0:
left_lead[lat(0, j), lat(0, j - 1)] = -t
left_lead[lat(1, j), lat(0, j)] = -t
sys.attach_lead(left_lead)
sym_right_lead = kwant.TranslationalSymmetry((a, 0))
right_lead = kwant.Builder(sym_right_lead)
for j in xrange(W):
right_lead[lat(0, j)] = bias_R
if j > 0:
right_lead[lat(0, j), lat(0, j - 1)] = -t
right_lead[lat(1, j), lat(0, j)] = -t
sys.attach_lead(right_lead)
return sys
def cal_current (sys, energies, right_fermi):
conductance = []
for energy in energies:
smatrix = kwant.smatrix(sys, energy, args=[right_fermi])
conductance.append(smatrix.transmission(1,0))
'''
pyplot.figure()
pyplot.plot(energies, conductance)
pyplot.xlabel("energy [t]")
pyplot.ylabel("conductance [e^2/h]")
pyplot.show()
'''
Iie = 0
intvolt= int((right_fermi)/((deltaE )*t))
for s in xrange(intvolt):
#0.77*0.0001 is e^2/h
#f_l - fr for conductance[s]
F1 = (1.0 / (math.exp((beta)* ((deltaE * s * t ) - delta)) + 1.0))
- ( 1.0 / (math.exp((1.0/ 0.025)*((deltaE * s * t) + right_fermi - delta))
+ 1.0))
#f_l - fr for conductance[s+1]
F2 = (1.0 / (math.exp((beta)* ((deltaE * (s +1) * t) - delta)) + 1.0
))-(1.0 / (math.exp((1.0/ 0.025)*((deltaE * (s +1) * t ) + right_fermi -
delta)) + 1.0))
H = ((conductance[s]*F1) + (conductance[s +1])*F2)* (deltaE/2) *
0.77 * 0.0001
Iie = H + Iie
right_fermiesEV.append(right_fermi )
Itot.append(Iie)
right_fermies.append(right_fermi)
return Itot
def main():
for j in xrange(20):
sys = make_system()
sys = sys.finalized()
#becouse of the doping the integral is not till o (the left Fermi
level) it is till 0.25
current = cal_current(sys, energies=[((deltaE * i)) for i in xrange(
25) ], right_fermi= ((dletaV * j)))
np.savetxt('Rdatay.dat', Itot)
np.savetxt('Rdatax.dat', right_fermies)
pyplot.figure()
pyplot.plot(right_fermiesEV, current)
pyplot.xlabel("bias [ev]")
pyplot.ylabel("current [A]")
pyplot.show()
if __name__ == '__main__':
main()