Repository navigation
Tooling: accelerate exact R2 Clifford comparisons with signed Pauli actions - #3218
Merged
Mister-Meeseeks merged 1 commit intoOct 17, 2026
Merged
Conversation
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
Expected:
PASS_CLIFFORD_PAULI_ANCHOR,PASS_ANCHOR_EXPORT, andPASS_REGISTERED_RESEARCH_PACKAGE ... outcome=completed.Only
research/clifford-pauli-anchor/is added. Base:463113d675af7410ac91d53a4fed51ec6494eb9a. Pending PR3202 is pinned at259043321323717b7e816d6be38ad5e1f0b69b4c; 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.