Skip to content

CC engine: orbit-compatible even-weight overlap tie-break (GH-162, opt-in; do not merge before PI says merge) - #180

Merged
guluchen merged 7 commits into
mainfrom
experiment/gh-162-overlap-tiebreak
Oct 30, 2026
Merged

guluchen merged 7 commits into
mainfrom
experiment/gh-162-overlap-tiebreak

Conversation

@guluchen

@guluchen guluchen commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes nothing yet; issue #162, hub #15. Do not merge before the PI says merge.

The report below is the GH-162 REPORT. My tool setup blocked writing optimization/experiments/GH-162/REPORT.md; all raw data, scripts and tables it cites are committed under optimization/experiments/GH-162/.

GH-162: orbit-compatible even-weight overlap tie-break (tiebreak)

  • Baseline: main 6083e662. Its CC sources are identical to 346d1c68 (PR Make -cc-aut=on the CC default (GH-152; do not merge before PI says merge) #155 -cc-aut=on; PR Rename six tier5 TN stems with GH-152 CC lower bounds #163 is data only). The main arm runs frozen server-main-346d1c6 (sha256 6c1dfb3c…).
  • Candidate: 97c8629 (frozen server-gh162-97c8629, sha256 3ea51003…).
  • Server: yfclab2 cores 0-23 only (cores 4, 14 and 21 were left out while other users ran there), one process per pinned core, 4 GB cap. Nothing was timed on the Mac.
  • Credit: the first(g) tie-break idea is from Qubitserf 04b9349 (S. Cercelescu, MIT). It was re-derived from the mathematics; no Qubitserf code was copied. No external solver was used.

Summary

Item Result
What New -cc-rules token tiebreak (default off; acts with overlap). While seed r_i is searched, each even stabilizer row g is counted on g minus first_i(g), with limit |g|/2 - 1. first_i uses a per-seed order: r_i, then the earlier orbits' qubits, then descending label.
Soundness Per-seed lex-min argument (MODIFICATIONS.md GH-162; cc_half.h). excl, pack, parity, leaf, mrv and overlap keep any fixed weight-w target reachable. Only the seed rule constrains the target, and the lex-least element in an order that starts with the seed is a target of that seed.
Default path Byte-identical on tier0+1 -v, 8 configs x 15 codes: 118/120. The 2 exceptions are MaxSAT -ub-pre progress lines (time-sliced finder, as in GH-152). All -ub-pre=off and CC configs are identical, including -cc-aut=off.
Tier 0 PASS. make test-cc: new Part T 76 800 ladders, 0 bad; tiebreak driver configs in Parts B/H, 0 bad. Part T with 3 000 instances: 768 000 ladders, 0 bad. Mutants 17 and 18 caught. test-cc-flags 417/417. Answers 184/184. 108 witnesses GF(2)-checked.
Tier 1 / 2 / 3 / 4 0.959 / 0.928 / 0.992 / 0.927, max cell 1.000. PASS. Tier 1 is at the process floor with identical node counts.
Tier 5 (6 h) BB_360 0.40x time. BB_756/864/1080 reach lb 30 in 0.37 / 0.36 / 0.24x of main's time. BB_1080_4_30to48: lb 32 at 19 378 s (main: 30). REPRODUCED by GH-183's Tier 5 runs (different branching order, same codebase): lb 32 at 7 127 s and 6 739 s. The 8 h relabelled-seed runs here stopped at lb 30. TN_496 0.75x. LP 0.98-1.03 (idle).

Scientific semantics changed: no (opt-in pruning rule with a proof). PI action required: yes.

1. Proposals

  1. Selected: orbit-compatible tie-break.
  2. Tie-break only without orbits. Loses BB/GB/LP.
  3. Per-seed orders. The issue dismissed this, but that was wrong: the argument works with a different order for each seed, provided each order starts with its seed. The candidate implements per-seed orders, which contain proposal 1 as a special case.

2. Why it is sound (short)

Seeds r_1, r_2, … have blocks O_1, O_2, … (orbits or single qubits). O_1..O_{i-1} are forbidden while r_i runs.

  • (A) Let j be the smallest index for which some weight-w element contains r_j and avoids O_<j. Then every weight-w element avoids O_<j; otherwise an automorphism would move it to a smaller index.
  • (B) Fix any order pi_j that starts with r_j, and let e* be the pi_j-lex-least weight-w element. Then e* contains r_j and avoids O_<j, so it is a target of seed r_j.
  • (C) If |e∩g| = |g|/2 and first_j(g) ∉ e, then e*+g is in F, has weight w and is lex-smaller. Hence |e* ∩ (g∖first_j(g))| ≤ |g|/2 − 1.
  • Conclusion. The tiebreak forbids avoid e*, and the other rules keep any fixed target. So seed r_j reaches e*, or an earlier genuine element. Other seeds can only miss elements, never invent one.
  • Mutant 18. An order without the seed first breaks (B). Mutant 18 uses such an order and fails only on instances with orbit seeds.
  • [Mac agent] CC engine: fractional-charge / edge-cover node lower bounds #157. charge/ecover (PR CC engine: charge node lower bound as a default CC rule (GH-157) #161) are target-independent bounds over free qubits like pack, so they are compatible. The combination was not run.

3. Implementation

  • cc_half.{h,cc}:
    • Per-row exempt qubit (kex_, kexbase_, kexfb_).
    • ov_add_tb / ov_del_tb, used only with the token; the old hot loop is unchanged when it is off.
    • tb_seed / tb_block_done / tb_set switch the exemptions between seeds while S is empty. The |g| = 2 forbids move with the exemption.
    • Test-only mutants 17 (naive tie cut through the tiebreak path) and 18 (seed not first). Mutants 15 and 16 stay reserved for [Mac agent] CC engine: fractional-charge / edge-cover node lower bounds #157.
  • cc_driver.cc: the token, plus -v lines that appear only with the token.
  • distqldpc.cc: -cc-mutant accepts 17 and 18; help text.
  • Tests: Part T, tiebreak configs in Parts B and H, test_cc_flags section 7g.
  • MODIFICATIONS.md (proof), NOTICE (credit), README.

4. S0: nodes at the same level, and the choice of order

Settings: -ub-search=off, seed 0. Ratio vs main at the deepest level every arm refuted (pre/).

Code (L) asc / blk blkrev desc (chosen) rnd
BB_1080 (24) 0.494 0.443 0.306 0.460
BB_756 (24) 0.547 0.367 0.442 0.491
BB_864 (24) 0.520 0.436 0.450 0.528
BB_360 (22) 0.469 0.350 0.350 0.423
BB_288 (16) 0.731 0.629 0.629 0.647
BB_144_14_14 (13) 0.850 0.861 0.893 0.870
TN_496 (19) 0.777 0.774 0.749 0.780
TN_250 (14) 0.896 0.893 0.884 0.915
GB_144_12_12 (11) 0.968 0.938 0.946 0.945
LP_1428 / LP_714 ~1.00 ~1.00 0.99-1.00 ~0.99
  • The geomean over the eight BB/GB/TN rows is 0.551 for desc and 0.561 for blkrev. desc is simpler, so it was chosen.
  • Time per node is 3-10 % higher on BB (extra forbids).
  • LP rows (weight 8) rarely tie at a minimum element, and the weight-9 TN codes have only odd rows (rule idle).

5. Tier 0

  • Identity. See the summary table (S0/identity_tier01.txt).
  • make test-cc, default (S0/test_cc_default.txt): PASS.
  • Part T with 1 000 / 3 000 instances: 256 000 / 768 000 ladders, 0 bad. The cut binds on 138 / 439 instances (24 / 86 with orbits).
  • Mutant 17 (naive tie cut, no first(g) exemption): wrong on 5 152/76 800, 17 088/256 000 and 53 576/768 000 ladders.
  • Mutant 18 (orbit-incompatible order, seed not first): wrong on 160/76 800, 1 088/256 000 and 3 272/768 000 ladders, all on instances with orbit seeds.
  • test-cc-flags: 417/417.
  • Answers: 23 tier0-3 codes x 8 tiebreak variants (seeds 0-5, dual off, -cc-aut=off, -no-symbreak, mrv, finder and basis off, reduced rule sets): 184/184 = stem.
  • Independent GF(2) witness check (runner/witness_check.py): 108 witnesses, 0 bad. A planted bad witness is rejected.

6. Tiers 1-4 (5 seeds; main and tb adjacent in the queue)

Tier Code main median s (range) tb median s (range) ratio nodes tb/main
1 LP_340_56_8 0.024 (0.024-0.026) 0.023 (0.022-0.024) 0.958 1.000
1 LP_442_68_10 0.025 (0.024-0.027) 0.024 (0.023-0.026) 0.960 1.000
2 BB_144_14_14 1.063 (1.033-1.143) 0.992 (0.971-1.082) 0.933 0.888
2 BB_288_12_18 0.278 (0.276-0.289) 0.205 (0.197-0.215) 0.737 0.643
2 GB_144_12_12 0.084 (0.074-0.085) 0.083 (0.074-0.084) 0.988 0.936
2 LP_544_80_12 0.038 (0.037-0.046) 0.038 (0.037-0.045) 1.000 0.994
2 TN_108_2_12 2.002 (0.841-2.765) 2.000 (0.838-2.748) 0.999 1.000
2 TN_200_10_10 0.164 (0.116-0.176) 0.154 (0.106-0.165) 0.939 0.959
3 LP_714_100_16 0.371 (0.265-0.419) 0.367 (0.271-0.414) 0.989 0.981
3 TN_144_2_13 5.536 (1.939-6.704) 5.507 (1.948-6.694) 0.995 1.000
4 TN_250_10_15 56.18 (31.69-58.19) 52.08 (29.05-54.51) 0.927 0.901
  • Geomean per tier: 0.959 / 0.928 / 0.992 / 0.927. No cell exceeds 1.25. All 110 answers equal the stems.
  • Tier 1's 0.96 is noise and binary layout, since the node counts are identical.

7. Tier 5 (6 h, default seed, main and tb concurrent; the 11 codes with even stabilizer rows)

Code main tb time to main's final value (ratio) largest level done by both: nodes, time
BB_360_12_24 d=24 @ 169 s d=24 @ 67 s 0.399 L22 633.1M -> 221.4M (0.350), 0.390
BB_756_16_30to34 lb 30 lb 30 15928 -> 5893 s (0.370) L28 49.07G -> 16.37G (0.334), 0.362
BB_864_4_30to40 lb 30 lb 30 11793 -> 4294 s (0.364) L28 34.70G -> 11.89G (0.343), 0.356
BB_1080_4_30to48 lb 30 lb 32 @ 19378 s 13518 -> 3173 s (0.235) L28 39.76G -> 8.51G (0.214), 0.227
LP_1020/1054/1122/1428/1768/2610 solved solved 0.98-1.03 nodes 0.99-1.00
TN_496_2_23to30 lb 23 lb 23 12823 -> 9579 s (0.747) L22 26.54G -> 18.73G (0.706), 0.738
  • The geomean over codes of the largest common level is 0.598 for nodes and 0.616 for time. 22/22 runs had 0 science problems.
  • New lower bound (PLAUSIBLE): BB_1080_4_30to48 has no logical of weight ≤ 31, so d ≥ 32 (X half under the verified dual map).
  • No other open code gained a bound in 6 h. BB_756/864 would need about 2x more time for level 30.

8. Recommendation and PI decisions

  • Recommendation: ADOPT CANDIDATE. Tiers 0-5 passed, with a clear node reduction on every code with tie-prone even rows (BB 2.9-4.7x at the deepest levels; TN_496/250 1.1-1.4x) and no loss elsewhere.
  • Decision 1: make tiebreak part of the default CC rules. Not done here, since it needs PI approval; a follow-up adoption PR would flip the default.
  • Decision 2: BB_1080 lb 32 is REPRODUCED ([Mac agent] CC engine: MRV branching and BFS row order on top of tiebreak #183 runs, different search order, same codebase). Whether to rename the stem BB_1080_4_30to48 to BB_1080_4_32to48 is the PI's decision.
  • Decision 3: merge this PR (opt-in) or keep it open.

Files

optimization/experiments/GH-162/:

  • runner/: queue with per-job env/bin (cores 0-23), job maker, identity, GF(2) witness check, panel/tier5 analysis.
  • pre/: order exploration.
  • S0/: Tier 0.
  • S1/: panel and Tier 5.

Server data: yfclab2:~/mac-agent-20261009/gh162-runs/.

🤖 Generated with Claude Code

yfc and others added 4 commits October 29, 2026 15:56
…eak), opt-in

New -cc-rules token 'tiebreak' (default off, acts with overlap): an even stabilizer
row g is counted on g minus first(g) with limit |g|/2 - 1, first(g) taken in a
per-seed order (the seed, then the earlier orbits, then descending label).
Sound by the per-seed lex-min argument (MODIFICATIONS.md, GH-162). Test-only
mutants 17 (naive tie cut) and 18 (seed not first). make test-cc Part T and
tiebreak driver configurations in Parts B and H; test_cc_flags section 7g.
The first(g) tie-break idea is from Qubitserf 04b9349 (S. Cercelescu, MIT);
re-derived, no code copied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, runners); Part T progress env

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…18 caught)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…el 30 unfinished; lb 32 stays PLAUSIBLE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts resolved by keeping both sides:
- Rules: charge (default on) and tiebreak (opt-in) both kept; parse_rules,
  -cc-rules error text, help text, README, MODIFICATIONS file table.
