You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
examples: correct the bitstring layout and drop stale docs (#14)
The count_dict.json format section in examples/README.md had the spin halves
inverted. It said the first NORB bits are alpha and the last NORB are beta;
qiskit-addon-sqd does the opposite -- _prepare_ci_strings() takes
samples[:, norb:] as alpha and samples[:, :norb] as beta, i.e. the layout is
[beta | alpha]. Anyone building a counts file from that sentence would have
swapped their spin sectors. The error went unnoticed because all three example
bitstrings were (5,5) symmetric and so read the same either way; the first is
now the Hartree-Fock configuration, which is unambiguous. Also documents the
within-half order (orbital 0 is the rightmost bit), which was missing entirely.
Other corrections, all drift from recent merges:
- --samples is no longer uniform random (it draws at the target Hamming
weights), and the text now says plainly that the energy from random
determinants is not meaningful.
- The notebook section still described uniform-random bitstrings plus HF
initial_occupancies and quoted ~-76.19 Ha. It now uses the bundled
count_dict_h2o.json and reaches ~-76.236 Ha.
- Dropped the instruction to install qiskit-addon-sqd from @main, in both the
README and run_sqd_sbd.py's module docstring. The distributed (SPMD) support
is in 0.13.1 -- is_control_process and broadcast are both present in the
release -- which is what pyproject.toml already requires. Dropped the matching
"fork" reference too.
- The lead run_sqd_sbd.py example, in both the README and the docstring, now
passes --counts count_dict_h2o.json rather than relying on random samples, and
the file itself is documented.
- Backend list gained gpu-omp, with a note that it links a different OpenMP
runtime (libnvomp) and is normally its own install. "Both backends" -> all
compiled backends, since there are three.
- Notebook run command uses pytest --nbmake (what CI runs); nbconvert is not a
declared dependency.
Supply your own `count_dict.json` produced by a quantum device or simulator.
111
-
The bitstring length must be `2 × NORB` — e.g. for [`../../vendor/sbd-upstream/data/h2o/fcidump.txt`](../../vendor/sbd-upstream/data/h2o/fcidump.txt) that is NORB=24 (5α+5β electrons).
115
+
Bitstrings whose halves do not hold exactly `num_elec_a` / `num_elec_b` ones are
116
+
dropped by postselection, so a file of uniform-random strings yields nothing
117
+
usable — for H2O only `C(24,5)² / 4²⁴ ≈ 6e-6` of them qualify.
118
+
119
+
[`count_dict_h2o.json`](./count_dict_h2o.json) in this directory is a ready-made
120
+
H2O example: 275 bitstrings taken from the vendored `h2o-1em3-alpha.txt`
121
+
determinant list, giving a 275 × 275 = 75,625-determinant subspace at
0 commit comments