Closed rafael-fuente closed 3 years ago
One easy fix would be to always set sigma
to the minimum value of the potential evaluated on the grid. Using the shift-invert trick with which="LM"
, the solver will find eigenvalues close to sigma
.
Fixed
Code to reproduce:
The problem is that :
eigsh(H, k = max_states, which='LM', sigma=0)
doesn't work with negative eigenvalues.Because
eigsh(H, k = max_states, which='SA')
works with positive eigenvalues, I suggest adding an option to choose the correct solver, or just scaling the potential to be always positive.