- cc_half.cc: tiebreak's earlier seed construction kept; GH-157 charge
  scratch added after the K rows.
- -cc-mutant accepts 0..15, 17, 18 (16 stays reserved/rejected).
- tests/test_cc_engine.cc: the GH-162 mask bit moves from 128 (now
  charge) to RM_TB = 256. Driver configs "tiebreak", "tiebreak-dual-off-
  seed1" and "aut-tiebreak" now use the new default (RM_DEF) + tiebreak;
  "tiebreak-mrv-seed2" adds charge; new "tiebreak-nocharge". Part T runs
  charge together with tiebreak on seeds 1 and 3.
- tests/test_cc_flags.sh: default rules + tiebreak accept / -v rules line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
guluchen pushed a commit that referenced this pull request Oct 30, 2026
…unds

PI decision 2026-10-31. Same matrices (git mv of Hx/Hz/Gx/Gz; only the
Gx/Gz header comment changes). Upper bounds unchanged.

  TN_360_4_17to24  -> TN_360_4_23to24   (GH-157)
  TN_396_4_17to26  -> TN_396_4_23to26   (GH-157)
  TN_504_2_17to34  -> TN_504_2_24to34   (GH-157)
  TN_648_10_9to32  -> TN_648_10_22to32  (GH-157)
  BB_1080_4_30to48 -> BB_1080_4_32to48  (GH-162, reproduced by GH-183)
  BB_756_16_30to34 -> BB_756_16_32to34  (GH-183)
  BB_864_4_30to40  -> BB_864_4_32to40   (GH-183)
  TN_496_2_23to30  -> TN_496_2_27to30   (GH-181)

