Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Hamiltonian construction for systems using effective core potentials (ECPs) by ensuring ECP one-electron contributions (and ECP-adjusted nuclear charges) are incorporated into the AO core Hamiltonian before transforming to the active-space Hamiltonian. This addresses the incorrect/unstable energies reported in issue #446.
Changes:
- Update both the standard and Cholesky Hamiltonian constructors to (1) use the ECP-adjusted internal molecule associated with the internal basis set and (2) add ECP one-electron integrals to
H_core. - Add a Python regression test validating that Mo/def2-svp produces stable, expected one-electron integral magnitudes for both constructors.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/tests/test_ecp_hamiltonian.py | Adds regression coverage ensuring ECP terms are reflected in returned one-electron integrals. |
| cpp/src/qdk/chemistry/algorithms/microsoft/hamiltonian.cpp | Uses internal_basis_set->mol (ECP-adjusted charges) and adds ecp_integral into H_full. |
| cpp/src/qdk/chemistry/algorithms/microsoft/cholesky_hamiltonian.cpp | Mirrors the same ECP handling fixes in the Cholesky-based Hamiltonian constructor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #446