Repository navigation
[Mac agent] CC engine: redundant sparse checks and XOR unit propagation #181
Description
Hub: #15. Baseline: main 6083e662 (CC defaults excl,pack,orbf,parity,leaf,overlap, -cc-aut=on, -ub-search Stern). PR #161 (charge, GH-157) and PR #180 (tiebreak, GH-162) are open and not merged; this round is independent of both (an optional combined run with tiebreak is reported if the merge is easy).
Goal of the round: strengthen the CC node lower bound and add a cheap propagation step, aimed at the TN codes whose pack bound is weak (4-cycles make odd rows share candidates).
Background
At a CC node S (target weight w) every odd row h of the half's parity checks H needs a qubit of e \ S for every extension e in F, because h.e = 0. pack greedily selects odd rows with pairwise disjoint candidate sets; |S| + p > w prunes. Every vector r in the row space of H also satisfies r.e = 0 for every e in ker H, so a redundant row r = h1 + h2 can be used exactly like an original row wherever the argument only needs "r.e = 0 for every e in ker H". Low-weight pair sums give more, smaller odd-row neighbourhoods. A second, independent observation: a row (original or redundant) that is currently even and has exactly one free qubit q left forces q out of every extension (adding q would make the row odd with nothing left to repair it), and an odd row with exactly one free qubit forces that qubit in. Neither step is covered by the current rules (pack looks only at odd rows; leaf only at remaining budget 1-2; overlap only at stabilizer rows).
Proposals
- Redundant sparse checks (
sparse). Per half, add the distinct pair sums r = h1 + h2 of rows of H with |r| <= max(|h1|, |h2|) (deduplicated against H and each other; deterministic order; a count cap). Use them inpack(after the original odd rows, so the packing can only grow), inmrvbranching (branching on an odd redundant row is complete), and inxorunit(below). Not used in the leaf lookup, the parity rule or the syndrome-free test, which keep the original H. Overlap: rows of H are stabilizers of the other type, so H-derived rows are NOT valid overlap rows (that is mutant 9). The valid analogue is a pair sum of two same-type stabilizer rows g1 + g2 (still in ker H with G(g1 + g2) = 0); it may be added to the overlap row set K with its own limit floor(|g1 + g2| / 2), as a separate token (sparseov) with separate counters. - XOR unit propagation (
xorunit). At each node, to a fixpoint: an even row with exactly one free qubit forbids that qubit for the subtree; an odd row with exactly one free qubit is branched on first (a single child); an odd row with no free qubit is a dead end. Rows: H, plus the redundant rows whensparseis on. Chains with the overlap forbids (a tight stabilizer row can leave an even row with one free qubit). Soundness follows from H e = 0 alone: every element of F of weight w that extends S and avoids the forbidden set keeps those properties. - Exact edge cover at small degree. When every free qubit meets at most two odd rows, the minimum hitting set is a minimum edge cover (Gallai). Not selected for this round: it overlaps with [Mac agent] CC engine: fractional-charge / edge-cover node lower bounds #157 (
charge).
Selection
Proposals 1 and 2 as new -cc-rules tokens sparse, sparseov and xorunit, off by default. With the tokens off, output is byte-identical to the base. -cc-stats reports per-level node counts and the new counters (redundant rows added per half, packing rows contributed by redundant rows, unit forbids, forced branchings, unit conflicts).
Correctness risk: low to medium. The redundant rows must lie in the row space of H (checked at construction: each one is the XOR of two named rows); the unit rule must never fire on an even row as a forcing rule.
Plan
- Tier 0:
- byte identity with the tokens off (tier0+1
-v,-engine=cc, plus-no-card/-card-mto); make test-ccwith every rule subset including the new tokens vs brute force, over relabeling seeds;- new mutants that must change answers: (a) a redundant row outside the row space of H (one bit flipped); (b)
xorunitforcing on an even row; (c) a redundant overlap row from H instead of K; - independent GF(2) witness checks.
- byte identity with the tokens off (tier0+1
- Tiers 1-4: 5-seed medians vs main CC, node counts per level. Rows are expected only where pair sums stay sparse (TN codes with mixed row weights such as TN_200 and TN_250, the open TN_496_2_23to30, and a few tier-0 codes);
xorunitalone applies everywhere. - Tier 5 (6 h, default seed): TN_496_2_23to30 and every other code where rows are added, main CC alongside on the same server. Any raised lower bound on an open code is reported as PLAUSIBLE; no stems are renamed.
- Server: yfclab2 cores 4-23 only, one process per pinned core, 4 GB cap.
Credit (NOTICE / MODIFICATIONS.md / code comments): Qubitserf (github.com/Quantinuum/Qubitserf, commit 04b9349, S. Cercelescu, MIT), augment_sparse_checks (pair-XOR redundant checks); Puchert and Tillmann, arXiv:2004.03387 (redundant parity-check cuts); Okada and Kasai, cpm-ldpc-distance (forced unit). Clean-room implementation from the mathematics above; no code copied.
Activity
GH-181 WIP: CC rules sparse, sparseov, xorunit (opt-in)
GH-181 WIP: sparse pack scan by weight class; redundant rows ordered …
GH-181: sparsemrv token, flag checks, runner (copied from GH-162)
GH-181: two instantiations of the search (no GH-181 work on halves wi…
GH-181: pair_sums counts row overlaps first (no per-pair allocation; …
GH-181: docs (MODIFICATIONS, NOTICE, README) and experiment records (…
GH-181: Tier 5 records (TN_496 main vs candidate, two relabelled cros…
guluchen commentedon Oct 29, 2026
Results: PR #203 (branch
experiment/gh-181-cc-sparse-rows, records inoptimization/experiments/GH-181/). Not merged; waiting for the PI.Candidate:
-cc-rules=excl,pack,orbf,parity,leaf,overlap,sparse,sparseov,sparsemrv. All tokens are opt-in and default off.sparsemrvwas added during the round: fewest-candidate branching over H and the redundant rows, only on halves where rows were added. It is the largest single lever.make test-ccpasses, including the new Part X: 576 000 ladders, 0 bad.test-cc-flags: 426 checks pass.xorunit: reject. It saves at most 11 % of nodes and runs 1.3-1.5x slower.tiebreak(scratch merge, CC engine: orbit-compatible even-weight overlap tie-break (GH-162, opt-in; do not merge before PI says merge) #180): TN_250 0.067x, BB_288 0.76x.Server cores 4-23 are free again.
GH-181: TN_496 lb 27 cross-check (sparse alone, sparse+tiebreak merge…
guluchen commentedon Oct 30, 2026
Cross-check of TN_496_2_23to30 lb 27: REPRODUCED. Details: PR #203, section 7a;
optimization/experiments/GH-181/XC27/.Setup: 8 h per run (
-cpu-lim=28800), cores 4-9, one pinned process per core, 4 GB cap. Each configuration differs from the run that found lb 27 (sparse,sparseov,sparsemrv, seeds 0/1/2).sparsealone, seeds 3 and 4: lb 25 / 25. Levels 1-24 EMPTY.sparse,sparseov,sparsemrv,tiebreak, from a different binary (scratch merge with the [Mac agent] CC engine: orbit-compatible even-weight overlap tie-break #162 code), seeds 0 and 3: lb 27 / 27, reached at 11 864 s and 10 739 s. Levels 1-26 EMPTY.sparse,sparsemrvwithout sparseov, seeds 3 and 4: lb 26 / 26. Levels 1-25 EMPTY.None of the six runs printed a FOUND, INCONSISTENT, TRAP or error line, and the upper bound stays 30.
Caveat: all runs are DistQLDPC's CC engine; (b) differs in binary, overlap rule and search order. The stem is not renamed; the PI decides. Cores 4-23 are free.
Rename eight tier5 stems with GH-157/GH-162/GH-183/GH-181 CC lower bo…
Rename eight tier5 stems with GH-157/GH-162/GH-183/GH-181 CC lower bo…
Merge pull request #216 from guluchen/data/cc-lb-stems-20261031
Merge GH-206 stack (GH-162, GH-183, GH-206 and main c94d390 with GH-157…
Merge main (a516ef0: GH-162 merge, stem renames #216) into GH-181
GH-181 merge: restore the closing fi of the GH-206 flag section
Merge main (30ce62a: GH-162, GH-183, GH-206 merges) into GH-181
Merge pull request #203 from guluchen/experiment/gh-181-cc-sparse-rows
guluchen commentedon Oct 30, 2026
Merged into main at 02879a9 as opt-in (PI-approved order 2026-10-31).
sparse,sparseov,sparsemrvandxorunitare still off by default. The CC default rule set is unchanged:excl,pack,orbf,parity,leaf,overlap,charge. The TN_496 stem was already renamed by #216 (TN_496_2_27to30).Mutant renumbering
GH-181's mutants 19/20/21 clashed with GH-183's 19 and 20 and with GH-206's 21. They are now:
-cc-mutantaccepts 0..15 and 17..24. All IDs are unique.Conflict notes (main, with GH-157/162/183/206, merged into the branch)
Rulesand the-cc-rulesparser keep both sides. The rules string order is...,overlap,tiebreak,sparse,sparseov,sparsemrv,xorunit,mrv,charge.cc_half:E) are kept. The [Mac agent] CC engine: orbit-compatible even-weight overlap tie-break #162 tiebreak helpers are now templates too.tb_setmoves, now goes throughblk_up/blk_down. This keeps thexorunitfree counts exact.ovtightxis also counted on the tiebreak path.expand<E>and uses H's rows only.sparsemrvandmrv: the combination is accepted and behaves exactly likemrv, becausemrvwithsparsealready branches over H and R on every half. Neither token's meaning changed. The-vline already says "on (mrv is on everywhere)". README, help text and MODIFICATIONS document this.argv[7], becauseargv[3]is Part G.charge,tiebreakand the bfs row order.test_cc_flags.shgets a new section 7j with the combinations, including-cc-roworder=auto.Checks (yfclab2, cores 3-23, 4 GB cap)
make test-cc: PASS.make test-cc-flags: PASS (545 checks).-cc-rules=excl,pack,orbf,parity,leaf,overlap,charge,sparse,sparseov,sparsemrv;tiebreak.+sparse,sparseov,sparsemrv; plustiebreak; plustiebreakwith-cc-roworder=auto; and plustiebreak,mrvwith-cc-roworder=bfs.-vlogs are byte-identical to main (which has the same default path):-ub-search=off,-cc-statsand-cc-aut=off: 45/45 identical.