Closed dking072 closed 9 months ago
Since users or callers may potentially input model states in any arbitrary order, lassi first implicitly permutes the basis functions to block-diagonalize the Hamiltonian. Said permutation involves calling python set
on lists of quantum numbers which will tend to result in different Hilbert spaces getting addressed in a more-or-less arbitrary order. This wouldn't be a problem if I correctly inverted the permutation before returning, but here I goofed and just used the permutation index vector itself instead of its inverse. Anyway hopefully 8e76434 fixes it.
OP is, to my knowledge, the only person who has ever actually attempted to use LASSI with a model space spanning more than one whole-molecule Hilbert space, which is quite a strange feature and I don't remember why I thought it was important. So this bug shouldn't have affected anyone else.
Pulling dev fixes this, thanks!
With many fragments/rootspaces, for the civecs_lassi returned with the code below:
lsi = lassi.LASSI(las) energies_lassi, civecs_lassi = lsi.kernel()
the ordering of the rows of this matrix do not correspond to the ordering of the las states in las.e_states