CuPy also has eigsh and it makes computation much faster, the code should be almost identical to what is alraedy there
if method == 'eigsh':
from scipy.sparse.linalg import eigsh
# Note: uses shift-invert trick for stability finding low-lying states
# Ref: https://docs.scipy.org/doc/scipy/reference/tutorial/arpack.html#shift-invert-mode
eigenvalues, eigenvectors = eigsh(H, k=max_states, which='LM', sigma=min(0, self.E_min))
Simply change the import (and condition) and it should work.
CuPy also has eigsh and it makes computation much faster, the code should be almost identical to what is alraedy there
Simply change the import (and condition) and it should work.