Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds configurable pre-screening and ERI screening thresholds to the native (C++) SCF and Cholesky Hamiltonian construction paths, with corresponding documentation updates.
Changes:
- Introduces
shell_pair_threshold(overlap-based shell-pair pre-screening) and wires it through SCF settings/config into the Libint2 direct ERI implementation. - Uses configurable
eri_threshold(instead of hardcoded machine epsilon) for Schwarz-based screening in Libint2 direct J/K builds, quarter transforms, and Cholesky decomposition ERI evaluation. - Updates user docs and logging to reflect the new/renamed thresholds.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/source/user/comprehensive/algorithms/scf_solver.rst | Documents shell_pair_threshold and clarifies eri_threshold wording in SCF settings table |
| docs/source/user/comprehensive/algorithms/hamiltonian_constructor.rst | Documents eri_threshold for the Cholesky Hamiltonian constructor settings |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/src/scf/scf_impl.cpp | Logs both eri_threshold and shell_pair_threshold during SCF initialization |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/src/eri/LIBINT2_DIRECT/libint2_direct.h | Extends LIBINT2_DIRECT constructor to accept the new thresholds |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/src/eri/LIBINT2_DIRECT/libint2_direct.cpp | Implements shell-pair pre-screening threshold and applies eri_threshold to screening decisions |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/src/eri/eri.cpp | Passes thresholds from SCFConfig into LIBINT2_DIRECT construction |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/int1e.h | Updates comment wording to “overlap-based” pre-screening |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/scf.h | Adds shell_pair_threshold to ERIConfig |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf.hpp | Adds shell_pair_threshold to public SCF settings defaults/constraints |
| cpp/src/qdk/chemistry/algorithms/microsoft/scf.cpp | Plumbs shell_pair_threshold from settings into SCFConfig |
| cpp/src/qdk/chemistry/algorithms/microsoft/cholesky_hamiltonian.hpp | Adds eri_threshold setting for Cholesky Hamiltonian constructor |
| cpp/src/qdk/chemistry/algorithms/microsoft/cholesky_hamiltonian.cpp | Applies configurable eri_threshold to Schwarz screening during Cholesky vector construction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+882
to
+887
| bool use_atomics, double eri_threshold, | ||
| double shell_pair_threshold) | ||
| : ERI(scf_orbital_type, eri_threshold, basis_set, _mpi), | ||
| eri_impl_(libint2::direct::ERI::make_libint2_direct_eri( | ||
| scf_orbital_type == SCFOrbitalType::Restricted ? 1 : 2, basis_set, | ||
| use_atomics)) { | ||
| use_atomics, shell_pair_threshold, eri_threshold)) { |
Comment on lines
203
to
207
| } | ||
| ms_scf_config->eri.use_atomics = _settings->get<bool>("eri_use_atomics"); | ||
| ms_scf_config->eri.shell_pair_threshold = | ||
| _settings->get<double>("shell_pair_threshold"); | ||
| ms_scf_config->k_eri = ms_scf_config->eri; |
| // Use Cholesky Decomposition | ||
| double cholesky_tol = _settings->get<double>("cholesky_tolerance"); | ||
| double eri_tol = _settings->get<double>("eri_threshold"); | ||
|
|
Comment on lines
+45
to
+46
| * @param eri_threshold ERI screening threshold for skipping negligible | ||
| * shell quartets during J/K builds (default: 1e-10) |
| * - ``shell_pair_threshold`` | ||
| - float | ||
| - ``1e-12`` | ||
| - Overlap-based shell pair pre-screening threshold. Shell pairs with overlap norm below this value are excluded. |
📊 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.
Resolves issue #326