wai-quantum 0.3.29: the architecture around the code, priced, and the 2025 factoring machine re-run #148
Loading…
Reference in a new issue
No description provided.
Delete branch "wai-quantum-arch"
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?
Stacked on #147 (→ #145 → #144 → #143). Merge those first; this diff then reduces to the one commit.
What
quantum_arch, a new feature of wai-quantum (0.3.29), prices the architecture-level ideas behind the recent fall in projected fault-tolerant cost:CLI:
wai-quantum arch factoring|storage|cultivate [--json]. Example:arch_factoring.Checked
tests/data/yoked_footprint_oracle.csv.Where the source disagrees with itself
Each item is asserted in a test:
m + 3f + 2ℓ + len mgives 1432, which means 152 hot. Its table gives 1399 and its text gives 1409.With every correction the machine needs 958,480 physical qubits and 4.3 days per factoring. The conclusion holds.
🤖 Generated with Claude Code
quantum_tn turns a circuit (any unitary on any qubits, as a matrix) into the tensor network of one amplitude or an open-output batch, and contracts it. - Network::amplitude builds the network; simplify absorbs vectors and one-qubit gates into neighbours. - find_path is a seeded hyper-optimiser over two tree families: - randomised greedy, scoring size(out)/c - c(size(a)+size(b)) with Gumbel noise; - recursive bipartition, multilevel (heavy-edge coarsening, several initial cuts, refinement at every level), with greedy leaves. Families alternate until one leads; later trials sample near the best parameters. The best few trees are reconfigured: subtrees of up to eight tensors are re-contracted optimally by subset dynamic programming, until nothing improves. - slice fixes the index that leaves the least total work until the largest intermediate fits the cap, pricing each candidate incrementally. A second search round then finds a tree for the network with the first round's slices fixed (all, or the more valuable half). - contract_plan contracts every slice in a fixed accumulation order and sums them in order. Threads are bounded by an 8 GiB budget; WASI runs sequentially. The bits are the same everywhere. Measured on single amplitudes of random circuits on the 54-qubit advantage-experiment grid (fSim(pi/2, pi/6), staggered couplers), 256 trials, under ten seconds each, in log10 operations: m = 10: 10.48 m = 12: 13.91 m = 14: 14.63 m = 16: 17.60 m = 20: 18.77 An independently developed hyper-optimiser, given the identical networks, lands within 0.4 of these at every depth, in either direction. The 54-qubit, 10-cycle amplitude, contracted here in 16 slices, agrees with an independent contraction to 12 significant figures. Tests: - Amplitudes match a dense state vector for every tree family, with reconfiguration and with slicing. - Reconfiguration reaches the exact optimum on 40 random small networks. - Incremental slice pricing matches a full recount. - The same seed gives the same plan. - Mutating the permutation, the complex product, the contraction's summed indices, slice pricing, the slice offset or the reconfiguration DP fails a named test. - bit_identity pins a plan and its sliced, threaded amplitude natively and under wasm32-wasip2. CLI: wai-quantum tn --file CIRCUIT.jsonl [--bits --open --trials --seed --cap-log2 --plan-only --json], byte-identical natively and under wasm32-wasip2. Co-Authored-By: Claude Opus 5.5 <[email protected]>A photonic sampler's outcome probabilities are hafnians (photon-number detection) or torontonians (threshold detection) of its Gaussian state. quantum_gbs computes both exactly and reproducibly. - hafnian: power traces, a sum over 2^{n/2} pair subsets, each the lambda^{n/2} coefficient of exp(sum tr(B^k) lambda^k / 2k). The traces come from a Householder Hessenberg reduction, La Budde's characteristic polynomial and Newton's identities: O(n^3 2^{n/2}). - torontonian: inclusion-exclusion over the 2^m clicked-mode subsets. - Both sums run in 64 fixed chunks, threaded natively and sequential on WASI, added in chunk order, so the bits do not depend on threading. - GaussianState: squeezed vacua through an interferometer with uniform loss, as the complex covariance in the (a, a-dagger) basis. - click_probability, photon_probability: exact pattern probabilities. - sample_clicks: exact samples, drawn mode by mode from marginal torontonians. - click_marginals, check_samples: the one- and two-mode click statistics every sampler of the state must reproduce, polynomial in the modes, and a z-score check of observed patterns against them. Against an independent implementation: - click probabilities of three lossy states, every pattern: 1.1e-10; - photon probabilities up to four photons: 2.3e-13; - hafnians: 1.5e-12 up to 20x20 and 4.5e-8 at 36x36, where the alternating sum loses precision on either side. A 36x36 hafnian takes under 2 s. Tests: - hafnians match exhaustion over matchings, and (2k-1)!!; - squeezed vacuum reproduces its textbook click and photon statistics; - click probabilities sum to one with loss; - exact samples reproduce marginals and full-pattern frequencies, and pass the check, while a different interferometer fails it. Mutating the hafnian sign, La Budde's recurrence, Newton's identities, the torontonian sign or the loss channel fails a named test. bit_identity pins a 24x24 hafnian and a 14-click torontonian (threaded natively, sequential under WASI), probabilities, samples and marginals, on both targets. CLI: wai-quantum gbs --squeezing ... [--eta --seed | --unitary] [--sample K | --check FILE] [--json], byte-identical natively and under wasm32-wasip2. Co-Authored-By: Claude Opus 5.5 <[email protected]>