QuantumToolbox.jl icon indicating copy to clipboard operation
QuantumToolbox.jl copied to clipboard

Lanczos-based `spectrum` method

Open matteosecli opened this issue 5 months ago • 3 comments
trafficstars

Checklist

Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.

  • [x] Please read Contributing to Quantum Toolbox in Julia.
  • [x] Any code changes were done in a way that does not break public API.
  • [x] Appropriate tests were added and tested locally by running: make test.
  • [ ] Any code changes should be julia formatted by running: make format.
  • [x] All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.
  • [ ] (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

Lanczos-based spectrum method.

Related issues or PRs

Resolves #463.

Additional context

This PR implements the non-symmetric variant of the Hermitian Lanczos method described in Koch2011.

The pseudo-code for the non-symmetric Lanczos algorithm can be found in Algorithm 6.6 of Saad2011, with the difference that this implementation works directly with row/col vectors (i.e. bras & kets) instead of col vectors only.

At each step, the running estimate for the result is updated via a Wallis-Euler recursion to avoid recomputing the whole continued fraction each time, and the convergence is evaluated accordingly.

matteosecli avatar May 28 '25 16:05 matteosecli