
Dear kwant users, If I want to attach a continuous lead instead of its discrete counterpart to a discrete system, I get the error message 'Use site_family(1, 2) instead of site_family((1, 2))!'. The discrete lead is according to the following prim_vecs=tinyarray.array([(a,0.,0.),(0.,a,0.),(0.,0.,a)]) offset1=tinyarray.array((-0.7, 0.0, 0.0)) lat1=kwant.lattice.Monatomic(prim_vecs, offset1, norbs=no) syst[lat1(0, 0, -1)] = e1*sigma_0 syst[amorphous_lat(0), lat1(0, 0, -1)] = tl*sigma_0 syst[amorphous_lat(N), lat1(0, 0, -1)] = tl*sigma_0 sym = kwant.TranslationalSymmetry([0, 0, -a]) dn_lead = kwant.Builder(sym, conservation_law=-sigma_z) if discrete: sym = kwant.TranslationalSymmetry([0, 0, -a]) dn_lead = kwant.Builder(sym, conservation_law=-sigma_z) dn_lead[lat1(0, 0, -2)] = e1*sigma_0 dn_lead[lat1.neighbors()] = t0*sigma_0 syst.attach_lead(dn_lead) Now if I replace the 'if discrete:' part with the following if continuous: t00=0.0 Leadham = "t00*sigma_0*k_x**2+t00*sigma_0*k_y**2-t0*sigma_0*k_z**2+(2*t0+e1)*sigma_0" template = kwant.continuum.discretize(Leadham grid_spacing=a) dn_lead.fill(template, lat1, lat1(0, 0, -2)) syst.attach_lead(dn_lead) I have to add k_x and k_y with zero coefficient (t00) to solve the symmetry complain (is there a neater way?) where is the error message ('Use site_family(1, 2) instead of site_family((1, 2))!') originated from? Thanks Patrik