Hi again,


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.

As far as I can tell from your script, you are trying to calculate some kind of probability density in your system; is this correct?

The method that you are using to do this is incorrect. You cannot just find an eigenvector of the matrix returned by 'hamiltonian_submatrix()', take the square magnitude and say that it's a probability density. The reason is that 'hamiltonian_submatrix()' does not return the full Hamiltonian for infinite systems; it can't do so because the Hamiltonian for infinite systems is infinite in extent!

When calculating eigenstates for infinite systems you have to take advantage of Bloch's theorem and solve the schrodinger equation "one wavevector at a time". This is exactly what 'Bands' does, but unfortunately it does not give you the wavefunctions (not a technical restriction, just a shortsighted design choice on our part).

The problem you actually need to solve is to diagonalize

    H(k) = H + V exp(ik) + V* exp(-ik)

where H is the unit cell Hamiltonian, and V is the inter-cell Hamiltonian. The eigenvectors u of H(k) are defined over a single unit cell, and the wavefunction in unit cell m is

    psi_m = u exp(ikm)

Depending on what exactly you want to calculate in the end (probably these individual probability densities are not your final goal) you may also find the 'modes()' method of your system useful.

Happy Kwanting,

Joe