Add stabilized SCF#520
Open
nabbelbabbel wants to merge 6 commits into
Open
Conversation
MarcoEckhoff
reviewed
Jun 8, 2026
MarcoEckhoff
reviewed
Jun 8, 2026
MarcoEckhoff
reviewed
Jun 8, 2026
MarcoEckhoff
reviewed
Jun 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “stabilized SCF” solver implementation that wraps a standard SCF run with stability analysis and iterative reruns, exposed for both the native QDK backend and the PySCF plugin, with accompanying docs and tests.
Changes:
- Register and expose a new native
qdk_stabilizedSCF solver (plus aliases) in C++ and Python bindings. - Add a new PySCF plugin solver
pyscf_stabilizedthat uses PySCF’smf.stability(...)workflow to rerun unstable solutions. - Extend unit tests and user documentation to cover the new stabilized solver variants.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| python/tests/test_scf.py | Validates new factory names/aliases and adds a passthrough run test for qdk_stabilized. |
| python/tests/test_pyscf_plugin.py | Asserts registration/creation and default settings for pyscf_stabilized. |
| python/src/qdk_chemistry/plugins/pyscf/scf_solver.py | Refactors PySCF SCF run into helper methods and adds PyscfStabilizedScfSolver + settings. |
| python/src/qdk_chemistry/plugins/pyscf/init.py | Registers the new PySCF stabilized solver in the plugin loader. |
| python/src/qdk_chemistry/algorithms/scf_solver.py | Re-exports the new QdkStabilizedScfSolver binding. |
| python/src/qdk_chemistry/algorithms/init.py | Exposes QdkStabilizedScfSolver from the algorithms package. |
| python/src/pybind11/algorithms/scf.cpp | Binds QdkStabilizedScfSolver to Python. |
| docs/source/user/comprehensive/algorithms/stability_checker.rst | Points users to the new stabilized SCF workflows. |
| docs/source/user/comprehensive/algorithms/scf_solver.rst | Documents qdk_stabilized and pyscf_stabilized factory names and usage. |
| docs/source/_static/examples/python/scf_solver.py | Updates example output expectations for available SCF solver names. |
| cpp/tests/test_scf.cpp | Updates factory expectations and adds tests for stabilized SCF behavior. |
| cpp/src/qdk/chemistry/algorithms/scf.cpp | Registers the stabilized SCF solver as a default factory instance. |
| cpp/src/qdk/chemistry/algorithms/microsoft/stabilized_scf.hpp | Declares the native stabilized SCF solver and settings. |
| cpp/src/qdk/chemistry/algorithms/microsoft/stabilized_scf.cpp | Implements the stabilized SCF workflow (stability check → orbital rotation → rerun). |
| cpp/src/qdk/chemistry/algorithms/microsoft/CMakeLists.txt | Adds the new stabilized SCF source file to the build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
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.
Adds single algorithm stabilized SCF implementation for