Skip to content

Adding restart for non converging Krylov algorithm#223

Merged
a-quelle-pasqal merged 26 commits intomainfrom
kb/krylov_on_steroids
Mar 9, 2026
Merged

Adding restart for non converging Krylov algorithm#223
a-quelle-pasqal merged 26 commits intomainfrom
kb/krylov_on_steroids

Conversation

@kbidzhiev
Copy link
Contributor

@kbidzhiev kbidzhiev commented Feb 20, 2026

Summary

This PR updates the Lanczos implementation to use a residual-minimizing restart strategy for DMRG only. After each iteration the algorithm evaluates the residuals of the candidate vectors, selects the vector with the smallest residual, and restarts the search from that vector.

What changed

  • Added residual-based selection across the current set of candidate vectors.
  • Modified the restart logic so the next Lanczos run begins from the best (lowest-residual) vector instead of continuing from the last generated vector.
  • Updated the iteration flow to support “pick-best-and-restart” without altering the external API/inputs.

exhaustive guide to numerical errors etc in Lanczos algo
Lectures on Lanczos with detail study of residual
https://www.stat.uchicago.edu/~lekheng/courses/302/demmel/demmch7.pdf

@kbidzhiev kbidzhiev marked this pull request as ready for review February 26, 2026 15:54
Copy link
Contributor

@a-quelle-pasqal a-quelle-pasqal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add the literature, I'm especially interested in the justification for
resid = (beta * y[-1]).abs() # == norm(op(ritz_vec) - ritz_value * ritz_vec)

@kbidzhiev
Copy link
Contributor Author

Please also add the literature, I'm especially interested in the justification for resid = (beta * y[-1]).abs() # == norm(op(ritz_vec) - ritz_value * ritz_vec)

see Saad (1), Prop. 6.8 (Ch. 6, p. 131).

(1) Numerical Methods for Large Eigenvalue Problems, Y. Saad.
https://epubs.siam.org/doi/book/10.1137/1.9781611970739

elmerhej
elmerhej previously approved these changes Mar 2, 2026
@kbidzhiev
Copy link
Contributor Author

Please also add the literature, I'm especially interested in the justification for resid = (beta * y[-1]).abs() # == norm(op(ritz_vec) - ritz_value * ritz_vec)

done in the comments in the code and in the head of the file

@elmerhej
Copy link
Contributor

elmerhej commented Mar 9, 2026

LGTM

Copy link
Contributor

@a-quelle-pasqal a-quelle-pasqal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@a-quelle-pasqal a-quelle-pasqal merged commit 93fe1c6 into main Mar 9, 2026
12 checks passed
@a-quelle-pasqal a-quelle-pasqal deleted the kb/krylov_on_steroids branch March 9, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants