Skip to content

[Mac agent] CC engine: MRV branching and BFS row order on top of tiebreak #183

Open

Description

@guluchen

Hub: #15. Stacked on #162 (rule tiebreak, PR #180, not merged).

Hypothesis

With overlap,tiebreak, the CC engine still branches on the lowest-index odd row and scans odd rows for the packing bound in file row order. Two branching-row changes should cut the search tree on the BB codes, and the gain should grow with code size:

  1. MRV (the existing mrv token): branch on the odd row with the fewest free candidates. A smaller branching factor at every depth compounds over the level.
  2. Seed-anchored reversed-BFS row order: renumber the rows of H by a BFS over the Tanner graph that starts from the rows of the first seed qubit, then reverse the order (rows far from the seed first, rows next to the seed last). The new index drives both the greedy packing scan (which disjoint odd rows are found) and the MRV tie-break (lowest index among rows with equal candidate count).

Change

  • Part A, no new code: measure -cc-rules=excl,pack,orbf,parity,leaf,overlap,tiebreak,mrv against the same set without mrv.
  • Part B: new flag -cc-roworder=index|bfs (default index, byte-identical to the current output). bfs is a pure relabelling of the rows inside each half search, the same kind of change as the row relabelling of -cc-seed. Also a test-only variant of the tiebreak base order (-cc-tbbase=desc|asc, default desc).

Soundness

  • The choice of the branching odd row is free in the exactness argument (cc_half.h (2): every odd row of S contains a qubit of e \ S), and every rule's proof, including tiebreak's lex-min argument, keeps an arbitrary fixed target reachable under any choice.
  • The packing bound holds for any scan order (any family of pairwise-disjoint candidate sets of odd rows is a lower bound).
  • A row permutation changes no syndrome, candidate set or stabilizer row; the tiebreak base order may be any total order once the seed and the exhausted blocks come first.

Plan

Tier 0 (brute-force oracle over rule subsets x seeds x roworder x mrv, byte identity with defaults, GF(2) witnesses, a mutant BFS order that drops a row), Tiers 1-4 seed-median panel vs main CC and vs the GH-162 tiebreak configuration, Tier 5 (6 h) on the large BB codes, the LP codes and TN codes. yfclab2 cores 28-43, one pinned process per core, 4 GB cap.

Credit: the reversed-BFS row ordering idea is from Qubitserf 04b9349 (S. Cercelescu, MIT); clean-room implementation.

Activity

  1. added 2 commits that reference this issue on Oct 29, 2026
  2. guluchen commented on Oct 29, 2026

    @guluchen
    OwnerAuthor

    Result: PR #204 (do not merge before the PI says merge).

    • Tier 0: PASS. Part R oracle: 384k ladders at default size and 2.56M at 2,000 instances, 0 bad. Mutants 19 and 20 are caught. Identity with [Mac agent] CC engine: orbit-compatible even-weight overlap tie-break #162 holds, the GF(2) witnesses check out, and the flag tests pass.
    • Tiers 2-4: geomean vs main 0.611 / 0.593 / 0.400; vs tb 0.655 / 0.590 / 0.436; no cell above 1.0.
    • Tier 1: a process-floor tie. Every arm, including tb, is 1.7 % above main in a repeated measurement.
    • Tier 5, BB: BB_756 and BB_864 reach lb 32. BB_1080 reaches lb 32 in 2.7x less time than tb but not 34. At equal levels: BB_360 to BB_1080 take 0.29-0.40x tb's time; TN_496 0.38x, reaching lb 24.
    • Tier 5, LP and row-weight-9 TN: LP codes are 1.2-3x slower. TN_252 takes 1.17x longer and TN_288 ends one lb lower (21 vs 22).
    • The new lower bounds are PLAUSIBLE only; stems are unchanged.
    • Recommendation: not an unconditional default. Next step is a per-half probe (-cc-roworder=auto).
  3. added a commit that references this issue on Oct 30, 2026
  4. guluchen commented on Oct 30, 2026

    @guluchen
    OwnerAuthor

    Cross-check of the PLAUSIBLE lower bounds: REPRODUCED (9/9 runs)

    Setup:

    • Same frozen binary (d26070d) and configuration that found the bounds: -cc-rules=excl,pack,orbf,parity,leaf,overlap,tiebreak,mrv -cc-roworder=bfs.
    • Relabeled seeds -seed=1..3, which give a different qubit and row order and different orbit representatives.
    • 28800 s per run; yfclab2 cores 24-32, one pinned process per core, 4 GB cap.
    Code Bound Seed 1 Seed 2 Seed 3 Verdict
    BB_756_16_30to34 >= 32 12334 s 12360 s 12924 s REPRODUCED
    BB_864_4_30to40 >= 32 10797 s 11645 s 11084 s REPRODUCED
    TN_496_2_23to30 >= 24 12393 s 9640 s 11147 s REPRODUCED
    • Every level each run searched ended EMPTY, with no trap, withdrawn bound or science problem.
    • On the BB halves every column weight is odd, so the parity rule skips odd levels and level 30 EMPTY certifies 32.
    • This is an independent search order of the same implementation. Stems are not renamed; that needs the PI.
    • Records: optimization/experiments/GH-183/S3_xcheck/ (commit a8e4532).
  5. added 6 commits that reference this issue on Oct 30, 2026
  6. guluchen commented on Oct 30, 2026

    @guluchen
    OwnerAuthor

    Merged into main at 7d91569 as opt-in (PI-approved order 2026-10-31).

    -cc-roworder still defaults to index and mrv stays off. The CC default rule set is unchanged: excl,pack,orbf,parity,leaf,overlap,charge.

    Retarget and conflicts

    Checks (yfclab2, cores 2-23, 4 GB cap)

    • make test-cc: PASS.
      • Part R: 384 000 ladders, 0 bad.
      • Mutant 19: 9088/28 800 wrong. Mutant 20: 4656/28 800 wrong.
      • Part T and mutants 15, 17 and 18 are still caught.
    • make test-cc-flags: PASS (485 checks).
    • Tier 0+1 answers equal the stems: 15/15 with the CC default and 15/15 with -cc-rules=excl,pack,orbf,parity,leaf,overlap,charge,tiebreak,mrv -cc-roworder=bfs.
    • With the flags off, the tier 0+1 -v logs are byte-identical to main a516ef0:
      • -ub-search=off, -cc-stats and -cc-aut=off: 45/45.
      • CC default: 13/15. The other 2 differ only in the time-sliced ub-search finder lines.
    • GitHub CI passed.
  7. added 4 commits that reference this issue on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions