Hi Michael, > I am adding a periodic magnetic field to an infinite wire, where the periods > of the lattice and magnetic field are not the same. > This would appear to be a violation of the part of Bloch's theorem where > $u_k(x)=u_k(x+n.a)$.
Your assessment is correct: to apply Bloch's theorem the Hamiltonian has to have (discrete) translational symmetry. To get meaningful results out you are going to have to ensure that your model is commensurate with the lattice on which you are trying to discretize. In general Kwant does not try to figure out whether your model _does_ actually possess a symmetry; it just takes your word for it. Kwant only evaluates your model on the fundamental domain of the symmetry; this is why it appears to "just work" in your case. Let us know if you need some extra clarification! Happy Kwanting, Joe
