Dear All,

    I have tried with a kwant code to see the transmission through barrier 
imposed by a qwr between the 
source and drain. The wire is constructed and its bands are formed 
successfully; but the plot of 
transmission through the constant barrier is not obtained. In the long run, I 
would like to use the 
standardised varying barrier potential and see the transport.
Please help me overcome this difficulty so that I may proceed further.
Kind regards.
K.K.Ghosh 
 PS. code is attached herewith. 

import kwant
import numpy as np
from matplotlib import pyplot

lat=kwant.lattice.square()

def lead_0(W=10,t=1):
    lead=kwant.Builder(kwant.TranslationalSymmetry([-1,0]))
    lead[(lat(0,y) for y in range(W))]=4*t
    lead[lat.neighbors()]=-t
    return lead

def qwr_with_barrier(W=10,L=5,t=1):
    def onsite_pot(s,v):
        (x,y)=s.pos 
        return (4-v)*t

    qwr=kwant.Builder()
    qwr[(lat(x,y) for x in range(L) for y in range(W))]=onsite_pot
    qwr[lat.neighbors()]=-t

    lead=lead_0()
    qwr.attach_lead(lead)
    qwr.attach_lead(lead.reversed())
    return qwr

def plot_transmission(lead,energy,params):
    trans=[]
    for param in params:
        smatrix=kwant.smatrix(lead,energy,args=[param])
        trans.append(smatrix,transmission(1,0))
    pyplot.plot(params,trans)
    pyplot.show()
    
def main():
    _syst=qwr_with_barrier()
    kwant.plot(_syst)
    _syst=_syst.finalized()
    kwant.plotter.bands(_syst.leads[0])

    
if __name__=='__main__':
    main()


Reply via email to