Add the ability to checkpoint configuration recovery - #348
Open
mcbennet wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These changes introduce the ability to checkpoint configuration recovery and should close #233.
Key Changes:
Added an
initial_stateargument todiagonalize_fermionic_hamiltonianto accept a previously savedSCIState.Abstracted
_extract_carryover_stringsto extract high-weight alpha and beta bitstrings frominitial_stateto seed the next iteration. Important note, I refactored the carryover extraction to usenp.nonzeroinstead ofnp.argsortandnp.searchsorted. This reduces the thresholding step from O(NlogN) to O(N).Included a quick fix to
docs/guides/integrate_fulqrum.ipynb. The CI was failing because a recent update to fulqrum removed theverbose=Falseargument fromto_csr_linearoperator_fast()(see qiskit-community/fulqrum@60bc326).Testing
Testing environment:
Added a test that verifies interrupting then resuming via
initial_stateproduces the same mathematical progression as a continuous run.Added test for new
_extract_carryover_stringshelperAll test/ unittests pass
Ruff formatting and linting pass