feat: HI-NQS v3 with PT2 selection + PySCF FCI + sparse SCI + FCIDUMP#30
Closed
leo07010 wants to merge 1 commit into
Closed
feat: HI-NQS v3 with PT2 selection + PySCF FCI + sparse SCI + FCIDUMP#30leo07010 wants to merge 1 commit into
leo07010 wants to merge 1 commit into
Conversation
097e533 to
e8b7b40
Compare
## hi_nqs_sqd.py (v3) - PT2 score selection: NQS generates candidates, PT2 ranks, top-k enter basis - Iter 0: diagonal energy ranking, Iter 1: rescore all with PT2 - Eigenvector teacher loss replaces softmax(H_diag) - Configuration recovery removed (NQS enforces particle conservation) - Single-batch solve_fermion (no random subset oscillation) ## fci.py - PySCF direct_spin1.FCI for consistency with solve_fermion ## cipsi.py - Sparse eigsh for basis > 10K (removes dense matrix 10K ceiling) ## hamiltonian_cache.py - Disk cache for SCI/FCI energies to avoid recomputation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e8b7b40 to
898375e
Compare
Member
|
@leo07010 我負責修 你專心 創新、最新的開發 |
13 tasks
Member
|
Superseded by #31, which is a clean reimplementation of the PT2 selection concept from this PR following qvartools conventions (ADR-005). What was kept from this PR:
What was fixed:
Thank you @leo07010 for the algorithmic contribution — all commits include Co-authored-by credit. |
This was referenced Apr 1, 2026
thc1006
added a commit
to thc1006/qvartools
that referenced
this pull request
Apr 2, 2026
- Use α/β marginals for teacher weights (not Cartesian product expansion which caused 76GB memory + 2.5hr runtime) - Add nuclear_repulsion to solve_fermion energy (returns electronic only) - C2H2 verified: -76.0246 Ha (0.004 mHa gap vs PR QuantumNoLab#30 target) Co-authored-by: leo07010 <leo07010@gmail.com>
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.
Summary
HI-NQS v3 (
hi_nqs_sqd.py)|⟨x|H|Φ₀⟩|² / |E₀ - H_xx|, top-k enter basis|c_x|²fromsolve_fermion) replacessoftmax(H_diag)solve_fermion— no random subset oscillationFCI solver (
fci.py)direct_spin1.FCIfor consistency withsolve_fermionSCI solver (
cipsi.py)scipy/CuPy) for basis > 10K configsmatrix_elements_fast10K ceiling that crashed on C2H4 and N2-40QNew files
gpu_sci.py:parallel_solve_fermionusingProcessPoolExecutorhamiltonian_cache.py: SCI/FCI energy disk cache to avoid recomputationfcidump/: [2Fe-2S] CAS(30e,20o) and [4Fe-4S] CAS(54e,36o) integrals from Li & Chan (JCTC 2017)Benchmark results (threshold=1e-8, no basis cap)
v3 achieves equal or better accuracy with fewer basis configs than classical SCI (CIPSI).
Test plan
🤖 Generated with Claude Code