wai-quantum: a cross-simulator conformance corpus, reproducible with one command, and the surface-code generator's text at p = 0 #662
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-cross-simulator-corpus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 0 of the platform blueprint: the engine run beside other simulators on a published set of circuits, every answer held to an exact reference within a tolerance derived from the arithmetic that produced it, and all of it regenerated by one command on a clean machine.
What is here
wai/quantum-cross-simulator/: the corpus (circuits in families, each with its parameters, its reason and what it must give;corpus/manifest.jsonpins every one's SHA-256), integer references (tools/exact.py), derived tolerances (tools/tolerance.py), one adapter per engine and method (tools/engines.py), the run (tools/compare.py), run time and memory (tools/perf.py), the page (README.md, its results section written fromresults/*.jsonbytools/report.py), and the one command,reproduce.sh.corpus/expected-refusals.json: the refusals the engine under test may or must give, with their words.corpus/known-disagreements.json: another engine's disagreements, each with a reproducer incorpus/reproducers/.wai/wai-quantum-cli/examples/cross_simulator.rs: the engine's side, one job in and one answer out, through the calls the command line and the job service make.provider/seeded_statevector_provider.py: a third-party simulator as aprocessprovider ofwai.quantum.provider/1, and the template to copy.wai-quantum providers testpasses 31 of 31, andrun --providerseals its counts in a receipt thatverifyaccepts.wai-quantum-cli.yml, the Linux leg): the CI tier, the self-test, the provider template, andreport.py --check.After review
An independent review confirmed 18 findings on the first head (
3e6ab36d2). Each fix was first shown as a planted fault that the earlier tools let pass, then as a failure of the check it breaks; the planted faults are now the self-test's, which requires each to fail its own check on its own engine and no other.not runorlimit, and the run passes (two findings)corpus/expected-refusals.jsonlists the refusals that are meant, with their words; a time-out kills the whole process grouprotations_n6accepted), a refusal in other words, a 0.5 rad global phase onqft_wide_n20: each PASSgate_gphase_controlledruns on every state engine (quimb.*andqsim.statevectorrecordnot run)repeated_phase_k19cannot see its phaseaer.mps's own log of its updates, bonds and truncations);quimb.mpsruns with an absolute cutoff whose drop is known; a row whose bound cannot see a wrong phase is recorded, not passedsmall_angle_k32); the state without the gate on the double state vector (below_grid_k48): each PASSqft_counts_n8, a 40-qubit sampler on one outcome, an empty count map: each PASSwai/CONTRIBUTING.mdrecords the corpus's place under the public-text rulerepeat_until_successis described as it is (no reset); every claim is a case of a reproducer incorpus/reproducers/, rerun with the circuit; one claim is new: the error needs no conditioned xaer.stabilizer's tableau time is mostly per-instruction handlingaer.*'s figure is the simulator's own experiment time (time_taken), the whole call kept beside it; each engine's timer is statedVmHWMon Linux, from the driver itself for the engine under test)all,1 (no threads), the count, ornot set; fusion and ops are recordedmirror_n10by the referee, and ops come from the driver into the timing files; QPE and Grover closed forms are checked in integers(uncommitted)when it differs from HEAD's, and the toolchain the checkout picksResults
conformance-linux-x86_64.jsonconformance-macos-arm64.jsonThe first head's files had 1363 and 1368 passes,
limit3, and no op-log, closed-form-in-integers, held-or-dropped, L1 or reproducer rows. What moved in the published tables:random_rotations 3/3); they are nowrefused as listed, with the four error-correction refusals.repeated_phase_k19: modulus 1.0000188705 and 8.99e-6 rad from the half turn (2.09e-5 from −|1⟩), against the extension's 1.0000189 and 1e-5; the page called 1.89e-5 the distance, which was the modulus excess.gate_gphase_controlled, whichquimb.*andqsim.statevectorhave no gate for). On Linux the decision-diagram engine again passes 900 s onmirror_n20;rotations_wide_n20now finishes.aer.*'s figure is the simulator's own experiment time, so its tableau case (clifford_n1000) reads 0.022 s on Linux (was 0.296) and 0.0076 s on macOS (was 0.199), its whole call beside it. Linux memory no longer sits on the harness's floor: the engine under test's baselines are about 5 MiB (were 48),surface_z_d5_model6.7 MiB for it and 26 MiB forstim.tableau(were 94 each). Threads say what each engine was given. The tables carry no ranking prose.The planted-fault runs on the earlier tools and these, side by side, are logged (not committed) at
os-wt-qcorpus-old/_demo/demos-2026-11-06.logon the dev Mac.An engine bug, fixed in its own commit
112cc14bd:quantum_frame::surface_code_memorydocuments that its text is the reference generator's, byte for byte. At p = 0 it was not: it wrote every noise instruction with probability 0 and the first round's resets on two lines. The circuits meant the same, so models and samples were unaffected; only the text differed. A fixture test against the reference's text failed before the change and passes after. The fixture count pinned inwai-quantum-processors.ymlandwai-quantum-dsp.ymlgoes from 2 to 3.Reproducing
macOS on arm64 or Linux on x86_64, with curl, tar, a C compiler and rustup. It fetches a pinned uv, CPython 3.12.16 and every wheel by hash, and builds the engine
--locked. Each results file names the git trees it was produced from, as they were on disk (git rev-parse <commit>:wai/wai-quantum), and the toolchain the checkout picks.Notes for review
wai/wai-quantum/src, so this pull request fires every wai-quantum workflow.~/.cache. The full tier is not in CI.wai/CONTRIBUTING.mdrecords how this corpus meets the public-text rule: results per engine as data, projects named only onallow-name:lines, no ranking.max_bond256), andC_XYZ,EandPAULI_CHANNEL_1.🤖 Generated with Claude Code