import kwant
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
kwant.plot(make_system())