Skip to content

Tooling: 3.15× faster production Clifford zero_state via gate tables with identical receipts - #2329

Open
VictorLiwentao wants to merge 3 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/clifford-state-production-60b9
Open

VictorLiwentao wants to merge 3 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/clifford-state-production-60b9

Conversation

@VictorLiwentao

@VictorLiwentao VictorLiwentao commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, production multicold clifford_exact.py still built the exact zero state by expanding the Clifford circuit. The opt-in adapter research/clifford-state-performance/ (lineage of #662) already proved gate-table permutation/phase evaluation with identical cold617 helper-interface receipts. This PR wires that equivalent zero_state into the production multicold evaluator used by scripts/verify_cold617_interface.py.

Path: research/complex-multicold/vendor/pr558/vendor/pr552/complex-global/vendor531/vendor/clifford/clifford_exact.py.

No certificate κ pins change. Same-tip provenance hygiene:

  • research/clifford-state-performance/ vendors pairwise-era bytes as baseline.py and demotes the live pairwise pin.
  • research/clifford-reciprocal-basis-obstruction/ demotes clifford_exact to provenance and drops it from live VERIFY.json inputs.
  • research/cold-wrapper-amplitude-audit/ moves the pairwise clifford_exact digest to provenance_sha256 (that audit does not import the module).

Tooling improvement; no new kappa. Selected frontier untouched.

Result

On Linux / CPython 3.12.3 with pinned CPU, five alternating fresh-process pairs gave median helper-interface wall time 1.202 → 0.382 s (3.15×). Timing is host-descriptive and is not a correctness gate. Helper-interface receipts match the baseline evaluator (states=100, instances=2).

Package: research/clifford-state-production/.
Tip: 68a7161a610f175dc8e7b22f95acd033191450d9.

Validation

python3.12 -I -B research/clifford-state-production/verify.py
python3.12 -I -O -B research/clifford-state-production/verify.py
python3.12 -B scripts/research_package.py --package research/clifford-state-production
python3.12 -B scripts/research_package.py --package research/clifford-reciprocal-basis-obstruction
python3.12 -B research/cold-wrapper-amplitude-audit/verify.py
python3.12 -B -m unittest tests.test_clifford_state_production

Expected:

PASS_CLIFFORD_STATE_PRODUCTION states=100 instances=2 corruption=subprocess_failure certs=1 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/clifford-state-production outcome=completed
PASS_REGISTERED_RESEARCH_PACKAGE research/clifford-reciprocal-basis-obstruction outcome=completed
PASS_COLD_WRAPPER_AMPLITUDE_AUDIT …

Helper-interface receipt/benchmark runs briefly swap the live production clifford_exact.py under try/finally restore, because scripts/verify_cold617_interface.py forces MULTICOLD_SOURCE onto the repository multicold tree (temporary overlays are ignored). The working tree is restored after every run. Permutation-foil rejects via subprocess failure. Package gates under -O still launch assertion-enabled children. Full make verify, selected cold replay, Lean, and multiplication-theorem obligations were not rerun for this isolated evaluator change.

Overlap and credit

Closest priors (different delivery): research/clifford-state-performance/ / #662 (opt-in gate tables; this is the production wiring), CrocSwap/integer-mult-bounds#756, CrocSwap/integer-mult-bounds#2257 / #2263 / #2276 / #2320 (same production-promotion + provenance pattern). No competing open PR on this production clifford_exact.py at refresh.

Credit Charles Bethin and the multicold Clifford lineage. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

…d evaluator

Wire the proved exact permutation/phase tables from research/clifford-state-performance/
into the multicold clifford_exact.py used by scripts/verify_cold617_interface.py.
Vendor pairwise-era bytes as baseline.py; demote the opt-in live pin; honestly
refresh research/clifford-reciprocal-basis-obstruction's clifford_exact pin.

Prepared by Wentao Li with substantial AI assistance.
Record pinned-CPU 3.15× helper-interface medians for clifford-state-production.
Restore live-file swap + perm-foil corruption control. Demote
clifford-reciprocal-basis-obstruction's multicold clifford_exact pin to
provenance (drop from VERIFY inputs) so research-packages CI does not see
working-source drift after the production gate-table rewrite.

Prepared by Wentao Li with substantial AI assistance.
VERIFY/README no longer claim a read-only default: helper-interface runs
briefly swap the live production evaluator under try/finally restore.
Move cold-wrapper-amplitude-audit's pairwise clifford_exact digest to
provenance_sha256 (audit does not import that module).

Prepared by Wentao Li with substantial AI assistance.
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Maintainer review of 68a7161a610f175dc8e7b22f95acd033191450d9: the gate-table rewrite has a plausible exact recurrence, and the recorded normal/optimized package replays pass. Before production integration, please fix the runtime source-binding regression.

clifford-reciprocal-basis-obstruction/dense.py:native_module() still imports V.ROOT / V.KERNEL, but this PR removes that actual runtime dependency from INPUTS, VERIFY.json and CERTIFICATE.json, marking it as provenance. It also changes the former kernel-drift negative control to mutate selector-batching/README.md instead. I reproduced that appending bytes to the executed Clifford oracle is now accepted by check_sources() with an unchanged reported source inventory.

A consumed oracle is an input, not historical provenance. Please preserve a pinned original runtime baseline for the historical replay, or explicitly migrate the replay to a pinned optimized oracle with complete regenerated evidence and the original drift-control coverage. Keep immutable evidence intact and audit the same issue in cold-wrapper-amplitude-audit, whose executed-source pin is also removed. Include a control proving kernel source drift and missing kernel inventory are rejected; do not substitute a README mutation for that coverage.

This is a reproducibility/integration hold, not a rejection of the speedup. Exact evidence is retained in the efficient1300 audit as combined-2329-source-control.py/.json, to be published with this checkpoint.

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