Reading determinants back from an external SCI solver: the format and index convention are unfixed
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
Read python/unrestricted_FCIDUMP.py, ci_to_mps.as_dets, and examples/python/mps/04-guess_from_determinants.py to trace the existing determinant conventions and chain constraints. Add format adapters that feed one internal converter, starting with SBD/Dice dets text, then gate the round trip with tests/python/test_unrestricted_fcidump.py. Done means the converted chain’s energy matches the same wavefunction contracted by PySCF, including index, phase, frozen-core, and orbital-order conventions.
Written by the indexing model from the issue text.
Description
The starting-guess round trip is half built. Outbound has a module: python/unrestricted_FCIDUMP.py
writes the active space for an external SCI solver. Inbound has nothing — the step from that
solver's determinant output to something ci_to_mps.as_dets accepts is currently the caller's
problem, with no fixed format and no documented target convention.
What has to be pinned
Each of these is a silent wrong energy if guessed, not a crash:
- Index convention.
unrestricted_FCIDUMP._interleavedwrites2*p + spin + 1— SBD's
_UHFindexing, spin alternating one spatial orbital at a time, deliberately not the
Qiskit-fermions contiguous-alpha-then-beta block. So determinants come back over2*ncas
interleaved spin-orbitals, while our internal currency isncasspatial occupations
0/1/2/3= empty/alpha/beta/doubly. Nothing folds one into the other. - Coefficient convention.
as_detsexpects PySCF's spin-grouped ordering (alla+then all
b+) and before the Li 2021 Eq. 13 phase, whichci_encodingapplies. A list that arrives
already phased, or in the solver's own ordering, converts without complaint. - Normalization. Accepted either way —
from_cifolds the norm into site 0 — so an
unnormalized list is not an error but shows up incanonical_error()[0]and nowhere else. - Frozen core.
ci_to_dets/cisd_detstakencore=; a solver's determinants may or may not
include it. - Orbital order. Determinants name orbitals, the chain names sites. With
reorderactive the
permutation must be passed (dets_to_chain(..., order=)) so the fermionic sign is carried;
dropping it leaves every dimension right and moves the energy by ~1e-1 Ha. - The last-bond constraint. The final orbital must appear in all four occupations across the
list, ormps_env_isometriesrefuses the chain (see
examples/python/mps/04-guess_from_determinants.py). A truncated CI can easily violate this.
Shape
One adapter per input format, all funnelling into one converter to the internal encoding — the
same "one internal currency" split ci_guess already uses, so every format shares the tests
below it. Formats worth having: SBD/Dice dets text, and whatever else we actually feed it.
Home: beside the outbound half rather than in ci_to_mps. This is I/O and a convention, not MPS
algebra, and unrestricted_FCIDUMP.py is already the module that owns "the format an external
SCI solver speaks".
Gate it as a round trip: write an active space out, read a determinant file back, convert,
and check the energy of the resulting chain against the same wavefunction contracted by pyscf.
That is the only check that sees an index-convention error — tests/python/test_unrestricted_fcidump.py
already gates the outbound half that way.
Related: #34 (MPS storage, whose MPS half is #36). This is the CI/determinant path, not the MPS
file format.
- Dominant language
- C++
- Stars
- 3
- Forks
- 0
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 31
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Algorithmiq/exa-dmrg
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Algorithmiq/exa-dmrg#153 ·
Maintainers usually reply within 2 days
-
Add CITATION.cff once the paper is outPossibly taken @FabioTarocco claimed this 2 days ago. Opendocumentation request
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Algorithmiq/exa-dmrg#106 · 2 assignees ·
Maintainers usually reply within 2 days
-
bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
Algorithmiq/exa-dmrg#161 ·
Maintainers usually reply within 2 days
-
bug cpp
Difficulty 5/5 Over a week Newbie friendliness 35/100
Algorithmiq/exa-dmrg#157 ·
Maintainers usually reply within 2 days
-
Shorten the tests of the wheels in cibuildwheelPossibly taken @robertodr claimed this 1 day ago. Openci request
Algorithmiq/exa-dmrg#155 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
All issues in Algorithmiq/exa-dmrg
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simnJS/AnyPS5#735 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-format
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Niko1221/Strata#7719 · 1 comment ·
Maintainers usually reply within 4 days
-
area:tests kind:test
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day