Skip to content

Commit 29be7e5

Browse files
authored
Drop the HF initial_occupancies seed; ship a curated H2O counts file (#13)
initial_occupancies was passed unconditionally, which is not the inert "insurance" its comment claimed. qiskit_addon_sqd._prepare_ci_strings branches on it: None -> postselect_by_hamming_right_and_left(): keep only the bitstrings that already have the target Hamming weights. provided -> recover_configurations(): take the full noisy set and bit-flip every string toward the target. So supplying it replaced postselection with configuration recovery in every run, including --counts runs. At iteration 1 the only occupancies available are Hartree-Fock (all virtuals exactly 0.0), so the subspace was largely synthesised by bit-flips against a mean-field prior instead of built from sampled configurations. Published SQD postselects at iteration 1 and uses solver-derived occupancies from iteration 2 on, which is what qiskit-addon-dice-solver's test_n2_sbd.py already does. Changes: - run_sqd_sbd.py: drop the HF occupancy block and the initial_occupancies= argument. - run_sqd_sbd.py: the --samples fallback now uses generate_counts_bipartite_hamming() instead of generate_bit_array_uniform(), so generated bitstrings carry the target Hamming weights. Uniform strings are postselected away except near half filling: the survival rate is C(norb,ne)^2 / 4^norb, i.e. 0 of 3000 for H2O (5 of 24) versus 3000 of 3000 with this generator. - Add python/examples/count_dict_h2o.json: 275 bitstrings in [beta | alpha] layout, from the vendored h2o-1em3-alpha.txt list with each alpha half-determinant reused for both spin sectors. Counts are all 1 -- a curated determinant list, not a shot histogram. - Notebook: load that file instead of generating random bitstrings, and drop initial_occupancies. Previously it reached ~-76.2 only because the HF seed pulled uniform-random strings toward HF. Validated (GB200, --device gpu, notebook's settings: samples_per_batch 300, 1 batch, 2 iterations): -76.2359466308 Ha, matching the -76.23594663 that vendor/sbd-upstream/data/h2o/README.md reports for the 1.0e-3 / 275-bitstring / 7.56e4-determinant subspace. All 275 bitstrings survive postselection, so no occupancy seed is required.
1 parent de20370 commit 29be7e5

3 files changed

Lines changed: 320 additions & 33 deletions