Lower bounds: DistQLDPC's optional CC engine with opt-in rules that are
not on main (charge, PR #161; tiebreak with mrv / -cc-roworder=bfs,
PRs #180 / #204; sparse,sparseov,sparsemrv, PR #203), each reproduced
with a different search order or binary of the same engine (not an
independent second method).

Updated: data/matrices/README.md (tier5 list, rename history, open
items), NOTICE, README naming example, name columns of
optimization/baselines/SERVER.md and main_server_reference.json. The
upper-bound witnesses for these eight stems are copied under the new
stems to optimization/experiments/GH-146/witnesses/renamed-2026-10-31/
(VERIFY.txt: 8/8 VALID). Historical experiment records are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
guluchen pushed a commit that referenced this pull request Oct 30, 2026
…unds

PI decision 2026-10-31. Same matrices (git mv of Hx/Hz/Gx/Gz; only the
Gx/Gz header comment changes). Upper bounds unchanged.

  TN_360_4_17to24  -> TN_360_4_23to24   (GH-157)
  TN_396_4_17to26  -> TN_396_4_23to26   (GH-157)
  TN_504_2_17to34  -> TN_504_2_24to34   (GH-157)
  TN_648_10_9to32  -> TN_648_10_22to32  (GH-157)
  BB_1080_4_30to48 -> BB_1080_4_32to48  (GH-162, reproduced by GH-183)
  BB_756_16_30to34 -> BB_756_16_32to34  (GH-183)
  BB_864_4_30to40  -> BB_864_4_32to40   (GH-183)
  TN_496_2_23to30  -> TN_496_2_27to30   (GH-181)

Lower bounds: DistQLDPC's optional CC engine with rules that were
opt-in when the bounds were found (charge, default on main since
PR #161; tiebreak with mrv / -cc-roworder=bfs, PRs #180 / #204, and
sparse,sparseov,sparsemrv, PR #203, not on main), each reproduced with
a different search order or binary of the same engine (not an
independent second method).

Updated: data/matrices/README.md (tier5 list, rename history, open
items), NOTICE, README naming example, name columns of
optimization/baselines/SERVER.md and main_server_reference.json. The
upper-bound witnesses for these eight stems are copied under the new
stems to optimization/experiments/GH-146/witnesses/renamed-2026-10-31/
(VERIFY.txt: 8/8 VALID). Historical experiment records are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Data/doc-only update from main; src/ and tests/ unchanged by it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guluchen
guluchen merged commit a516ef0 into main Oct 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant