Skip to content

engineering: integrate CASSCF orbital optimization into molecule registry (+80 mHa one-shot) #47

@thc1006

Description

@thc1006

TL;DR

N2 reference systems use HF (RHF) canonical orbitals by default. Switching to CASSCF-optimized orbitals lowers ground-state energy by ~80 mHa for the same active space, with no algorithmic change. Required for fair comparison against published SQD/NQS-SCI work that uses CASSCF orbitals.

Evidence

System HF orbital best CASSCF orbital best Δ
N2-CAS(10,20) HCI gold -109.21473 -109.30609 86 mHa
N2-CAS(10,20) HI-NQS-SQD -109.21460 -109.29549 81 mHa

Source: nano4 historical bench_orbital_fair_163794.log (job 163794, 2026-04-13)

Why removed/missing

qvartools/molecules/registry.py builds Hamiltonians directly from PySCF SCF integrals — never invokes CASSCF orbital rotation. SCI baseline (-109.21034) shipped as reference is the HF-orbital SCI, not the gold standard.

Literature support

Proposal

Add orbital_basis: "rhf" | "casscf" field to MOLECULE_REGISTRY entries. When casscf:

  1. Run PySCF CASSCF preprocessing (cache result) — typical wall ~7000s for CAS(10,20)
  2. Use CASSCF MO coefficients to rotate one- and two-electron integrals
  3. Build MolecularHamiltonian from rotated integrals
"n2-cas(10,20)": {
    "factory": _make_n2_cas_10_20,
    "orbital_basis": "casscf",   # NEW; default "rhf" for compat
    "casscf_cache_path": "~/.cache/qvartools/casscf/n2_cas_10_20.npz",
}

Impact

  • Direct +80 mHa improvement on N2 benchmarks
  • Required to compare with GTNN-SCI, ADAPT-QSCI, Robledo-Moreno SQD
  • Without this, qvartools pipelines are systematically worse than published baselines by ~80 mHa

Effort: 1 week

  • PySCF CASSCF wrapper + caching
  • Integral rotation
  • Registry field + factory updates
  • Migration tests on H2/BeH2/NH3 (small) before scaling to 40Q

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions