Sharedsupport / 2014-12-23-kwant.htmlOpen in CoCalc
Examples for support purposes...
2014-12-23-kwant

Quantum transport simulations made easy

http://kwant-project.org/

In [2]:
import kwant
In [3]:
lat = kwant.lattice.honeycomb()
a, b = lat.sublattices

def make_system(r=8, t=-1, tp=-0.1):

    def circle(pos):
        x, y = pos
        return x**2 + y**2 < r**2

    sys = kwant.Builder()
    sys[lat.shape(circle, (0, 0))] = 0
    sys[lat.neighbors()] = t
    sys.eradicate_dangling()
    if tp:
        sys[lat.neighbors(2)] = tp

    return sys
In [4]:
kwant.plot(make_system())
Out[4]:
In [1]:
 
In []: