Dear all,
Please help me in correcting the following program which I tried to mimic a
portion of the program on transmission through a quantum well. I tried the
following:

import kwant
import cmath

lat=kwant.lattice.square(1)
sys=kwant.Builder()

def potential(site,pot):
(x,y)=site.pos
if 10 < x< 20:
return pot
else:
return 0
def onsite(site,pot=0):
return potential(site,pot)

print potential(12,0)

Error shown : (x,y)=site.pos; there is no attribute in int (x,y)= site.pos
It is strange that in the original program of the quantum well, I also could not
explain why that program run successfully! because there also no such "pos"
attribute is defined anywhere.

Please bear with my misunderstanding and rectify me with brief tutorial.

K.K.Ghosh
mail: kk_ghosh@rediffmail.com

Get your own FREE website, FREE domain & FREE mobile app with Company email.  
Know More >