Skip to content

Serve all 144 runtime residue pairs with one reversible DDG circuit - #7755

Open
aliromman wants to merge 1 commit into
CrocSwap:mainfrom
aliromman:codex/consecutive-result-070
Open

aliromman wants to merge 1 commit into
CrocSwap:mainfrom
aliromman:codex/consecutive-result-070

Conversation

@aliromman

@aliromman aliromman commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

One fixed reversible arithmetic circuit now serves all 144 nonzero denominator-13 residue pairs supplied at runtime. It preserves each requested graph's ordered coin-to-label function and first stopping depth. The exact per-draw bill is 14,022 gates and 2,146 clean work bits, including parameter arithmetic and cleanup. This answers the runtime-parameter handoff in PR #7746. No new kappa or physical runtime gain is claimed.

Read the contract and proof, circuit generator, exact bill and pair certificates, complete checker, source pins and credits.

Two read-only four-bit parameters 1 <= a,b <= 12 are fixed before the first coin. From one phase residue, the circuit forms ab*theta, 13a*theta and 13b*theta modulo 169, then derives all four probability digits. General ordered prefix counts replace the fixed-pair shortcuts. Forward and inverse arithmetic, packet copying, swapping and uncomputation are included.

Resource per draw Count
X / CNOT / Toffoli gates 864 / 10,054 / 3,104
Total gates 14,022
Temporary wires + clean backing 2,135 + 11 = 2,146 bits
Live packet / read-only parameters / resident coin 11 / 8 / 1 bits
Complete checked transitions 144 pairs × 624 = 89,856

All transitions agree with the unchanged source graph constructor and a separate integer-floor specification. The gate interpreter checks every wire in both directions, including parameters, coin and zero workspace. A separate scalar interpreter checks 288 cases in both directions. All 28,561 modular subtraction inputs and their reversal pass. Four controls detect a wrong stopping flag, changed parameter, dirty work bit and exchanged output order. The fixed-pair source verifier also runs unchanged.

Python 3.12, standard library only:

python3.12 -B scripts/research_package.py --package research/runtime-paired-ddg-arithmetic

Both registered commands print:

PASS_RUNTIME_PAIRED_DDG_ARITHMETIC
144 runtime pairs; 89856 complete forward/inverse transitions
864 X; 10054 CNOT; 3104 Toffoli; 14022 gates
2135 temporary bits + 11 clean backing bits = 2146 clean work bits

Normal and optimized registered replay, syntax/indentation, committed bytes/source history/modes, export and sealed read-only Git-free serial replay pass. Hosted CI did not certify this package. The plan job failed in the shared test_current_ci_section_matches_selected_record: the base guide names frontier6030 while the selected record requires make frontier7000-verify. The log reports 760 tests, one failure and 24 skipped; package replay was skipped. This package changes no shared CI file. Local replay remains the scientific evidence.

Nick Petalas (@petalas) supplied the fixed-pair Boolean primitives and modular adder, shared-phase proof and runtime-parameter question. The primitives are inherited unchanged with a new wire layout; no retained function or global is patched. @zxv supplied the source graph, law and expected-bit proof in PR #6072. @JoyboyBrian supplied the inverse and lifecycle context in PR #6102. All eleven retained files keep their notices and predecessor credit.

This circuit is larger than the fixed-pair circuit and accepts a larger domain. It removes per-parameter transition data; the fixed circuit description still has a cost. No gate optimum, total-ROM minimum or physical speedup is claimed. The PR #7187 resident bank permits output relabelling, so its payload is a different contract. Neither the counter protocol nor the PR #6127 delimiter protocol is installed here.

Parameter loading, physical wire and tape access, stopping storage, output retention, conditional freshness, an actual nonadaptive caller and the complete native invoice remain open. Stopping time stays unbounded. Historical full catalogue, native/selected cold replay, Lean and Docker were not run. All five framework assumptions and the selected frontier remain unchanged.

Base: canonical main e54523517d0f03e58352e647c403a5af3e525a57, priority revision 8. Consumed heads: PR7746 71fdb2cf1ec973b5402c4d3c2466864014a1ccda, PR6072 9011bf83e85ecd0443c789cf03259442f750877d, PR6102 0422af13625c2e7e8ece28bdd74364a61764c64a. No unmerged source ancestry is asserted. Prepared by Ali Romman (@aliromman) with substantial OpenAI Codex assistance in research, implementation, verification and writing. No independent human or formal-kernel acceptance is claimed. Apache-2.0. Canonical claim.

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