Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion MODIFICATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Optional engine, off by default (PI 2026-10-16): enable with `-engine=cc` (or `-

| File | Description |
|------|-------------|
| `cc_half.h`, `cc_half.cc` | Exact connected-cluster (CC) level search for one CSS half (Dumer, Kovalev, Pryadko 2017): clusters grown from a seed along one odd parity row at a time; syndrome-free clusters below the level are dead ends (a nontrivial one is reported as an inconsistency); rules `excl` (sibling exclusion), `pack` (disjoint odd-row packing bound), `orbf` (orbit seeds from the GH-85 verified per-half orbits, replacing the index rule), `mrv` (fewest-candidate branching), `parity` (GH-133: odd levels skipped on a half whose column weights are all odd; per-node parity check), `leaf` (GH-133: Zobrist hash from column to qubit; the closing qubit is looked up at budget 1, and at budget 2 each candidate is completed by one lookup), `overlap` (GH-138: a minimum logical meets every same-type stabilizer row g in at most floor(\|g\|/2) qubits; incremental counters, the rest of a tight row is forbidden); uint64 bitsets with an incremental syndrome; `-cc-seed` relabeling; test-only mutants 1-3 (1 forbidden set not restored, 2 packing prune `>=`, 3 orbit seed rule off by one) and 5-7 (5 parity forced on a half with an even column weight, 6 leaf budget off by one, 7 leaf closure without the detector check) and 8-10 (GH-138: 8 overlap limit off by one, 9 parity checks used as stabilizer rows, 10 even-weight tie cut); GH-157 (default rule since 2026-10-29): `charge` (raised local-degree LP-dual charge node lower bound, exact integers), evaluation gates `-cc-lb-minr`, `-cc-lb-gap`, `-cc-lb-auto`, `-cc-lb-raise`, mutant 15 (charge inflated); `tiebreak` (GH-162, opt-in, needs `overlap`: the even-weight tie \|e & g\| = \|g\|/2 is cut unless first(g) is in e, in a per-seed qubit order that puts the seed first; the first(g) tie-break idea of Qubitserf 04b9349, S. Cercelescu, MIT, re-derived from the mathematics, no code copied) with test-only mutants 17 (naive tie cut through the tiebreak path) and 18 (order without the seed first). |
| `cc_half.h`, `cc_half.cc` | Exact connected-cluster (CC) level search for one CSS half (Dumer, Kovalev, Pryadko 2017): clusters grown from a seed along one odd parity row at a time; syndrome-free clusters below the level are dead ends (a nontrivial one is reported as an inconsistency); rules `excl` (sibling exclusion), `pack` (disjoint odd-row packing bound), `orbf` (orbit seeds from the GH-85 verified per-half orbits, replacing the index rule), `mrv` (fewest-candidate branching), `parity` (GH-133: odd levels skipped on a half whose column weights are all odd; per-node parity check), `leaf` (GH-133: Zobrist hash from column to qubit; the closing qubit is looked up at budget 1, and at budget 2 each candidate is completed by one lookup), `overlap` (GH-138: a minimum logical meets every same-type stabilizer row g in at most floor(\|g\|/2) qubits; incremental counters, the rest of a tight row is forbidden); uint64 bitsets with an incremental syndrome; `-cc-seed` relabeling; test-only mutants 1-3 (1 forbidden set not restored, 2 packing prune `>=`, 3 orbit seed rule off by one) and 5-7 (5 parity forced on a half with an even column weight, 6 leaf budget off by one, 7 leaf closure without the detector check) and 8-10 (GH-138: 8 overlap limit off by one, 9 parity checks used as stabilizer rows, 10 even-weight tie cut); GH-157 (default rule since 2026-10-29): `charge` (raised local-degree LP-dual charge node lower bound, exact integers), evaluation gates `-cc-lb-minr`, `-cc-lb-gap`, `-cc-lb-auto`, `-cc-lb-raise`, mutant 15 (charge inflated); `tiebreak` (GH-162, opt-in, needs `overlap`: the even-weight tie \|e & g\| = \|g\|/2 is cut unless first(g) is in e, in a per-seed qubit order that puts the seed first; the first(g) tie-break idea of Qubitserf 04b9349, S. Cercelescu, MIT, re-derived from the mathematics, no code copied) with test-only mutants 17 (naive tie cut through the tiebreak path) and 18 (order without the seed first); `-cc-roworder=index|bfs` (GH-183, default index: the internal row order, i.e. the packing scan order and the `mrv` tie-break, is a reversed BFS over the Tanner graph from the rows of the first seed; a row relabeling; the reversed-BFS row ordering idea of Qubitserf 04b9349, S. Cercelescu, MIT, re-implemented, no code copied) and `-cc-tbbase=desc|asc` (GH-183, test variant of the tiebreak base order) with test-only mutants 19 (the bfs order drops a row) and 20 (no BFS restart). |
| `cc_ubsearch.h`, `cc_ubsearch.cc` (GH-140, GH-146) | Randomized low-weight logical finder for one CSS half (`-ub-search`): random information sets (random column order, Gauss-Jordan elimination of H with pivots in that order, systematic kernel basis), words of 1-2 (optionally 3) systematic basis vectors below a weight threshold, detector check (G c != 0), greedy local improvement by same-type stabilizer rows; deterministic per seed; test mutant 11 (no detector check and no improvement). GH-146 collision mode (`-ub-isd`): Stern / Dumer collision step with Canteaut-Chabaud pivot swaps (`cc_swap`, `isd_round`, `iterate_isd`), parser `parse_isd`. |
| `cc_aut.h`, `cc_aut.cc` (GH-152) | Candidate automorphisms for `-cc-aut=on`: colour refinement to the coarsest equitable partition of the coloured Tanner graph (qubits, rows of each class), individualisation of one vertex and lockstep refinement of a source and a target partition (McKay 1981, written from the published description), backtracking over the first non-singleton cell, edge-checked vertex maps; orbit computation by union-find from the first vertex of the smallest qubit cell (complete when that vertex's point stabiliser is trivial), one class-exchanging (swap) map; deterministic work counters. Candidates only: every map is GF(2)-verified by the wrapper before use. |
| `cc_driver.h`, `cc_driver.cc` | Driver: start-up detector check (rank[H;G] + rank S = n and commutation), both halves interleaved level by level (cheaper half first) or one half under a verified XZ-dual map, stop rule (a hit at level w ends the run once the other half's lower bound is >= w), anytime `TRY`/`LB`/`UB`/`RESULT` lines, witness verification (H e = 0, independent GF(2) rank test against the same-type stabilizers, dual image check), its own check of the XZ-dual map (pi(rs Hz) = rs Hx and pi(rs Hx) = rs Hz), always-on traps (`RESULT -1 TRAP`, never a value; earlier bounds withdrawn), optional `-ub-basis`, `-cc-trace`, `-cc-stats`; test-only sequential schedule (`-cc-schedule=sequential`) and driver mutant 4 (stop rule without the other half's lower bound, run under the sequential schedule). |
Expand Down Expand Up @@ -441,6 +441,31 @@ whole even row, no exemption; it removes both e and e + g). 18: no seed-first ex
the `-cc-stats` node counts per level (and `ovtight`/`ovforbid`) against the same run without the token.
*Evidence.* `optimization/experiments/GH-162/REPORT.md`.

GH-183 (`-cc-roworder=index|bfs`, default `index`; `-cc-tbbase=desc|asc`, default `desc`; `src/cc/cc_half.{h,cc}`). The
reversed-BFS row ordering idea is from Qubitserf (github.com/Quantinuum/Qubitserf, commit 04b9349, S. Cercelescu, MIT);
implemented from its description, no Qubitserf code was copied. *What it changes.* Each half search gives the nonempty
rows of H internal indices. With `index` they keep the input order (after the `-cc-seed` relabeling). With `bfs` the
order is a breadth-first search over the Tanner graph started from the rows of the qubit with relabeled label 0 (the
first seed: the smallest member of the first orbit, or qubit 0 under the index rule), each row expanded through its
qubits (ascending label) to their rows (ascending index), restarted from the lowest unreached row until every row is
reached, and then reversed. The internal index is used in exactly two places: the order in which `pack` scans the odd
rows (which pairwise-disjoint rows the greedy finds) and the tie-break of `mrv` (lowest index among the odd rows with
the fewest free candidates). *Why every verdict stays the same.* The order is a permutation of the rows: syndromes,
candidate sets, columns, detector rows and stabilizer rows are the same sets under new names. (i) `pack`: any family of
odd rows with pairwise-disjoint candidate sets needs one qubit of e \ S per row (cc_half.h (2)), so |S| + p > w prunes
correctly for every scan order; the no-candidate dead end does not depend on the order. (ii) The branching odd row is
free in (2): every odd row of S contains a qubit of e \ S, so the branch over the candidates of ANY odd row keeps e
reachable. Every rule's argument keeps an arbitrary fixed weight-w target reachable under any choice of the branching
row (excl: the first candidate in e is kept; overlap: every weight-w element meets the limits; leaf: lookups; parity:
counts), and tiebreak's (A)-(C) are statements about qubit orders and stabilizer rows K, not about rows of H. (iii) The
leaf rule's Zobrist keys are assigned per internal row index; a key is a filter before the exact column test, so only
collisions (never verdicts) can differ. It is the same kind of change as the row shuffle of `-cc-seed`, which the
oracle tests already cover. `-cc-tbbase=asc` replaces the descending base order of tiebreak's per-seed orders pi_i (after
r_i and the exhausted blocks) with the ascending label order; (A)-(C) hold for any total order with r_i first.
*Mutants (must fail; `make test-cc` Part R).* 19: the bfs order drops its last row (a row of the seed); 20: the BFS is
not restarted, so rows unreachable from the seed are dropped. Both ignore rows of H and are caught by the half-level
oracle (invalid witnesses or wrong levels) and by the rows-used check. *Evidence.* `optimization/experiments/GH-183/`.

GH-148 (`-stab-overlap=off|on|auto`, split MaxSAT path, `src/core/distqldpc.cc`; default `auto` since the PI's adoption decision, `off` = the previous search). *What it adds.* Extra
hard constraints in the half instance of `build_css_half`: for each verified row g, |x & g| <= floor(|g|/2). *Why every
probe answer stays the same.* The half instance is F_h = {x : Hpar x = 0, Glog x != 0} (see GH-144 (1)). Each used
Expand Down
2 changes: 2 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Modified files (partial list): Solver.h, Solver.cc
per-seed qubit orders that make it compatible with DistQLDPC's orbit
seeds, and the proof, are DistQLDPC's (MODIFICATIONS.md, GH-162).

The CC option -cc-roworder=bfs (GH-183) uses the reversed-BFS row ordering idea of Qubitserf 04b9349 (S. Cercelescu, MIT); re-implemented from scratch, no code copied.

The original MaxCDCL engine remains under MIT. All upstream copyright
and permission notices in src/solver/ must be preserved in copies and
substantial portions, per the MIT license.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ The distance definition, Pauli weight and output format are unchanged.
| `-cc-dual=on\|off` | **(experimental)** With a verified XZ-dual map, CC searches only the X half (default `on`; `-dualmode=off` also disables it) |
| `-cc-aut=on\|off` | **(experimental, GH-152; default `on` since 2026-10-28, PI; `-cc-aut=off` restores the previous CC search)** CC engine only. Tanner-graph automorphism candidates: individualisation-refinement on the coloured Tanner graph (qubits, Hx rows, Hz rows) proposes extra qubit permutations for the orbit seeds and one map exchanging Hx and Hz for the single-half search. Every candidate must pass the same GF(2) checks as the built-in family before it is used. Gives orbit seeds on TN codes the built-in family misses (e.g. TN_288/324/432/540/576, TN_200, TN_250) and a dual map on the LP codes and TN_496; on every other bundled code the CC search is unchanged (identical node counts). Detection takes at most 11 ms. The MaxSAT path never uses it |
| `-ub-basis[=on\|off]` | **(experimental, CC only)** Emit the minimum weight of the verified logical basis rows as an initial upper bound (default on; `-ub-basis=off` disables it) |
| `-cc-roworder=index\|bfs` | **(experimental, GH-183)** Internal row order of each CC half search, used as the packing scan order and the `mrv` tie-break (default `index` = input order). `bfs` = reversed breadth-first order over the Tanner graph from the rows of the first seed (rows far from the seed first); a row relabeling, so answers are unchanged. The reversed-BFS row ordering idea is from Qubitserf 04b9349, S. Cercelescu, MIT. `-cc-tbbase=desc\|asc` (test variant, default `desc`) sets the `tiebreak` base order |
| `-cc-seed=N` | **(experimental, testing)** Deterministic relabeling of qubits and rows for CC (default 0 = identity), for seed-median timing; alias of `-seed=N` for the CC engine (both given with different values is an error) |
| `-cc-trace=FILE` | **(experimental)** One line per finished (half, level): half, level, `EMPTY`/`FOUND`, nodes, seconds, witness support |
| `-cc-stats` | **(experimental)** Per-level CC node counts (printed also without `-v`) |
Expand Down
Loading
Loading