Skip to content

Tooling: accelerate exact R2 Clifford comparisons with signed Pauli actions - #3218

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
tekuuu:research/round68-exact-replay
Oct 17, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
tekuuu:research/round68-exact-replay

Conversation

@tekuuu

@tekuuu tekuuu commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

The complete retained PR3202 R2 audit spends several seconds constructing exact Clifford matrices for equality checks. This adds an opt-in comparator using signed Pauli action and one whole exact anchor vector. It retains all-input equality, including global phase, while making the equality stage 29.97x faster than the original kernel and 20.61x faster than the existing cached kernel on the same fixture.

The complete audit improves more modestly, because its other work remains:

Engine Equality-stage median Complete audit median
Original PR1781 packed kernel 9.774 s 39.744 s
PR2638 cached packed kernel 6.721 s 37.467 s
New comparator 0.326 s 31.100 s

Whole-audit speedups are 1.28x / 1.20x, respectively. BENCHMARK.json records nine fresh serial CPython 3.12.14 processes with alternating order, raw measurements, exact input hashes and matching complete results. All runs execute the same 253 circuit-pair decisions: 244 accepted, 9 rejected. Every original semantic control remains enabled. Measurements describe one shared host, not a portable speed guarantee; native artifact generation is excluded.

The complete tableau-plus-anchor criterion is established predecessor mathematics, already used by the native producer. The contribution is a separate implementation, its source-bound integration into the current audit, full-matrix differential controls and measured acceleration. PROOF.md derives the signed gate rules and explains why no input-column coverage or global phase is lost. Only immutable gate tables are cached; no new acceptance-result cache is introduced.

Validation:

  • Registered CPython 3.12 replay passes, including all 4,704 independent matrix-column relations, 480 comparator decisions, phase-blindness and malformed-gate controls.
  • Three source-corruption controls and complete optimized Git-free exports pass on CPython 3.12.14 and 3.14.7.
  • Metadata/source pins, whitespace and publication-byte checks pass for all 39 package/input files. Hosted CI is separate.
python3.12 -B scripts/research_package.py --package research/clifford-pauli-anchor

Expected: PASS_CLIFFORD_PAULI_ANCHOR, PASS_ANCHOR_EXPORT, and PASS_REGISTERED_RESEARCH_PACKAGE ... outcome=completed.

Only research/clifford-pauli-anchor/ is added. Base: 463113d675af7410ac91d53a4fed51ec6494eb9a. Pending PR3202 is pinned at 259043321323717b7e816d6be38ad5e1f0b69b4c; twelve necessary files are retained verbatim with source paths and hashes, so replay needs no foreign Git objects. The nested historical kernel hash is explicitly distinguished from the executed comparator.

This is a tooling improvement, with no new kappa or supplier admission. It does not expand PR3202's scientific scope or implement fast recursive multiplication. Concurrent PR3208's R2 cleanup audit and PR3209's T16 reader cache are complementary and unmeasured here. TASK.json records bounded overlap coverage and refresh failures; README/TASK give concrete next steps for larger callers and the remaining audit costs. Selected and frozen predecessor files are unchanged.

Credit Sagar Thakrar/#1781, ywz65/#2638, Charles Bethin/#662, 24kHandsome1201/#3202, Ali Romman/#1029, Tekalign/#2768, and the original Clifford/native producer lineage. Nick Petalas, Jeremy Kothe, Marius-Paul Dumitrean, Hiroki Kumazaki and the construction's other contributors retain attribution in NOTICE.md and the original README. New work by Tekalign (@tekuuu), with substantial OpenAI Codex assistance in algebra, implementation, testing, measurements and writing. Apache-2.0; no independent human or proof-kernel review is claimed.

Canonical investigation.

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.

2 participants