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
24 changes: 23 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-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_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-roworder=auto` (GH-206, driver: a per-half probe between the index order without `mrv` and the bfs order with `mrv`, test-only mutant 21). |
| `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 @@ -466,6 +466,28 @@ r_i and the exhausted blocks) with the ascending label order; (A)-(C) hold for a
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-206 (`-cc-roworder=auto`, `-cc-probe=S` default 0.1 s, `-cc-probe-growth=F` default 0 = one probe per half; `src/cc/cc_driver.{h,cc}`).
*What it adds.* A per-half choice between two exact level searches of the same half: A (input row order, the given
`-cc-rules` without `mrv`) and B (GH-183 reversed-BFS row order, the given rules with `mrv`). A searches from level 1. A
level w that the current search refutes (EMPTY) in a search time t >= T (finder slices excluded) triggers a probe, unless
the half needs no further level (lb >= U): the other search runs the same level w with an abort through the poll hook once
it has used t (the finder does not run during the probe); if it ends EMPTY first, it becomes the current search. T starts
at S and becomes F x t after each probe (F = 0, the default: one probe per half). *Why every verdict stays the same.* (i) A and B are exact level
searches (cc_half.h; GH-162 and GH-183 proofs): under the level precondition "no element of F of weight < w" each decides
correctly whether F has an element of weight w. (ii) The precondition of every later level w' > w is established by the
refutations of the levels < w', whichever exact search produced them, so either search may run level w'. (iii) A probe
never changes a bound: level w is already refuted; an ABORTED probe is discarded; a probe that returns FOUND or
INCONSISTENT after an EMPTY contradicts (i) and stops the run as a trap (RESULT -1 TRAP). (iv) The finder, the dual map,
the stop rule and witness verification are untouched; the poll only gains a deadline test while a probe runs. The time
measurement only selects which exact search runs, so timing noise can change speed, never answers. *Cost.* A probe costs at
most the search time t of its level; re-probes (F >= 1) cost one level each. A probe is
skipped when the half is finished anyway (lb >= U). *Tests* (`make test-cc`): Part B / H driver runs against enumeration
with a probe after every refuted level that always switches (A and B alternate) or never switches, and by time
(threshold 0 s, F = 1 or 0, poll at every node, so the abort path is taken), with the finder on and off and with
`-cc-tbbase=asc`. Test mutant 21: after every refuted level the probe runs level w + 1 with a zero time cap and an
ABORTED probe is taken as a refuted level; it must give wrong answers. `make test-cc-flags`: values, `-v` / `-cc-stats`
probe lines. *Evidence.* `optimization/experiments/GH-206/`.

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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +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-roworder=index\|bfs\|auto` | **(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. `auto` (GH-206): per CSS half, the index order without `mrv` searches first; a refuted level that took at least `-cc-probe=S` seconds (default 0.1) is re-run with the other configuration (bfs order with `mrv`), capped at the first run's time, and the faster one continues; one probe per half by default (`-cc-probe-growth=F` >= 1: re-probes at F times that level's time); no probe once the half is finished (answers unchanged) |
| `-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