File tree

Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
{
2+
"000000000000000000011111000000000000000000011111": 1,
3+
"000000000000000000101111000000000000000000101111": 1,
4+
"000000000000000000110111000000000000000000110111": 1,
5+
"000000000000000000111011000000000000000000111011": 1,
6+
"000000000000000000111101000000000000000000111101": 1,
7+
"000000000000000001001111000000000000000001001111": 1,
8+
"000000000000000001010111000000000000000001010111": 1,
9+
"000000000000000001011011000000000000000001011011": 1,
10+
"000000000000000001011101000000000000000001011101": 1,
11+
"000000000000000001110011000000000000000001110011": 1,
12+
"000000000000000001111001000000000000000001111001": 1,
13+
"000000000000000010001111000000000000000010001111": 1,
14+
"000000000000000010010111000000000000000010010111": 1,
15+
"000000000000000010011011000000000000000010011011": 1,
16+
"000000000000000010011101000000000000000010011101": 1,
17+
"000000000000000010110011000000000000000010110011": 1,
18+
"000000000000000011010101000000000000000011010101": 1,
19+
"000000000000000100001111000000000000000100001111": 1,
20+
"000000000000000100010111000000000000000100010111": 1,
21+
"000000000000000100011011000000000000000100011011": 1,
22+
"000000000000000100011101000000000000000100011101": 1,
23+
"000000000000000100110101000000000000000100110101": 1,
24+
"000000000000000101010011000000000000000101010011": 1,
25+
"000000000000000101011001000000000000000101011001": 1,
26+
"000000000000000110010011000000000000000110010011": 1,
27+
"000000000000000110011001000000000000000110011001": 1,
28+
"000000000000001000001111000000000000001000001111": 1,
29+
"000000000000001000010111000000000000001000010111": 1,
30+
"000000000000001000011011000000000000001000011011": 1,
31+
"000000000000001000011101000000000000001000011101": 1,
32+
"000000000000001000110101000000000000001000110101": 1,
33+
"000000000000001001010011000000000000001001010011": 1,
34+
"000000000000001001011001000000000000001001011001": 1,
35+
"000000000000001010010011000000000000001010010011": 1,
36+
"000000000000001100010011000000000000001100010011": 1,
37+
"000000000000001100010101000000000000001100010101": 1,
38+
"000000000000010000001111000000000000010000001111": 1,
39+
"000000000000010000010111000000000000010000010111": 1,
40+
"000000000000010000011011000000000000010000011011": 1,
41+
"000000000000010000011101000000000000010000011101": 1,
42+
"000000000000010000011110000000000000010000011110": 1,
43+
"000000000000010000100111000000000000010000100111": 1,
44+
"000000000000010000101101000000000000010000101101": 1,
45+
"000000000000010001001011000000000000010001001011": 1,
46+
"000000000000010010000111000000000000010010000111": 1,
47+
"000000000000010010001011000000000000010010001011": 1,
48+
"000000000000010100000111000000000000010100000111": 1,
49+
"000000000000010100001011000000000000010100001011": 1,
50+
"000000000000010100001101000000000000010100001101": 1,
51+
"000000000000011000000111000000000000011000000111": 1,
52+
"000000000000011000100101000000000000011000100101": 1,
53+
"000000000000011001000011000000000000011001000011": 1,
54+
"000000000000011010000011000000000000011010000011": 1,
55+
"000000000000100000001111000000000000100000001111": 1,
56+
"000000000000100000010111000000000000100000010111": 1,
57+
"000000000000100000011011000000000000100000011011": 1,
58+
"000000000000100000011101000000000000100000011101": 1,
59+
"000000000000100000110011000000000000100000110011": 1,
60+
"000000000000100000111001000000000000100000111001": 1,
61+
"000000000000100010010011000000000000100010010011": 1,
62+
"000000000000100010010101000000000000100010010101": 1,
63+
"000000000000100100010011000000000000100100010011": 1,
64+
"000000000000100100011001000000000000100100011001": 1,
65+
"000000000000101000010011000000000000101000010011": 1,
66+
"000000000000110000001011000000000000110000001011": 1,
67+
"000000000000111000000011000000000000111000000011": 1,
68+
"000000000001000000001111000000000001000000001111": 1,
69+
"000000000001000000010111000000000001000000010111": 1,
70+
"000000000001000000011011000000000001000000011011": 1,
71+
"000000000001000000011101000000000001000000011101": 1,
72+
"000000000001000000110101000000000001000000110101": 1,
73+
"000000000001000001010011000000000001000001010011": 1,
74+
"000000000001000001011001000000000001000001011001": 1,
75+
"000000000001000010010011000000000001000010010011": 1,
76+
"000000000001000010011001000000000001000010011001": 1,
77+
"000000000001000100010101000000000001000100010101": 1,
78+
"000000000001001000010101000000000001001000010101": 1,
79+
"000000000001010000000111000000000001010000000111": 1,
80+
"000000000001010000001101000000000001010000001101": 1,
81+
"000000000001100000010011000000000001100000010011": 1,
82+
"000000000001100000011001000000000001100000011001": 1,
83+
"000000000010000000001111000000000010000000001111": 1,
84+
"000000000010000000010111000000000010000000010111": 1,
85+
"000000000010000000011011000000000010000000011011": 1,
86+
"000000000010000000011101000000000010000000011101": 1,
87+
"000000000010000000101011000000000010000000101011": 1,
88+
"000000000010000001000111000000000010000001000111": 1,
89+
"000000000010000001001101000000000010000001001101": 1,
90+
"000000000010000010000111000000000010000010000111": 1,
91+
"000000000010000010001011000000000010000010001011": 1,
92+
"000000000010000010001101000000000010000010001101": 1,
93+
"000000000010000100001011000000000010000100001011": 1,
94+
"000000000010001000001011000000000010001000001011": 1,
95+
"000000000010100000000111000000000010100000000111": 1,
96+
"000000000010100000001101000000000010100000001101": 1,
97+
"000000000011000000001011000000000011000000001011": 1,
98+
"000000000100000000001111000000000100000000001111": 1,
99+
"000000000100000000010111000000000100000000010111": 1,
100+
"000000000100000000011011000000000100000000011011": 1,
101+
"000000000100000000011101000000000100000000011101": 1,
102+
"000000000100000000100111000000000100000000100111": 1,
103+
"000000000100000001001011000000000100000001001011": 1,
104+
"000000000100000010001011000000000100000010001011": 1,
105+
"000000000100000100000111000000000100000100000111": 1,
106+
"000000000100000100001101000000000100000100001101": 1,
107+
"000000000100001000001101000000000100001000001101": 1,
108+
"000000000100010000010101000000000100010000010101": 1,
109+
"000000000100100000001011000000000100100000001011": 1,
110+
"000000000101000000000111000000000101000000000111": 1,
111+
"000000000101000000001101000000000101000000001101": 1,
112+
"000000000110000000010011000000000110000000010011": 1,
113+
"000000001000000000001111000000001000000000001111": 1,
114+
"000000001000000000010111000000001000000000010111": 1,
115+
"000000001000000000011011000000001000000000011011": 1,
116+
"000000001000000000011101000000001000000000011101": 1,
117+
"000000001000000000110101000000001000000000110101": 1,
118+
"000000001000000001010011000000001000000001010011": 1,
119+
"000000001000000001011001000000001000000001011001": 1,
120+
"000000001000000010010011000000001000000010010011": 1,
121+
"000000001000000010011001000000001000000010011001": 1,
122+
"000000001000000100010101000000001000000100010101": 1,
123+
"000000001000001000010101000000001000001000010101": 1,
124+
"000000001000010000000111000000001000010000000111": 1,
125+
"000000001000010000001101000000001000010000001101": 1,
126+
"000000001000100000010011000000001000100000010011": 1,
127+
"000000001000100000011001000000001000100000011001": 1,
128+
"000000001001000000010101000000001001000000010101": 1,
129+
"000000001010000000001011000000001010000000001011": 1,
130+
"000000001100000000000111000000001100000000000111": 1,
131+
"000000001100000000001101000000001100000000001101": 1,
132+
"000000010000000000001111000000010000000000001111": 1,
133+
"000000010000000000010111000000010000000000010111": 1,
134+
"000000010000000000011011000000010000000000011011": 1,
135+
"000000010000000000011101000000010000000000011101": 1,
136+
"000000010000000001010101000000010000000001010101": 1,
137+
"000000010000000010010101000000010000000010010101": 1,
138+
"000000010000000100010011000000010000000100010011": 1,
139+
"000000010000000100011001000000010000000100011001": 1,
140+
"000000010000001000011001000000010000001000011001": 1,
141+
"000000010001000000011001000000010001000000011001": 1,
142+
"000000011000000000010011000000011000000000010011": 1,
143+
"000000100000000000001111000000100000000000001111": 1,
144+
"000000100000000000010111000000100000000000010111": 1,
145+
"000000100000000000011011000000100000000000011011": 1,
146+
"000000100000000000011101000000100000000000011101": 1,
147+
"000000100000000000110011000000100000000000110011": 1,
148+
"000000100000000001010101000000100000000001010101": 1,
149+
"000000100000000010010101000000100000000010010101": 1,
150+
"000000100000000100011001000000100000000100011001": 1,
151+
"000000100000001000010011000000100000001000010011": 1,
152+
"000000100000010000001011000000100000010000001011": 1,
153+
"000000100000100000010101000000100000100000010101": 1,
154+
"000000100001000000010011000000100001000000010011": 1,
155+
"000000100001000000011001000000100001000000011001": 1,
156+
"000000100010000000000111000000100010000000000111": 1,
157+
"000000100010000000001101000000100010000000001101": 1,
158+
"000000100100000000001011000000100100000000001011": 1,
159+
"000000101000000000010011000000101000000000010011": 1,
160+
"000000101000000000011001000000101000000000011001": 1,
161+
"000001000000000000001111000001000000000000001111": 1,
162+
"000001000000000000010111000001000000000000010111": 1,
163+
"000001000000000000011011000001000000000000011011": 1,
164+
"000001000000000000011101000001000000000000011101": 1,
165+
"000001000000000001011001000001000000000001011001": 1,
166+
"000001000000000010010011000001000000000010010011": 1,
167+
"000001000000000010011001000001000000000010011001": 1,
168+
"000001000000000100010101000001000000000100010101": 1,
169+
"000001000000001000010101000001000000001000010101": 1,
170+
"000001000000010000000111000001000000010000000111": 1,
171+
"000001000000010000001101000001000000010000001101": 1,
172+
"000001000000100000010011000001000000100000010011": 1,
173+
"000001000000100000011001000001000000100000011001": 1,
174+
"000001000010000000001011000001000010000000001011": 1,
175+
"000001000100000000000111000001000100000000000111": 1,
176+
"000001000100000000001101000001000100000000001101": 1,
177+
"000001001000000000010101000001001000000000010101": 1,
178+
"000001100000000000011001000001100000000000011001": 1,
179+
"000010000000000000001111000010000000000000001111": 1,
180+
"000010000000000000010111000010000000000000010111": 1,
181+
"000010000000000000011011000010000000000000011011": 1,
182+
"000010000000000000011101000010000000000000011101": 1,
183+
"000010000000000000100111000010000000000000100111": 1,
184+
"000010000000000000101101000010000000000000101101": 1,
185+
"000010000000000010001011000010000000000010001011": 1,
186+
"000010000000000100000111000010000000000100000111": 1,
187+
"000010000000000100001101000010000000000100001101": 1,
188+
"000010000000001000001101000010000000001000001101": 1,
189+
"000010000000010000010101000010000000010000010101": 1,
190+
"000010000000100000001011000010000000100000001011": 1,
191+
"000010000001000000000111000010000001000000000111": 1,
192+
"000010000001000000001101000010000001000000001101": 1,
193+
"000010000010000000010011000010000010000000010011": 1,
194+
"000010000010000000011001000010000010000000011001": 1,
195+
"000010001000000000000111000010001000000000000111": 1,
196+
"000010100000000000001011000010100000000000001011": 1,
197+
"000011000000000000000111000011000000000000000111": 1,
198+
"000100000000000000001111000100000000000000001111": 1,
199+
"000100000000000000010111000100000000000000010111": 1,
200+
"000100000000000000011011000100000000000000011011": 1,
201+
"000100000000000000011101000100000000000000011101": 1,
202+
"000100000000000001000111000100000000000001000111": 1,
203+
"000100000000000001001101000100000000000001001101": 1,
204+
"000100000000000010000111000100000000000010000111": 1,
205+
"000100000000000010001101000100000000000010001101": 1,
206+
"000100000000000100001011000100000000000100001011": 1,
207+
"000100000000001000001011000100000000001000001011": 1,
208+
"000100000000010000010011000100000000010000010011": 1,
209+
"000100000000010000011001000100000000010000011001": 1,
210+
"000100000000100000001101000100000000100000001101": 1,
211+
"000100000001000000001011000100000001000000001011": 1,
212+
"000100000010000000010101000100000010000000010101": 1,
213+
"000100000100000000010011000100000100000000010011": 1,
214+
"000100001000000000001011000100001000000000001011": 1,
215+
"000100100000000000000111000100100000000000000111": 1,
216+
"000101000000000000001011000101000000000000001011": 1,
217+
"000110000000000000010011000110000000000000010011": 1,
218+
"001000000000000000001111001000000000000000001111": 1,
219+
"001000000000000000010111001000000000000000010111": 1,
220+
"001000000000000000011011001000000000000000011011": 1,
221+
"001000000000000000011101001000000000000000011101": 1,
222+
"001000000000000000110101001000000000000000110101": 1,
223+
"001000000000000001010011001000000000000001010011": 1,
224+
"001000000000000001011001001000000000000001011001": 1,
225+
"001000000000000010010011001000000000000010010011": 1,
226+
"001000000000000100010101001000000000000100010101": 1,
227+
"001000000000001000010101001000000000001000010101": 1,
228+
"001000000000100000010011001000000000100000010011": 1,
229+
"001000000000100000011001001000000000100000011001": 1,
230+
"001000000100000000000111001000000100000000000111": 1,
231+
"001000010000000000011001001000010000000000011001": 1,
232+
"001000100000000000010011001000100000000000010011": 1,
233+
"001010000000000000000111001010000000000000000111": 1,
234+
"001100000000000000001011001100000000000000001011": 1,
235+
"010000000000000000001111010000000000000000001111": 1,
236+
"010000000000000000010111010000000000000000010111": 1,
237+
"010000000000000000011011010000000000000000011011": 1,
238+
"010000000000000000011101010000000000000000011101": 1,
239+
"010000000000000001010011010000000000000001010011": 1,
240+
"010000000000000001011001010000000000000001011001": 1,
241+
"010000000000000010010011010000000000000010010011": 1,
242+
"010000000000000010011001010000000000000010011001": 1,
243+
"010000000000000100010101010000000000000100010101": 1,
244+
"010000000000001000010101010000000000001000010101": 1,
245+
"010000000000010000000111010000000000010000000111": 1,
246+
"010000000000010000001101010000000000010000001101": 1,
247+
"010000000000100000010011010000000000100000010011": 1,
248+
"010000000010000000001011010000000010000000001011": 1,
249+
"010000000100000000000111010000000100000000000111": 1,
250+
"010000001000000000010101010000001000000000010101": 1,
251+
"010000010000000000010011010000010000000000010011": 1,
252+
"010000100000000000010011010000100000000000010011": 1,
253+
"010001000000000000010101010001000000000000010101": 1,
254+
"010010000000000000000111010010000000000000000111": 1,
255+
"010100000000000000001011010100000000000000001011": 1,
256+
"100000000000000000001111100000000000000000001111": 1,
257+
"100000000000000000010111100000000000000000010111": 1,
258+
"100000000000000000011011100000000000000000011011": 1,
259+
"100000000000000000011101100000000000000000011101": 1,
260+
"100000000000000000111001100000000000000000111001": 1,
261+
"100000000000000001010101100000000000000001010101": 1,
262+
"100000000000000010010101100000000000000010010101": 1,
263+
"100000000000000100010011100000000000000100010011": 1,
264+
"100000000000000100011001100000000000000100011001": 1,
265+
"100000000000001000011001100000000000001000011001": 1,
266+
"100000000000010000001011100000000000010000001011": 1,
267+
"100000000000100000010101100000000000100000010101": 1,
268+
"100000000001000000010011100000000001000000010011": 1,
269+
"100000000010000000000111100000000010000000000111": 1,
270+
"100000000100000000001011100000000100000000001011": 1,
271+
"100001000000000000010011100001000000000000010011": 1,
272+
"100001000000000000011001100001000000000000011001": 1,
273+
"100010000000000000001011100010000000000000001011": 1,
274+
"100100000000000000000111100100000000000000000111": 1,
275+
"101000000000000000010011101000000000000000010011": 1,
276+
"110000000000000000010011110000000000000000010011": 1
277+
}

0 commit comments

Comments
 (0)