Thank you for your very quick answer !

But in my case, the 'true' hamiltonian I need to consider is the one given by 'hamiltonian_submatrix()', and not 'cell_hamiltonian()' which is for an isolated cell ?

Then we agree that my states close to zero energy aren't fake ones ? In that case I don't understand how they appear, I thought this was because of the presence of the fake missalignment.

Furthermore, since 'kwant.system.InfiniteSystem.sites' (here 'haldane_f2.sites' in my script) lives in the same 'space' as 'hamiltonian_submatrix()' (36 sites) and not the unit cell one, how do I recover my plot of the probability density in real space ?
I remember failing to plot this infinite system with the usual 'kwant.plotter.map' function, ending up using the solution that you can see in my script.


De: "Joseph Weston" <joseph.weston08@gmail.com>
À: "alexandre bernard1" <alexandre.bernard1@u-psud.fr>, kwant-discuss@kwant-project.org
Envoyé: Mardi 15 Mai 2018 15:25:59
Objet: Re: [Kwant] Issue with a semi-infinite ribbon

Hi,


Hello,

I encountered an issue when dealing with a semi-infinite ribbon: when defining a 1D translationnal invariance, I end up with a unit cell with unwanted and unexpected additionnal degrees of freedom.

I ran your script an indeed the plotter only plots 24 sites, and when I inspect 'haldane_f2.cell_size' I get 24, as I would expect.


To get the unit cell Hamiltonian you should use the 'cell_hamiltonian()' method of your system; 'inter_cell_hopping()' will get you (unsurprisingly) the inter unit cell Hamiltonian.

In your code you call the 'hamiltonian_submatrix()' method which does *not* (in general) return just the unit cell Hamiltonian, it actually returns all matrix elements for the unit cell Hamiltonian, in addition to matrix elements from the unit cell to the neighboring cell in the direction of the translational symmetry. In your case the first 24 rows/columns of the matrix correspond to the unit cell, and the next 12 correspond to the sites in the next unit cell that are connected to those first 24 sites.

I will freely admit that this is not at all intuitive behaviour! I will open an issue for this on the issue tracker; probably we should emit a warning if someone calls 'hamiltonian_submatrix()' for an infinite system and does not explicitly provide to/from sites.

Happy Kwanting,

Joe