You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sparse eigenvalue solver uses "shift-invert" mode to find the eigenvalues closest to zero. This involves solving for shifted eigenvalues w' = 1.0 / (w - s), where w are the original eigenvalues and s is the shift. We use zero for the shift, which causes a division by 0 when an eigenvalue is exactly 0, which isn't that rare.
This is something that the user can work around, usually by adding a constant term onto the input Hamiltonian - the dynamics aren't changed by a global phase rotation. That's not a particularly satisfying solution, though. Dense matrix algebra is immune to this problem, because the routines are far more robust, and safely calculate all the eigenvalues. This is impractical for large matrices.
Because the error happens inside the ARPACK routines, there is no ZeroDivisionError to be caught. The code throws a RuntimeError, but the entire routine fails and there seems to be no way to recover the other eigenvalues.
The text was updated successfully, but these errors were encountered:
The sparse eigenvalue solver uses "shift-invert" mode to find the eigenvalues closest to zero. This involves solving for shifted eigenvalues
w' = 1.0 / (w - s)
, wherew
are the original eigenvalues ands
is the shift. We use zero for the shift, which causes a division by 0 when an eigenvalue is exactly 0, which isn't that rare.This is something that the user can work around, usually by adding a constant term onto the input Hamiltonian - the dynamics aren't changed by a global phase rotation. That's not a particularly satisfying solution, though. Dense matrix algebra is immune to this problem, because the routines are far more robust, and safely calculate all the eigenvalues. This is impractical for large matrices.
Because the error happens inside the ARPACK routines, there is no
ZeroDivisionError
to be caught. The code throws aRuntimeError
, but the entire routine fails and there seems to be no way to recover the other eigenvalues.The text was updated successfully, but these errors were encountered: