Hi,

> And how can I set lead1's potential correctly? What is wrong in my script
> zigzag.py? I have the same function onsite both for scattering region and
> for leads:
> 
>     def *potential*( site, _U ):
>         x, y = site.pos
>         return _U if x >= 0 else 0
> 
>     def *onsite*( site, _U=0 ):
>         return eps + *potential*( site, _U )
> 
>     syst = kwant.Builder()
> 
>     syst[graphene.shape(stripe, (0,0))] = *onsite*
> 
> ***
>     sym1 = kwant.TranslationalSymmetry(graphene.vec((2, -1)))
>     def lead1_shape(pos):
>         x, y = pos
>         return abs(y) <= 0.5*_W
> 
>     lead1 = kwant.Builder(sym1)
>     lead1[graphene.shape(lead1_shape, (0, 0))] = *onsite*

There is a warning in the second tutorial about this [1].  This comes
from the fact that the lead Hamiltonian is evaluated at the lead's
fundamental domain, which is centered around the origin.

To correct this you should set the lead onsites as:

    def lead0_onsite(site, _U=0):
        return eps

    def lead1_onsite(site, _U=0):
        return eps + _U


Happy Kwanting,

Joe


[1]: 
https://kwant-project.org/doc/1/tutorial/tutorial2#spatially-dependent-values-through-functions

Attachment: signature.asc
Description: PGP signature

Reply via email to