Repository navigation
[Mac agent] CC engine: orbit-compatible even-weight overlap tie-break #162
Description
Hub: #15. Baseline: main 4c3f495c (#158 merged) plus the -cc-aut=on CC default of PR #155 (the branch is rebased onto main once #155 is merged). CC rules on main: excl,pack,orbf,parity,leaf,overlap, -ub-search Stern. PI approval for this round: 2026-10-29.
Goal of the round: cut the even-weight tie of the GH-138 overlap rule soundly, so that fewer nodes survive at the refutation levels of codes with even-weight stabilizer generators (all BB/GB/LP codes and the TN codes with even rows, e.g. TN_200/250/496).
Background
GH-138 prunes a CC node S when |S & g| > floor(|g|/2) for a same-type stabilizer row g (e + g would be lighter than e), and forbids g \ S once |S & g| = floor(|g|/2). For even |g| the tie |e & g| = |g|/2 is not cut: e + g then has the same weight, and cutting both is unsound (mutant 10 in src/cc/cc_half.h). The first(g) tie-break idea (Qubitserf 04b9349, S. Cercelescu, MIT) resolves the tie with a total qubit order: let e be the lex-smallest minimum-weight element of F. If |e & g| = |g|/2 and first(g) is not in e, then e + g has the same weight and is lex-smaller, which contradicts the choice of e. So a search that keeps e reachable may require first(g) in e at every tie. Equivalently, the row g is replaced by g' = g \ {first(g)} with the ordinary limit floor(|g'|/2) = |g|/2 - 1.
The difficulty is that every other CC rule must keep that same lex-min element reachable. In particular, orbf (orbit seeds, earlier orbits forbidden) keeps only orbit-canonical elements.
Proposals
- Orbit-compatible tie-break (
tiebreak). Use the qubit order pi = the orbit seed order: orbits in representative order, each orbit contiguous, representative first (the index order when there are no orbits). Claim: the pi-lex-min element of F_w is orbit-canonical (its first met orbit O_j contains r_j and it avoids O_1..O_{j-1}), and excl, pack, parity, leaf, overlap and the dual map keep every fixed orbit-canonical target reachable. Replace each even row g of K by g \ {first_pi(g)}. - Tie-break only without orbits. Apply the rule only where orbf is idle (index seed rule, any order is compatible). This is safe without new arguments but loses the rule exactly on the symmetric codes (BB/GB/LP) where it matters most.
- Per-seed orders. Use a different order for each orbit seed. This is not selected: the lex-min argument needs one global order per level.
Selection
Proposal 1 as a new -cc-rules token tiebreak (requires overlap), off by default. With the token off, output is byte-identical to the base. -cc-stats reports per-level node counts (and nodes by remaining budget).
Correctness risk: medium. It is the first CC rule that removes elements of F of weight w (not just nodes), so every other rule must keep the one lex-min target reachable. The written proof goes into MODIFICATIONS.md.
Plan
- Tier 0:
- byte identity with the token off (tier0+1
-v,-engine=cc); make test-ccwith every rule subset includingtiebreakvs brute force, over relabeling seeds and planted-symmetry halves;- new mutants that must change answers: the naive tie cut (no first(g) exemption) through the tiebreak path, and first(g) taken in an orbit-incompatible order;
- independent GF(2) witness checks.
- byte identity with the token off (tier0+1
- Tiers 1-4: 5-seed medians vs the base CC, node counts per level.
- Tier 5 (6 h, default seed): BB_360, BB_756, BB_864, BB_1080, the LP codes and the TN codes with even rows (TN_496 etc.). Any raised lower bound on an open code is reported as PLAUSIBLE; no stems are renamed.
- Server: yfclab2 cores 0-23 only, one process per pinned core, 4 GB cap.
Credit (NOTICE / MODIFICATIONS.md / code comments): the first(g) tie-break idea from Qubitserf (github.com/Quantinuum/Qubitserf, commit 04b9349, S. Cercelescu, MIT). Clean-room implementation from the mathematics above; no code copied.
Activity
GH-162: experiment records (order exploration, Tier 0, Tier 1-4 panel…
GH-162: Part T 3000-instance run (768 000 ladders, 0 bad; mutants 17/…
GH-162: Tier 5 results (11 codes, main vs tiebreak, 6 h)
guluchen commentedon Oct 29, 2026
Result (full report in PR #180, data under
optimization/experiments/GH-162/; candidate97c8629vs main6083e662/346d1c6, yfclab2 cores 0-23):-ub-pretiming lines; all CC configs identical).make test-ccPart T 76 800 ladders, 0 bad; 3 000-instance run 768 000 ladders, 0 bad.GH-181: sparsemrv token, flag checks, runner (copied from GH-162)
GH-162: BB_1080 cross-check (relabel seeds 1-3, 8 h): lb 30 each, lev…
guluchen commentedon Oct 29, 2026
BB_1080_4_30to48 lb 32 cross-check: PLAUSIBLE (not reproduced).
Setup: candidate
97c8629withtiebreak, relabelling seeds 1-3 (independent search orders), 28 800 s each, yfclab2 cores 1-3. Data:optimization/experiments/GH-162/S1/xcheck_*(commit 07a12d2).guluchen commentedon Oct 29, 2026
BB_1080_4_30to48 lb 32: REPRODUCED. Same standard as GH-157: same codebase, different search order.
Source: GH-183's Tier 5 runs (PR #204, binary
server-gh183-d26070d,tiebreak,mrvwith-cc-roworder=bfs, one run with-cc-tbbase=asc; logsyfclab2:~/mac-agent-20261009/gh183-runs/tier5/logs/t5.BB_1080_4_30to48.tbmrvbfs{,a}.log). Checked from those logs:The relabelled-seed 1-3 runs from the earlier comment stopped at lb 30 when they hit the 8 h cap, so they do not contradict this result.
Caveat: every one of these runs uses the
tiebreakrule and the same CC code, so the reproduction is independent of the search order but not of the rule's implementation.No stem rename and no merge: the PI decides on
BB_1080_4_32to48. PR #180 body updated.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 main (c94d390, GH-157 charge default) into GH-162 tiebreak
Merge pull request #216 from guluchen/data/cc-lb-stems-20261031
Merge main (39ba87e, stem renames #216) into GH-162 tiebreak
Merge pull request #180 from guluchen/experiment/gh-162-overlap-tiebreak
guluchen commentedon Oct 30, 2026
Merged into main at a516ef0 as opt-in (PI-approved order 2026-10-31).
The
tiebreaktoken stays off by default. The CC default rule set is unchanged:excl,pack,orbf,parity,leaf,overlap,charge.Conflict notes (merge of main c94d390 and 39ba87e into the branch)
Ruleshas bothcharge([Mac agent] CC engine: fractional-charge / edge-cover node lower bounds #157, default on) andtiebreak(opt-in). Both sides were kept in the-cc-rulesparser, the error text, the help text, README and the MODIFICATIONS file table.cc_half.cc: tiebreak's earlier seed construction is kept, and the [Mac agent] CC engine: fractional-charge / edge-cover node lower bounds #157 charge scratch is added after the K rows.-cc-mutantaccepts 0..15, 17, 18. Mutant 16 is still reserved and rejected. No renumbering was needed.tests/test_cc_engine.cc: the tiebreak mask bit moved from 128 (nowcharge) toRM_TB = 256.tiebreak,tiebreak-dual-off-seed1andaut-tiebreaknow use the new default plus tiebreak.tiebreak-mrv-seed2adds charge, and there is a newtiebreak-nochargeconfig.tests/test_cc_flags.sh: new checks that the default rules plus tiebreak are accepted, and of the-vrules line.chargeis added to the list of rules that keep any fixed target reachable.Checks (yfclab2, cores 2-23, 4 GB cap)
make test-ccPASS: Part T 76 800 ladders, 0 bad. Mutant 17: 5152/76 800 wrong. Mutant 18: 160/76 800 wrong. Mutant 15 and mutants 1-14 caught.make test-cc-flagsPASS (460 checks).tiebreak.-vlogs are byte-identical to main c94d390 (time fields masked):-ub-search=off,-cc-statsand-cc-aut=off: 45/45 identical.src/ortests/.Merge GH-162 branch (with main c94d390, GH-157 charge default) into G…
Merge main (a516ef0: GH-162 merge, stem renames #216) into GH-183
Merge GH-183 branch (with GH-162 and main c94d390, GH-157 charge defa…
Merge main (7d91569: GH-162 and GH-183 merges, stem renames #216) into …
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
Merge main (30ce62a: GH-162, GH-183, GH-206 merges) into GH-181