Parameters with default values are quietly ignored by params in wrapped systems
See the example code below. m=0
is default and providing m=1
in params
has no effect. This bug only occurs in wrapped systems, without wraparound
an error is raised for parameters with defaults. This bug occurs both in 1.3.2
and the development version of 1.4.0
.
syst = kwant.Builder(symmetry=kwant.TranslationalSymmetry(*np.eye(2)))
def onsite(site, m=0):
return m
lat = kwant.lattice.square()
syst[lat(0, 0)] = onsite
syst = kwant.wraparound.wraparound(syst)
syst = syst.finalized()
syst.hamiltonian_submatrix(params=dict(k_x=0, k_y=0, m=1))