lead.modes fails at band opening for 1D chain
When I try to compute the modes close to band opening/closing of a 1D lead I get the error
ValueError: Input a needs to be a square matrix.
This is problematic because
- It only happens with 1D lead (for want I have see)
- Every time I want to compute quantities (transmission, etc) I have to adjust manually the energy ranges to avoid this problem or use try/except
A lead of dimension D
lat = kwant.lattice.square(norbs=1) lead = kwant.Builder(kwant.TranslationalSymmetry((1, 0))) for y in range(D): lead[lat(0, y)] = 4 lead[lat.neighbors()] = -1 l = lead.finalized()
bands = kwant.physics.Bands(l) for e in bands(np.pi): l.modes(e) for e in bands(0): l.modes(e)
I never got any problem for D > 1, it always fails for D = 1.