Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise SparsePauliOp.from_operator #11557

Merged
merged 4 commits into from
Oct 31, 2024

Commits on Oct 29, 2024

  1. Optimise SparsePauliOp.from_operator

    This rewrites the `from_operator` handling (again!) from the initial
    Rust implementation of the recursive matrix-addition form into an
    iterative approach that re-uses the same scratch memory all the way
    down.  This is significantly faster, and allocates far less often,
    although in practice the peak heap memory usage will be not dissimilar.
    
    The algorithm is rewritten to be a manual stack-based iteration, rather
    than a functional recursion.  The size of a single stack entry in the
    iteration is one `usize`, which is drastically smaller than whatever
    per-function-call stack will have been used before.
    jakelishman committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    3392e6c View commit details
    Browse the repository at this point in the history
  2. Improve documentation

    jakelishman committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    e2a97e4 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. Configuration menu
    Copy the full SHA
    c07e17e View commit details
    Browse the repository at this point in the history
  2. Increase test coverage

    jakelishman committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    80a3e87 View commit details
    Browse the repository at this point in the history