|
Ran
|
Jobs
1
|
Files
7
|
Run time
1min
|
Badge
README BADGES
|
push
github
Document that sci_solver receives sorted CI strings (#423) (#424) diagonalize_fermionic_hamiltonian has always sorted the CI strings of each subspace before calling sci_solver, in _apply_shape_constraints, but the sci_solver contract never said so. A solver that maps a flat eigenvector back onto determinants depends on that order. The Fulqrum guide already relies on it: it reshapes the eigenvector against its own sorted basis, and is correct only because the strings arrive sorted. Make the ordering part of the documented interface so a solver can rely on it, and add tests that pin it. The existing suite does notice when the sort is removed, but only as numerical drift -- a spin_square mismatch in the third decimal place and an energy-ordering assertion -- which is indistinguishable from the seed sensitivity those tests already carry. Also document the ordering as a precondition of solve_sci and solve_sci_batch, which take ci_strings directly. PySCF's selected_ci locates excitations by binary search, so unsorted strings there give a variationally wrong energy with no error raised. Assisted-by: Claude Opus 5 (cherry picked from commit 2a77c7449) Co-authored-by: Jim Garrison <garrison@ibm.com>
735 of 802 relevant lines covered (91.65%)
0.92 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 40537996610.1 | 7 |
91.65
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|