Basis permutation of a quantum Hamiltonian matrix (source code)

= Basis permutation of a quantum Hamiltonian matrix

Reordering an orthonormal basis changes its matrix by a permutation similarity transformation. The off-diagonal block can move to different row and column indices without changing any <energy eigenvalue>. Matrix entries must therefore be compared in the same declared basis order, not only by their visual positions.