Some valid leads cannot be finalized
Currently, fundamental domains of symmetries are abused as lead unit cells. This is not only a cosmetic ("graphene ears") and usability problem, but also means that certain valid builders cannot be finalized. IMHO, this issue should be dealt with by implementing enhancement #4. Then, symmetry domains would no longer have observable consequences.
Example code:
from matplotlib import pyplot
import kwant
def make_system(width=10):
a = kwant.lattice.general([(1, 0), (0, 1)], name='a')
b = kwant.lattice.general([(1, 0), (1, 1)], name='b')
sym = kwant.TranslationalSymmetry((-1, 0))
syst = kwant.Builder(sym)
# Uncomment the following to make it work.
# sym.add_site_family(b, [(-1, 1)])
# Layer A
syst[(a(0, i) for i in range(width))] = 0
syst[a.neighbors()] = 1
# Layer B
syst[(b(-i, i) for i in range(width))] = 0
syst[b.neighbors()] = 1
# Inter-layer hopping
syst[((a(0, i), b(-i, i)) for i in range(width))] = 1
return syst
syst = make_system()
syst = syst.finalized() # Fails if line with add_site_family remains commented out.