Hello Kwant community,
Given a square lattice Hamiltonian, I am trying to put a rectangular sample along an oblique direction to the x,y axes of the underlying square lattice, i.e., the rectangular sides are along new rotated X,Y axes. One can fix the site at the origin (0,0) in the rotation. I have done this successfully using commensurate rotation angles in the following code. The comments in the code explain in detail. The sample looks like this (https://www.dropbox.com/s/2rd9bjbd7ataosy/lattice_fig.pdf?dl=0).
Then I would like to attach leads along the new X-axis (just normally connect to the rectangular sample that doesn't need adding extra sites). I put the translation symmetry rotated to X and confine the lead shape in Y. I expected the lead would just connect to the sample with the interface in Y direction. However, many extra sites are added and the interface is rendered in the old y direction, although the lead does extend in X. The code below attaches only one lead in order to contrast the interface and the opposite unaffected sample edge. The system looks like this (https://www.dropbox.com/s/3wj6r2ws5ev20p5/lattice_fig0.pdf?dl=0).
So the question is how to attach leads in the expected way. Thanks!