diff --git a/docs/research/QUANTUM_EFFICIENCY.md b/docs/research/QUANTUM_EFFICIENCY.md new file mode 100644 index 0000000..b97a465 --- /dev/null +++ b/docs/research/QUANTUM_EFFICIENCY.md @@ -0,0 +1,9 @@ +# Quantum-to-classical efficiency research + +**Research record, not a master plan or a performance claim.** + +[Full report, 17-family mechanism matrix and raw static evidence](../../evidence/QUANTUM_EFFICIENCY/2026-10-22/README.md) + +Tracking: [architecture #297](https://github.com/aien-dev/aien-architecture-mv/issues/297), L581; PR integration L596. + +New observations: aligned zero channels in one sampled FP8 expert, improved toy INT4 weight error after a structured rotation on three selected matrices, and large rank-64 approximation error. Whole-model prevalence, inference quality, speed and energy remain unmeasured. No product changes. Existing owners retain production work and qualification. diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/MANIFEST.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/MANIFEST.json new file mode 100644 index 0000000..4ef7392 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/MANIFEST.json @@ -0,0 +1,94 @@ +{ + "README.md": { + "sha256": "141cbb66d8837632200975aa2f17938c7779271acc2faaf7e7ce2539e028fb61", + "bytes": 25850 + }, + "additional-pinned-source.txt": { + "sha256": "6772087453dc7f29c27007d486bf78795cd4ae8c4ab58a78155d7b82904e3fe4", + "bytes": 7886 + }, + "byte-confirm-replay.json": { + "sha256": "cb8751dbd5a27379d0ec9b1563574d630c76bad3d3872183c847e6b9acd3b83c", + "bytes": 3640 + }, + "checks.wl": { + "sha256": "f23c70cd056ab77c3d2f3f337efc18c2a9c6e1450860b85296d60642c2c12527", + "bytes": 1912 + }, + "doctrine-check-receipt.json": { + "sha256": "c59b10df48a1d006c75c15c632ca8a22f58e496b5cc9ffeefa388a7c996c5e1a", + "bytes": 9799 + }, + "geometry-check-results.json": { + "sha256": "bb5e165dd9ca7cfd8ec724a5a20829639fff5134152e4fe8776904d6cd9d1a8c", + "bytes": 1028 + }, + "geometry-check.wl": { + "sha256": "eb60a18e8aefb42437d6fdacfd0d368b4081f430ea4f693d71833e7a20ecf9de", + "bytes": 495 + }, + "independent_byte_check.py": { + "sha256": "37c75d1778eb9a36ed7a186719e7989d6ed8904397ce47edb140d2ff8b414c8d", + "bytes": 2079 + }, + "pinned-source-excerpts.json": { + "sha256": "38e16e311814dafb78c97c60e675a94b25c312d3f3ce1d1cbe41100b557ec677", + "bytes": 17012 + }, + "probe-validation.json": { + "sha256": "f693977facae9dce5c126c41aad30d694d2a5dc35a4a645e6b4045532f1600d3", + "bytes": 484 + }, + "quantum-sources.json": { + "sha256": "048baffabee552cc048207761e010521b83a119e7553f74abce4dd47057c411f", + "bytes": 6705 + }, + "repository-pins.json": { + "sha256": "8922a26ae3351e20f5df33ba935266ca5116d8000b362ea2e728a618dbe07ea9", + "bytes": 2860 + }, + "sources-ledger.json": { + "sha256": "d9ea72da3965bce5c000ccdecc494828b9cc3cadee357182e0e3c3331726863d", + "bytes": 7782 + }, + "sparsity-followup-results.json": { + "sha256": "b09c12efe05dc5cac29e45f53b78399dc91bedde36a4de61e68cd4ca141ecda7", + "bytes": 5668 + }, + "sparsity_followup.py": { + "sha256": "d86b8772026b445fb24c56659ceb96827e1a62fbed2e6a1a54b9b8444b10c0df", + "bytes": 1062 + }, + "systems-audit.md": { + "sha256": "dd80ef1ae02a2a7fa2474e6cc1e47fc56c196512079a3157879c43cd63a2509a", + "bytes": 6422 + }, + "systems-findings.json": { + "sha256": "b3b52b64fdbc075c4d3629338e1b2533ed7f9ed8b3082fa02f3559d3307d9dac", + "bytes": 13203 + }, + "validate_probe.py": { + "sha256": "08aad9560477ad5f6efdb21db4feac8296d972a9cc9a77c2ee6630de23b4de25", + "bytes": 2643 + }, + "verification-summary.json": { + "sha256": "0782a29802e4fa2029b38314b4766f20df9f12bebaf07baaad73f9f535053395", + "bytes": 515 + }, + "weight-probe-results.json": { + "sha256": "e3a195f6a4c31b77b0a6839ad82b310bffbe07eb726a45369acad30593cf9d61", + "bytes": 5447 + }, + "weight_probe.py": { + "sha256": "a5ddde5624e7e5d0621d6380e90d76082093b910e5558b3caafe514ef9339618", + "bytes": 6013 + }, + "wolfram-results.json": { + "sha256": "5a70d475de77d799fd9b8e6719718ded17305500eb64cc63e7dbec66fdcb5c5b", + "bytes": 2193 + }, + "zero-support-byte-confirm.json": { + "sha256": "05402912f1a391770f89bc906fccf03b7797ae3329dd6406be549e035ff557bc", + "bytes": 2868 + } +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/README.md b/evidence/QUANTUM_EFFICIENCY/2026-10-22/README.md new file mode 100644 index 0000000..e9b4814 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/README.md @@ -0,0 +1,173 @@ +# Quantum ideas for AIEN: what can actually save work + +**Research snapshot: 2026-10-22. Tracking: [aien-architecture-mv#297](https://github.com/aien-dev/aien-architecture-mv/issues/297), L581. NOT A MASTER PLAN.** + +## Bottom line + +**Yes: the mathematics behind superposition offers useful engineering ideas. The strongest candidates on this hardware are better representations, removal of provably redundant work, and reuse of validated results. Simulating a quantum state is not a shortcut to quantum hardware.** + +This investigation produced new static evidence from the actual FP8 checkpoint, not an inference speedup. One inspected expert contains matching all-zero channels in its gate, up and down projections. A structured rotation reduced toy 4-bit weight error on three preselected matrices. Conversely, those matrices do not support a blanket aggressive low-rank replacement. No production code, serving configuration, model or hardware was changed. + +## What was actually examined + +- Inventoried **11 repositories** and saved immutable refs in `repository-pins.json`: Omega, CUDApp, FORGE's current physics repository, sovereign-core, Aienux, Interplane, architecture, training, rig, Allen and AEGIS. +- Focused source reads covered the serving expert uploader, GPU GDN/graph path, compiler search, Store I/O, crypto and protocol/security boundaries. Training, Allen and rig coverage included declared implementation state, not every source file. Prior efficiency reports and live ledger ownership were reconciled. +- Surveyed **17 mechanism families** in the appended matrix. This is a broad map of computationally relevant mechanisms, not an exhaustive catalog of every named quantum state. +- Ran Wolfram algebra and resource checks. Ran CPU-only representation probes on three fixed checkpoint matrices, a five-matrix zero-structure follow-up, and independent-library FP8 decoding controls. +- Did **not** scan the whole checkpoint, run generation or perplexity tests, measure latency/joules, exercise quantum hardware, or audit every line of the project. Architecture intent, main-branch source and deployed artifacts remain separate evidence categories. + +## 1. First priority: stop storing and moving known zeros + +**Observed:** layer 0, expert 0 has 280 all-zero gate rows, 280 matching all-zero up rows, and 280 matching all-zero down columns. There are 512 channels in this expert. A byte-only second method confirmed that the zero-channel indices match across all three projections, without relying on the floating-point decoder. + +Wolfram calculates that these channels account for **54.6875% of this expert's three FP8 weight payloads**, or **1,720,320 of 3,145,728 bytes**, before scale, index, alignment and layout overhead. This is neither a whole-model percentage nor a runtime speedup. The other two originally selected matrices have no fully zero rows or columns. + +The inspected uploader (`sc-q36-batch@f0230a59`, `crates/aien-inference-abi/src/qwen38_omega/moe.rs:1-11,69-87`) describes fixed-size dense FP8 storage for 257 experts and appends their full weight bytes. That establishes a concrete place to investigate, not proof that every current deployment lacks another optimization. + +**Recommended experiment:** start with lossless storage/transport compression and exact reconstruction of the original bytes/scales. Then, separately, test a sparse execution representation. Audit the whole checkpoint by streaming, record weighted routing frequency, and count bytes actually fetched. Preserve original scale-block membership and reduction order. NaNs, infinities, signed zero, bias terms and overflow mean that dropping a mathematically zero term is not automatically bit-identical floating-point execution. + +**Gate:** original-byte reconstruction first; unchanged reference states/logits/tokens and intended negative controls for execution; actual same-model end-to-end latency and energy next. Reject a scheme whose index handling, gather traffic or decompression costs more than it saves. This finding is structural redundancy, not evidence of quantum behavior or naturally low entanglement. + +Evidence: `sparsity-followup-results.json`, `zero-support-byte-confirm.json`, `weight-probe-results.json`. + +## 2. Second priority: rotate before quantizing + +For an orthogonal matrix Q, real-arithmetic linear algebra gives: + +`W x = (W Q^T) (Q x)`. + +The coordinates change, but the unquantized linear map does not. A good rotation can distribute outliers so that low-bit quantization represents the matrix more accurately. QuaRot and QuIP provide relevant classical precedents; their published model/implementation results are not AIEN performance receipts.[7][8] + +The throwaway experiment used a **128-wide normalized Hadamard transform**, followed by symmetric INT4 rounding to [-7,7], one max-absolute scale per 128 weights, and inverse transformation. It compared reconstruction error against the existing FP8 checkpoint decoded to float64. It is **not** NVFP4, GPTQ, the full QuaRot/QuIP algorithm, or a trained rotation. + +| Layer / expert / projection | Plain toy INT4 weight error | Rotated toy INT4 weight error | Relative error reduction | Rank-64 weight error | +|---|---:|---:|---:|---:| +| 0 / 0 / gate | 13.835% | 11.681% | 15.57% | 60.86% | +| 20 / 128 / up | 11.992% | 11.723% | 2.24% | 85.61% | +| 39 / 255 / down | 12.973% | 11.706% | 9.77% | 77.71% | + +All error entries use `||W_approx - W||_F / ||W||_F`. Selection was fixed first/middle/last, not random or representative. No confidence interval or whole-model generalization follows from three matrices. Weight error does not measure generated-answer quality. + +**Recommended experiment:** compare unrotated versus structured rotation at the same deployed bit budget, including scale metadata, activation transforms, packing and kernel cost. Use real activation calibration and held-out teacher-forced logits/NLL, then the existing shared model qualification path. Keep this explicitly approximate and separate from exact-token lanes. Transform placement must be derived around each nonlinear boundary; a rotation generally does **not** commute through SiLU or gating. Wolfram verified a simple nonlinear counterexample. + +Potential benefit: fewer memory bytes for a fixed quality target. Unmeasured: model quality, end-to-end speed and joules. Rotations can also destroy existing sparsity, so test sparse and rotated representations separately before combining them. + +## 3. Entanglement-inspired factorization: conditional, not a blanket win + +Schmidt decomposition and tensor networks motivate storing factorizations rather than every tensor entry. Efficient classical simulation is possible in restricted-entanglement regimes; that does not imply a trained expert matrix has an economical low-rank approximation.[1] + +For a 2048-by-512 matrix, a rank-r factorization stores `r*(2048+512)` coefficients. Wolfram's equal-precision payload break-even is integer rank 1–409. **BF16 factors versus the existing dense FP8 payload only win below rank 205**, before metadata and execution costs. Rank 64 would cut ideal weight payload by 68.75%, but the observed rank-64 weight errors are in the table above. + +The first sampled matrix's numerical rank is only 232 because it has 280 zero rows. Treating that as evidence for useful approximate low rank would miss the simpler exact structure. The middle and final selections have numerical rank 512. + +**Decision:** do not recommend a blanket rank-64 rewrite from these results. Test tensor-train/tree factorizations, shared expert subspaces or low-rank-plus-residual only on blocks with a favorable measured spectrum and activation-weighted error. Include factor loads, intermediate writes, contraction ordering and fitting cost. A small weight-error proxy alone cannot qualify the model. + +## 4. Project-wide applications and existing ownership + +The engineering interpretation is usually “eliminate repeated information or work,” not “run all alternatives at once.” + +| Area | Useful mechanism / next discrimination | Current disposition | +|---|---|---| +| Omega search / AIEN_0 | Symmetry-aware canonicalization and reuse; learn candidate order while keeping verification outside the model. Compare solved tasks at equal verifier budget, not just fewer expansions. | Existing L049/L303. `cl_search.c:82-95,241-250,287-295` hashes outputs on examples/probes and prunes matches. **Finite-probe equality is not proof of universal semantic equivalence.** Do not label that pruning exact. L517 already covers related exploration diagnostics. | +| CUDApp / inference | Fuse legal transforms, keep recurrence state local, reuse expert weights across rows, and evaluate zero-aware layouts. | Inspect canonical module ownership before patching historical Omega copies. Existing prefill L403/L369 and serving L354; no duplicate kernel worker. GDN already has explicit reuse/fusion work, not an untouched discovery. | +| Output head / speculative work | Cheap screening plus a certified bound, then exact recheck of survivors; verify multiple candidate tokens together when acceptance justifies the work. | Exact-head L314 and chunked work L369 already exist. They are classical rejection/filtering methods, not Grover search. This audit does not remeasure their historical claims. | +| State / KV / precision | Preserve needed information with fewer reads/writes; batch updates where mathematically valid. | L313 exists, but its ledger explicitly corrects an earlier train PASS: BF16 state was OFF, so that train did not qualify the BF16 arm. Do not promote “present in binary” to “tested live.” | +| Aienux Store / disk | Reuse validated immutable-object results within a valid trust context; batch contiguous extent I/O. | Parent confirmed unit-by-unit read/write loops at `18e2765: native/store/store_engine.c:71-105,330-343`. Existing L341 covers Store; L199 covers the driver work. Preserve authentication, corruption rejection, I/O error order and crash recovery. | +| Aienux crypto | Better field representation and joint public-input scalar multiplication. | Existing L339 already reports a qualified branch. Do not create a duplicate fix from the old main snapshot; integration and boot status must be checked separately. No new crypto timing claimed here. | +| Interplane / Synapse / AEGIS | Batch pure work, reduce serialization and repeated hashes; reuse only context-complete immutable evidence. | Existing L342 owns Synapse/AEGIS efficiency. Interplane has explicit replay/duplicate checks; Crossveil states it never caches/upgrades/reuses a decision. AEGIS `policy_guard.rs:98-109` runs deterministic pre-dispatch checks before model opinion. **Do not cache permission decisions across changed grants, revocation, nonce, identity or world state.** | +| CI / agent orchestration | Content-addressed common work once, changed work only; share builds and one model load across qualification cases. | L307/L335 cover judge reuse; L337 polling; L384 merge train. Old audit “unowned” labels are stale. A reused result must bind the complete executable/environment inputs and retain negative controls. | +| Training / Allen / rig | Small search-policy models, fused optimizer updates, structured representations and sufficient-statistic features. | Canonical training main and `aien0/m20` resolve to the same inspected commit; the assigned L303 worktree was absent. No trained-policy advantage was verified. Allen says pre-alpha; rig engine README says in progress. Do not invent gains for missing implementations. | +| FORGE / energy | Reduce transfers, repeated preparation, checkpoint work and busy waiting while retaining qualification. | Existing L343. Reversible-computing theory is a motivation to inspect erasure and movement, not a measured energy gain on CMOS hardware.[11] | + +The full `systems-audit.md` is the delegated historical input. **This table supersedes its “unassigned” owner statements for Store and crypto, and corrects its implication that sample-based search pruning establishes exact semantic equivalence.** Parent source checks and ledger reconciliation are distinct from independent hardware qualification. + +## 5. What the original orbital ideas do and do not imply + +A tetrahedral arrangement can suggest symmetry, balanced coordinates or an orthogonal hybrid basis. Wolfram checked that four tetrahedral **spatial directions** have off-diagonal dot products -1/3; they are not four orthogonal axes in three dimensions. Separately, the four-component normalized Hadamard basis is orthogonal. Neither construction reduces the dimension of a general computation by itself. + +“Belt to poles” is not enough to identify a unique computational operator. If it means redistributing amplitude by a basis transformation, the useful question is whether the transformed problem has fewer outliers, lower rank, exploitable sparsity or cheaper operations after paying transformation costs. A visually striking orbital animation alone does not establish that. + +Exchange symmetry can reduce a problem when its state and operators genuinely share that symmetry. Reordering arbitrary learned experts does not make them interchangeable, nor does geometric resemblance establish a valid rewrite. + +## 6. What needs actual quantum or photonic hardware + +- **Grover/amplitude amplification:** a quadratic oracle-query advantage, not free exhaustive search on a classical GPU. Preparation, coherent reversible oracle, reflections and measurement must be counted.[5] +- **Amplitude estimation:** potentially useful for estimation workloads with suitable coherent access; not obtained by replacing classical sampling with a statevector simulator.[5] +- **HHL/QSVT:** potentially useful for structured linear-algebra tasks with the right access model, conditioning, precision and small output observables. Preparing generic classical model weights and reading a full answer can remove the attraction. Tang's dequantization result is a warning to compare the access assumptions with strong classical baselines, not proof that all quantum algorithms lose.[2][3][4] +- **Quantum walks, annealing, QAOA and VQE:** problem-specific candidates, not general acceleration of program search or neural-network training. Count embedding, shots, coherent depth, classical optimization and time to a verified solution.[6][9][15] +- **Hamiltonian simulation:** a credible use of quantum computation for intrinsically quantum systems, distinct from accelerating the current inference engine.[14] +- **Photonic / continuous-variable / squeezed / cat states:** need a specified physical device and workload. Gaussian-state processes under the restricted operations in the cited theorem are efficiently classically simulable. Optical matrix multiplication is not by itself quantum advantage; conversion, precision, loss and control costs still count.[16] +- **Error-corrected/topological computation:** error correction consumes physical resources; below-threshold operation is not an AIEN application-speed receipt.[10] + +A full complex128 statevector alone occupies **16 GiB at 30 qubits, 64 GiB at 32, and 128 GiB at 33** (Wolfram checked). This is a bound for that representation, not all quantum simulation: stabilizer, low-entanglement/tensor-network and Gaussian methods can exploit structure. Simulating arbitrary quantum parallelism is not a free route to hardware parallelism. + +## 7. Existing quantum work must not be mistaken for a speed result + +The project already has [AT-0 #358](https://github.com/aien-dev/omega-mv/issues/358) and [AT-1 #371](https://github.com/aien-dev/omega-mv/issues/371), the relational clock-system experiments. Their issue discussions distinguish software conformance, inconclusive blinded/outside replication claims and untested physical claims. AT-1's close-out explicitly says there is no automatic AT-2 and the engineering effort returns to finishing AIEN. + +They are relevant prior research, not evidence that removing wall-clock time from a mathematical formulation removes hardware work. This audit does not reopen them or claim a discovery about physical time. + +## 8. Recommended order and acceptance + +1. **Zero-structure inventory, lossless representation, then exact execution probe.** Cheapest new lead with directly observed checkpoint structure. First determine whole-model prevalence and routing-weighted importance; do not project one expert onto the model. +2. **Rotation-aware low-bit representation.** Compare at equal total bit budget and quality, with a real candidate layout. Preserve an explicit approximate lane and account for nonlinearities and transform overhead. +3. **Finish and reuse existing exact-work reductions.** Resolve current owner/integration gates for Store, search, output filtering, common builds and shared qualification rather than building a second implementation. +4. **Targeted factorization/shared subspaces only where data support it.** Keep a dense control, activation-weighted error and a full storage/compute cost model. +5. **Quantum/photonic coprocessors as separate research, not an engine replacement recommendation.** A concrete workload and resource model are prerequisites; no hardware purchase or service change follows from this audit. + +All performance comparisons must use the same model/task, hardware, precision contract and concurrency, and include preparation, metadata, readout/verification, bytes moved and joules. Wolfram's illustrative Amdahl checks show why a component win is not a system win: halving an 80%-of-runtime component gives 1.667x overall; halving a 20% component gives 1.111x. These are examples, not measured AIEN fractions. + +## Reproduction and qualification status + +``` +OPENBLAS_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 uv run --with numpy weight_probe.py +OPENBLAS_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 uv run --with numpy sparsity_followup.py +OPENBLAS_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 uv run --with numpy --with ml-dtypes validate_probe.py +``` + +The first two require read-only access to the checkpoint location named in the scripts; the third uses synthetic bytes only. No weights are committed. `checks.wl` and `wolfram-results.json` preserve the original Wolfram calculations; `geometry-check.wl` and its result preserve the final geometry check. + +The probes ran successfully on the Mac CPU. Independent `ml_dtypes.float8_e4m3fn` comparison matched all **254 finite byte encodings**, including signed zero; both NaN codes were refused. Explicit Hadamard/inverse, quantizer and rank-one controls passed. This is an independent library oracle, **not** an independent human code review or a model-quality gate. + +**Verdict:** static representation evidence and mathematical identities checked. Model accuracy, full-checkpoint prevalence, native kernel equivalence, latency, energy, hardware advantage and production integration remain **NOT_RUN / UNMEASURED** in this audit. Existing owners retain their separate qualification obligations. + +## Broad quantum mechanism matrix + +| Mechanism / where superposition enters | What can help classical systems (transferable) | Quantum-only requirements / limits | +|---|---|---| +| 1. **Relative phase + interference** (Hadamard/Fourier, phase kickback): amplitudes add/cancel to expose structure rather than read every branch. | FFT/WHT, phase-aware signal processing, structured transforms. | Coherent gates and matched oracle; measurements yield samples, not all amplitudes. | +| 2. **Encodings:** basis/amplitude/phase; orbital, spin, polarization, path, time-bin, momentum, energy | Representation, feature maps, packing, modal transforms; efficient distribution loading is special, not arbitrary.[13] | Encoding is not an algorithm. Amplitude loading can be costly; carrier choice does not change readout limits. | +| 3. **Entanglement / Schmidt rank / tensor networks** | MPS/TT, tree networks, low-rank factorization and optimized contraction; bond dimension is a complexity budget. Restricted entanglement permits efficient classical simulation.[1] | High entanglement can defeat these regimes, but does not itself prove application advantage. | +| 4. **Exchange symmetry / boson-fermion statistics** | Permutation invariance, symmetry-adapted bases, antisymmetric determinants; remove redundant degrees of freedom. | Physical identical-particle preparation/detection is hardware-specific; symmetry reduction itself is classical. | +| 5. **QFT / Hadamard / phase estimation** | FFT/WHT, spectral methods, modular arithmetic, eigensolvers. | Needs controlled coherent evolution and eigenstate overlap; Shor-style wins exploit periodic structure, not a generic transform. | +| 6. **Grover / amplitude amplification** | Importance sampling, branch-and-bound, heuristics; compare oracle cost too. | Quadratic query gain for unstructured search; coherent oracle/reflections and state prep are paid.[5] | +| 7. **Amplitude estimation / Monte Carlo** | Variance reduction, quasi-Monte Carlo, stratification, control variates; account for precision. | Quadratic sampling gain assumes coherent state prep, controlled oracle and sufficient depth; noise/measurement cost matter.[5] | +| 8. **Quantum walks** | Graph spectra, classical walks, sparsification, diffusion. | Requires coherent walk/oracle and target readout; oracle separations do not imply generic graph gains.[6] | +| 9. **HHL / quantum linear algebra** | Krylov/preconditioned solvers, low-rank methods, randomized linear algebra; define output needs. Dequantization matches a candidate under strong access assumptions.[2] | Sparse, well-conditioned operator; efficient access and prepared RHS; output is a state/observable, not all entries of x.[3] | +| 10. **Block encoding / QSVT** | Polynomial filters, matrix-free operators, low-rank/spectral transforms, stability analysis. | Block-encoding access/normalization, ancillas, controlled gates and approximation degree can dominate.[4] | +| 11. **Adiabatic / annealing / QAOA / VQE** | Variational optimization, warm starts, symmetry ansätze, graph decomposition, hybrid loops; VQE is hybrid.[9] | Requires quantum hardware; ansatz, shots, embedding/control and readout matter. No general annealing speedup; compare full time-to-solution.[15] | +| 12. **Hamiltonian simulation / Trotterization** | Product formulas, operator splitting, sparse exponentials, commutator-aware schedules. | Local Hamiltonian encoding, synthesis and error budget; most compelling for quantum-system simulation.[14] | +| 13. **Continuous-variable squeezed/cat states; photonics** | Optical linear algebra and transforms may inspire classical accelerators; distinguish coherent optics from quantum. | Restricted Gaussian preparations, quadratic operations and canonical measurements are classically simulable; non-Gaussianity, loss, detectors and task matter. Photonic multiplication alone is not quantum advantage.[16] | +| 14. **Simulation boundaries: stabilizer/Gaussian circuits, low treewidth/entanglement** | Identify structures enabling classical simulation; use contraction and stabilizer/Gaussian algebra.[1][16] | Non-Clifford, high treewidth/entanglement or non-Gaussian states may be hard to simulate; hardness is not practical advantage. | +| 15. **Decoherence / QEC / surface or topological codes** | Error budgets, robustness, redundancy, decoder co-design. | Encoding, syndrome measurement and decoding cost resources; below-threshold is necessary, not sufficient. Recent surface-code results retain a large gap to practical algorithms.[10] | +| 16. **Reversible computation / Landauer** | Reduce writes/erases and data movement where worthwhile; include energy accounting. Logical reversibility can avoid erasure in principle.[11] | Landauer concerns irreversible erasure, not quantum-device energy. Reversible methods may trade time/memory/control for energy. | +| 17. **Measurement / readout / no-signalling** | Return sufficient statistics; count output size and communication. | Shots have noise; vector/matrix output costs at least output size. Entanglement cannot signal faster than light.[12] | + +## Sources + +[1] https://arxiv.org/abs/quant-ph/0301063v2 — Efficient classical simulation of slightly entangled quantum computations +[2] https://arxiv.org/abs/1807.04271 — A quantum-inspired classical algorithm for recommendation systems +[3] https://arxiv.org/abs/0811.3171 — Quantum algorithm for linear systems of equations +[4] https://arxiv.org/abs/1806.01838 — Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics +[5] https://arxiv.org/abs/quant-ph/0005055 — Quantum Amplitude Amplification and Estimation +[6] https://arxiv.org/abs/quant-ph/0209131 — Exponential algorithmic speedup by quantum walk +[7] https://arxiv.org/abs/2404.00456 — QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs +[8] https://arxiv.org/abs/2307.13304 — QuIP: 2-Bit Quantization of Large Language Models With Guarantees +[9] https://arxiv.org/abs/1304.3061 — A variational eigenvalue solver on a quantum processor +[10] https://www.nature.com/articles/s41586-024-08449-y — Quantum error correction below the surface code threshold +[11] https://www.cs.princeton.edu/courses/archive/fall06/cos576/papers/bennett73.html — Logical Reversibility of Computation +[12] https://arxiv.org/abs/quant-ph/0212023 — Quantum Information and Relativity Theory +[13] https://arxiv.org/abs/quant-ph/0208112 — Creating superpositions that correspond to efficiently integrable probability distributions +[14] https://doi.org/10.1126/science.273.5278.1073 — Universal Quantum Simulators +[15] https://www.physics.ucsb.edu/~martinisgroup/papers/Ronnow2014.pdf — Defining and detecting quantum speedup +[16] https://arxiv.org/abs/quant-ph/0109047 — Efficient Classical Simulation of Continuous Variable Quantum Information Processes diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/additional-pinned-source.txt b/evidence/QUANTUM_EFFICIENCY/2026-10-22/additional-pinned-source.txt new file mode 100644 index 0000000..2115e96 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/additional-pinned-source.txt @@ -0,0 +1,188 @@ +PINNED aienos-repo 18e276590424593647cd7c39c6d16c2f9f8d6027 native/store/store_engine.c RC 0 +65: +66:/* read_application_object, streamed one unit at a time through ws->unit. +67: * Like Rust, every unit is read first in order (a read failure is RE_IO +68: * whatever the bytes are), and only then is the extent judged. If out is +69: * set the semantic bytes are copied there (caller checked the size). If cmp +70: * is set, *differs reports whether the semantic bytes differ from cmp. */ +71:static int read_app_object(const st_dev *d, st_workspace *ws, const sv1_entry *e, uint8_t *out, +72: const uint8_t *cmp, int *differs) +73:{ +74: sha256_ctx ctx; +75: int graph = 0; +76: uint32_t units; +77: if (sv1_unit_count(e->byte_length, &units) || units != e->unit_count) +78: graph = 1; +79: if (!graph && sv1_object_id_begin(&ctx, e->kind, e->version, e->byte_length)) +80: graph = 1; +81: if (differs) +82: *differs = 0; +83: for (uint32_t i = 0; i < e->unit_count; i++) { +84: if (dev_read(d, e->first_unit + i, ws->unit)) +85: return RE_IO; +86: if (graph) +87: continue; +88: uint64_t start = (uint64_t)i * SV1_UNIT; +89: uint64_t take = e->byte_length > start ? e->byte_length - start : 0; +90: if (take > SV1_UNIT) +91: take = SV1_UNIT; +92: sha256_update(&ctx, ws->unit, (size_t)take); +93: if (!sv1_all_zero(ws->unit + take, SV1_UNIT - (size_t)take)) graph = 1; /* GUARD:object-padding */ +94: if (out) +95: sv1_copy(out + start, ws->unit, (size_t)take); +96: if (cmp && differs && !sv1_equal(cmp + start, ws->unit, (size_t)take)) +97: *differs = 1; +98: } +99: if (graph) +100: return RE_GRAPH; +101: uint8_t id[32]; +102: sha256_final(&ctx, id); +103: if (!sv1_equal(id, e->object_id, 32)) return RE_GRAPH; /* GUARD:object-hash */ +104: return RE_OK; +105:} +325: return ST_M_CORRUPT_RECOVERY_REQUIRED; +326: } +327: return ST_M_CORRUPT_RECOVERY_REQUIRED; +328:} +329: +330:static int write_object(const st_dev *d, st_workspace *ws, uint64_t first, uint32_t units, +331: const uint8_t *bytes, uint64_t len) +332:{ +333: for (uint32_t i = 0; i < units; i++) { +334: uint64_t start = (uint64_t)i * SV1_UNIT; +335: uint64_t take = len > start ? len - start : 0; +336: if (take > SV1_UNIT) +337: take = SV1_UNIT; +338: sv1_zero(ws->unit, SV1_UNIT); +339: sv1_copy(ws->unit, bytes + start, (size_t)take); +340: if (dev_write(d, first + i, ws->unit)) +341: return ST_E_IO; +342: } +343: return 0; +344:} +345: +346:typedef struct { +PINNED aienos-repo 18e276590424593647cd7c39c6d16c2f9f8d6027 native/net/x25519.c RC 0 +40:static void sub(fe o, const fe a, const fe b) { for (int i = 0; i < 16; i++) o[i] = a[i] - b[i]; } +41: +42:static void mul(fe o, const fe a, const fe b) +43:{ +44: int64_t t[31]; +45: for (int i = 0; i < 31; i++) t[i] = 0; +46: for (int i = 0; i < 16; i++) +47: for (int j = 0; j < 16; j++) t[i + j] += a[i] * b[j]; +48: for (int i = 0; i < 15; i++) t[i] += 38 * t[i + 16]; +49: for (int i = 0; i < 16; i++) o[i] = t[i]; +50: carry(o); +51: carry(o); +52:} +53: +54:static void sqr(fe o, const fe a) { mul(o, a, a); } +55: +56:/* o = i^(p-2) = 1/i. The exponent is public, so its branches are too. */ +57:static void invert(fe o, const fe in) +58:{ +59: fe c; +60: memcpy(c, in, sizeof c); +PINNED aienos-repo 18e276590424593647cd7c39c6d16c2f9f8d6027 native/sig/ed25519.c RC 0 +540: aienos_sha512_update(&c, pk, 32); +541: aienos_sha512_update(&c, msg, msg_len); +542: aienos_sha512_final(&c, kh); +543: aienos_sig_sc_reduce(ks, kh); +544: +545: ge_scalarmult(&sB, &k.B, sig + 32, &k); +546: ge_scalarmult(&kA, &A, ks, &k); +547: ge_neg(&kA, &kA); +548: ge_add(&chk, &sB, &kA, &k); /* [S]B - [k]A, must equal R */ +549: ge_tobytes(enc, &chk); +550: if (!aienos_sig_ct_equal(enc, sig, 32)) return AIENOS_SIG_ERR_INVALID; /* GUARD:r-check */ +551: return AIENOS_SIG_OK; +552:} +PINNED omega a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a src/crumbline/cl_search.c RC 0 +70: size_t npending; +71: uint32_t pending_since; +72: uint8_t hyps[MAX_HYP][CL_DIGEST_BYTES]; +73: size_t nhyp; +74: uint32_t max_queries; +75: bool stop, solved, first_submit_done; +76:} S; +77: +78:static void emit(S *s, const ClEvent *ev) { +79: if (s->sink && s->sink->emit) s->sink->emit(s->sink->ctx, ev); +80:} +81: +82:static void hash_vals(const uint64_t *v, uint32_t w, uint64_t *h1, uint64_t *h2) { +83: uint64_t a = 0x9E3779B97F4A7C15ULL, b = 0xC2B2AE3D27D4EB4FULL; +84: for (uint32_t i = 0; i < w; ++i) { +85: a = (a ^ v[i]) * 0x100000001B3ULL; +86: a ^= a >> 29; +87: b = (b + v[i]) * 0xFF51AFD7ED558CCDULL; +88: b ^= b >> 33; +89: } +90: *h1 = a; +91: *h2 = b; +92:} +93: +94:/* true if an equivalent state with cost <= insns already exists */ +95:static bool equiv_seen(S *s, uint64_t h1, uint64_t h2, uint32_t insns) { +240: +241: const uint64_t *probes = cl_probe_inputs(); +242: Node *root = &s.nodes[0]; +243: root->id = 0; +244: root->parent = UINT32_MAX; +245: root->op = UINT16_MAX; +246: for (uint32_t k = 0; k < s.n; ++k) s.vals[k] = s.inputs[k]; +247: for (uint32_t k = 0; k < W_PROBES; ++k) s.vals[s.n + k] = probes[k]; +248: uint64_t h1, h2; +249: hash_vals(s.vals, s.w, &h1, &h2); +250: equiv_seen(&s, h1, h2, 0); +251: s.count = 1; +252: +253: uint32_t next_id = 1; +254: size_t level_start = 0, level_end = 1; +255: int best_matches = -1; +256: uint32_t best_node = 0, best_parent = 0; +257: uint16_t best_op = 0; +258: uint32_t robust_need = cfg.robust_min_pct ? (s.n * cfg.robust_min_pct + 99) / 100 : UINT32_MAX; +259: +260: for (uint32_t depth = 1; depth <= cfg.max_depth && !s.stop; ++depth) { +261: size_t level_kept = 0; +262: for (size_t pi = level_start; pi < level_end && !s.stop; ++pi) { +263: res->expansions++; +264: for (size_t oi = 0; oi < bank->count && !s.stop; ++oi) { +265: if (res->generated >= cfg.max_candidates) { +266: s.stop = true; +267: break; +268: } +269: res->generated++; +270: const Node *parent = &s.nodes[pi]; +271: const ClOp *op = &bank->ops[oi]; +272: ClEvent ev = {CL_EV_EXPAND, CL_PRUNE_NONE, CL_VERIFY_NOT_REACHED, CL_FIT_NONE, (uint16_t)oi, +273: parent->id, next_id++, 0, 0}; +274: uint32_t nsteps = parent->nsteps + op->steps.n; +275: uint32_t insns = parent->insns + op_insns(op); +276: if (nsteps > CL_MAX_STEPS) { +277: ev.prune = CL_PRUNE_STEP_CAP; +278: emit(&s, &ev); +279: continue; +280: } +281: if (insns + 1 > cfg.max_program_insns) { +282: ev.prune = CL_PRUNE_COST; +283: res->pruned_cost++; +284: emit(&s, &ev); +285: continue; +286: } +287: const uint64_t *pv = &s.vals[pi * s.w]; +288: for (uint32_t k = 0; k < s.w; ++k) scratch[k] = cl_steps_eval(&op->steps, pv[k]); +289: ev.exec_cost = s.w; +290: hash_vals(scratch, s.w, &h1, &h2); +291: if (equiv_seen(&s, h1, h2, insns)) { +292: ev.prune = CL_PRUNE_EQUIV; +293: res->pruned_equiv++; +294: emit(&s, &ev); +295: continue; +296: } +297: res->evaluated++; +298: uint32_t mismatch = 0; +299: for (uint32_t k = 0; k < s.n; ++k) +300: if ((scratch[k] & s.mask) != crumb->out[k][0]) mismatch++; \ No newline at end of file diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/byte-confirm-replay.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/byte-confirm-replay.json new file mode 100644 index 0000000..b7c3458 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/byte-confirm-replay.json @@ -0,0 +1,300 @@ +{ + "verdict": "PASS", + "method": "raw E4M3 byte magnitude bits, independent of floating-point decoder", + "scope": "one selected expert only; no generation or timing", + "result": { + "zero_counts": { + "gate_proj": 280, + "up_proj": 280, + "down_proj": 280 + }, + "identical_support": true, + "zero_indices": [ + 1, + 2, + 3, + 4, + 6, + 7, + 9, + 10, + 13, + 14, + 15, + 16, + 18, + 19, + 22, + 23, + 26, + 27, + 30, + 31, + 32, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 42, + 43, + 44, + 45, + 46, + 47, + 49, + 52, + 53, + 54, + 55, + 56, + 59, + 60, + 61, + 62, + 64, + 65, + 67, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 79, + 81, + 82, + 84, + 85, + 88, + 89, + 92, + 93, + 96, + 97, + 98, + 100, + 101, + 102, + 107, + 110, + 112, + 113, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 128, + 132, + 134, + 136, + 137, + 138, + 140, + 147, + 149, + 150, + 154, + 155, + 158, + 159, + 160, + 162, + 163, + 164, + 166, + 168, + 169, + 170, + 177, + 178, + 180, + 181, + 183, + 185, + 186, + 189, + 190, + 192, + 193, + 194, + 195, + 197, + 199, + 205, + 207, + 208, + 214, + 217, + 221, + 223, + 224, + 226, + 229, + 232, + 234, + 235, + 236, + 237, + 238, + 241, + 242, + 243, + 248, + 250, + 253, + 254, + 257, + 258, + 259, + 261, + 263, + 265, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 275, + 276, + 277, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 290, + 293, + 295, + 297, + 298, + 302, + 303, + 307, + 309, + 311, + 312, + 313, + 315, + 316, + 318, + 325, + 327, + 330, + 332, + 334, + 335, + 340, + 341, + 342, + 344, + 345, + 349, + 350, + 352, + 355, + 361, + 362, + 363, + 365, + 367, + 370, + 374, + 375, + 376, + 383, + 384, + 385, + 386, + 387, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 399, + 401, + 402, + 404, + 406, + 407, + 409, + 411, + 414, + 416, + 419, + 420, + 421, + 422, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 432, + 434, + 437, + 444, + 445, + 446, + 447, + 448, + 451, + 452, + 453, + 454, + 456, + 457, + 458, + 459, + 460, + 461, + 463, + 466, + 467, + 469, + 472, + 474, + 475, + 477, + 478, + 479, + 481, + 484, + 486, + 488, + 489, + 492, + 499, + 500, + 501, + 502, + 503, + 505, + 509, + 511 + ], + "tensor_hashes": { + "gate_proj": "81e8478424044de8eb00b884f24aaf93d65f8a402f4bc788a96b7d6da6212838", + "up_proj": "20e8a45852934d5be753e701e2c1f8cad90c4e5c5c98f1419421fb0923aef155", + "down_proj": "e0132e90c275e9d168ec7480c08b7d1f083a7cdebce00081a7e1fb965d513fb8" + } + } +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/checks.wl b/evidence/QUANTUM_EFFICIENCY/2026-10-22/checks.wl new file mode 100644 index 0000000..fd3c483 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/checks.wl @@ -0,0 +1,26 @@ +(* L581: symbolic/cost checks, not timing predictions. Stateless kernel. *) +ClearAll[hh,ww,xx,rr,theta,vectors]; +hh={{1,1},{1,-1}}/Sqrt[2]; ww={{3,2},{-1,4}}; xx={x1,x2}; +ExportString[<| +"basis_identity_residual" -> Simplify[(ww.Transpose[hh]).(hh.xx)-ww.xx], +"orthogonality" -> Simplify[Transpose[hh].hh], +"nonlinearity_does_not_commute" -> ToString[Simplify[(hh.xx)^2-hh.(xx^2)],InputForm], +"four_orbital_hybrid_orthogonality" -> Simplify[With[{tt=KroneckerProduct[{{1,1},{1,-1}},{{1,1},{1,-1}}]/2},tt.Transpose[tt]]], +"interference_probability" -> ToString[FullSimplify[Abs[(1+Exp[I theta])/2]^2,Element[theta,Reals]],InputForm], +"expert_matrix_entries" -> 2048*512, +"rank64_entry_ratio" -> N[64*(2048+512)/(2048*512)], +"rank64_bf16_vs_fp8_byte_ratio_no_metadata" -> N[2*64*(2048+512)/(2048*512)], +"rank_break_even_equal_precision" -> ToString[Reduce[rr*(2048+512)<2048*512 && rr>0,rr,Integers],InputForm], +"rank_break_even_bf16_vs_fp8" -> ToString[Reduce[2*rr*(2048+512)<2048*512 && rr>0,rr,Integers],InputForm], +"hadamard2048_add_sub_count_excluding_normalization" -> 2048*Log2[2048], +"complex128_state_GiB" -> Table[{nn,16*2^nn/2^30},{nn,{30,32,33}}], +"uniform_independent_eight_slot_expert_union_ASSUMPTION" -> N[256*(1-(1-8/256)^8)], +"rotation_relative_weight_error_reduction_percent" -> (100*(1-#)& /@ {0.8443305493994437,0.9776014339729382,0.9022996024413539}), +"rank64_relative_weight_error_percent" -> 100*{0.6085668140383202,0.8560844464246313,0.7771349973363622}, +"rank204_relative_weight_error_percent" -> 100*{0.15022797722044212,0.5998930960862606,0.49053763737893785}, +"selected_first_expert_zero_channel_fraction" -> N[280/512], +"selected_first_expert_zero_weight_payload_bytes" -> 280*2048*3, +"selected_first_expert_total_weight_payload_bytes" -> 512*2048*3, +"amdahl_halving_80percent_EXAMPLE" -> N[1/(1-4/5+(4/5)/2)], +"amdahl_halving_20percent_EXAMPLE" -> N[1/(1-1/5+(1/5)/2)] +|>,"RawJSON"] diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/doctrine-check-receipt.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/doctrine-check-receipt.json new file mode 100644 index 0000000..4399d35 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/doctrine-check-receipt.json @@ -0,0 +1,55 @@ +{ + "source": "1a3594340c70969c245554b07062efd8ead8a026", + "mac_attempt": { + "exit_code": 0, + "stdout": "----------------------------------------------------------------------\ncheck_doctrine: scanned 30 files; 0 failure(s); 0 deferred finding(s).\ncheck_doctrine: PASS\n", + "stderr": "awk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\nawk: newline in string DOCTRINE_V1=0\nATLAS_... at source line 1\n", + "verdict": "INVALID: parser errors despite script printing PASS" + }, + "minimal_mac_multiline_awk": { + "exit_code": 2, + "stdout": "", + "stderr": "/usr/bin/awk: newline in string A=0\nB=1... at source line 1\n" + }, + "spark_exact_source_replay": { + "exit_code": 0, + "stdout": "----------------------------------------------------------------------\ncheck_doctrine: scanned 30 files; 0 failure(s); 0 deferred finding(s).\ncheck_doctrine: PASS\n", + "stderr": "", + "host": "spark", + "inputs": { + "doctrine/ARCHITECTURE.md": "9035853fd692da8bc99918abb4b497294831acbe08bc6a2a3cafc179cdb89ec3", + "doctrine/AIEN.md": "f23a9debb8c5bed0ef59869533927fe90f6c26e96ef904a603d499ee48d3dabb", + "doctrine/ATLAS.md": "245a6b586eee0f0f6c4b190ed2e44ef5382d81fab6d1a9c5f1d1ea74f4530b18", + "doctrine/PHYSICS.md": "c3c0bcdf8bb11ebf560151b81f499fdb9281b32dc72eb906a391f929e2636fec", + "doctrine/ROADMAP.md": "6f279fda3fda42defdf660a928fadae7539398c2f2fed8d023871907157c24a4", + "doctrine/TRUST.md": "b133e793510ff8aa4742c478880cda968a189f832377f0828883e59696c1b101", + "doctrine/OMEGA.md": "bf126edeef4481fa8a732b8e67ec19cadf7a1c11870d29a36770838a5cbb3f21", + "doctrine/FORGE.md": "229e74e68fefa401c423e86b3fd06848e3a6049311b4617f88a44a6a619d03f4", + "doctrine/INDEX.md": "466e1ed7287f371717b7dd9730d95ad64fda838fea40826bd142fd9cc4d3b40f", + "doctrine/DISCOVERY.md": "1894a52db714a7052f2f5b20902e2c285486697d2c70732ab1c22ba95341f18b", + "doctrine/SOVEREIGNTY.md": "4810e10fa5722907a35655f429118440bc0df079bb846bc43aa3d5f30a05e47a", + "scripts/check_doctrine.sh": "ea5c9069d5b716b294b01bca9c77bb778568703f55f9ecebd3358c983509b68a", + "docs/milestone-2-spec.md": "0a2abf05adc816e82e83bf6cd24e7a23b2c5cd268c72d7ee7b6eeacbf31f6499", + "docs/milestone-5-spec.md": "1281343f8135fefe618086a81415fa82699ee00632692a707b3c290781e09b5f", + "docs/milestone-14-spec.md": "a484d5d7731b30e5aaf5ab86cd0b00dfcf5d19c0c709c0c296d5248dc9c0919a", + "docs/milestone-6-spec.md": "427c7b213ff124c1cfc7264b75460af1f756e02b042bfa905ffba7aa1fbb199d", + "docs/milestone-18-spec.md": "205192b735ee2f858c628326f3527b801f9fb3faca18ae6cc98c074b856ffda3", + "docs/milestone-9-spec.md": "20d2e3a180229a59deb1a84bd1b029d3b2092604c498a7f764b3b46504c6c8bc", + "docs/milestone-12-spec.md": "622b1212c483422dabd8dd187b5cba7dcc63c1dd957e8c6052c09de407ea0cf0", + "docs/milestone-7-spec.md": "e7f3d78ea216d9a4092cf76397cffabacc89a119c3a9723eeae617be50b7804a", + "docs/milestone-13-spec.md": "b8dd1ef86f97ee0a45875380a7a36a09e3fd86bd96f347fa36706f4c81f13446", + "docs/milestone-17-spec.md": "3b2ef71eaecae95f54ca13232e06076bb25ac7c8b25212813c31b80e2d629b76", + "docs/milestone-8-spec.md": "30aaeb25a44b5b9c62df479704bebde167afb8ac7484e74a114adaf6b98c2b8d", + "docs/milestone-4-spec.md": "314393d101d1e5c3fe56b47609361641295bd30f8ef0d392dbf87d28099a3984", + "docs/milestone-15-spec.md": "5c941723d930608b2578956698205357ff034b581cdf312fd4aa2adbc98bb52a", + "docs/milestone-11-spec.md": "2ef578ae4fcb440dde9ac660d48cf538981e6828ba7e32691561b91adecb570d", + "docs/milestone-3-spec.md": "c58d4f421032f0abcb72a34f4cfa90639caadeaf9b9319d8b3f814d9e5c4e72c", + "docs/milestone-10-spec.md": "7dd89d64389b960e38ed91527b2e922c49506a72c15a54ea0e39f60f6640f181", + "docs/milestone-1-spec.md": "7f9e1fa8cd00231d3746e33ce87c69528dd9c0468e330c42769eec2b75963a13", + "docs/milestone-16-spec.md": "c5e80c38027f131896628bea24557908df5960ef94cce67349da65f4b8aa411a", + "docs/milestone-19-spec.md": "900a18cc653ad9770f1de4fb047c30881a22229a6ae5fda2972d68e25dec2ada" + } + }, + "verdict": "PASS on Spark exact immutable inputs; Mac attempt not accepted", + "production_changes": false +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check-results.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check-results.json new file mode 100644 index 0000000..092fa90 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check-results.json @@ -0,0 +1,60 @@ +{ + "provenance": "Transcription of actual WolframLanguageEvaluator RawJSON result for geometry-check.wl; not a device benchmark", + "tetrahedron_direction_Gram": [ + [ + 1, + -0.3333333333333333, + -0.3333333333333333, + -0.3333333333333333 + ], + [ + -0.3333333333333333, + 1, + -0.3333333333333333, + -0.3333333333333333 + ], + [ + -0.3333333333333333, + -0.3333333333333333, + 1, + -0.3333333333333333 + ], + [ + -0.3333333333333333, + -0.3333333333333333, + -0.3333333333333333, + 1 + ] + ], + "four_component_hybrid_Gram": [ + [ + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "zero_channel_fraction": 0.546875, + "dense_three_projection_bytes": 3145728, + "zero_channel_payload_bytes": 1720320, + "remaining_channels": 232, + "rank64_ideal_factor_payload_reduction_BF16_vs_FP8_percent": 68.75 +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check.wl b/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check.wl new file mode 100644 index 0000000..8922cb9 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/geometry-check.wl @@ -0,0 +1 @@ +ClearAll[v,h,x]; v={{1,1,1},{1,-1,-1},{-1,1,-1},{-1,-1,1}}/Sqrt[3]; h=KroneckerProduct[{{1,1},{1,-1}},{{1,1},{1,-1}}]/2; ExportString[<|"tetrahedron_direction_Gram"->Simplify[v.Transpose[v]],"four_component_hybrid_Gram"->Transpose[h].h,"zero_channel_fraction"->N[280/512],"dense_three_projection_bytes"->3*512*2048,"zero_channel_payload_bytes"->3*280*2048,"remaining_channels"->512-280,"rank64_ideal_factor_payload_reduction_BF16_vs_FP8_percent"->100*(1-2*64*(2048+512)/(2048*512))|>,"RawJSON"] diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/independent_byte_check.py b/evidence/QUANTUM_EFFICIENCY/2026-10-22/independent_byte_check.py new file mode 100644 index 0000000..18ba6df --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/independent_byte_check.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +"""Read-only byte-level zero-channel confirmation; no FP8 decoder or GPU.""" +import json +import pathlib +import shlex +import subprocess + +REMOTE = r''' +import hashlib,json,pathlib,struct +p=pathlib.Path('/home/drakestapleton/models/qwen3.6-35b-a3b-fp8-95a723d0/layers-0.safetensors') +zeros={};hashes={} +with p.open('rb') as f: + n=struct.unpack(' one FP8 tensor of 257 experts `[1024][2048]` (each expert's gate rows, then its up\n7://! rows; the 128-blocks concatenate with them). `down_proj` likewise -> 257 x `[2048][512]`.\n8://! - `mlp.gate.weight` (bf16 `[256][2048]`) with `mlp.shared_expert_gate.weight` (`[1][2048]`) as\n9://! row 256 -> the router (`Router::alloc_shape(layers, 256, 1)`), with the post-attention norm\n10://! folded to `1 + w`; its directories point at the two expert tensors (entry 256 = the shared\n11://! expert, the graph's ninth group, weight sigmoid(shared gate . xn)).\n12://!\n13://! The host reference this must match is [`crate::qwen38`] (the `moe` branch).\n14:use std::path::Path;\n15:\n16:use aien_omega_bf16::Bf16Tensor;\n69:/// Appends one FP8 matrix (whole 128-blocks, `[n][k]`) to an expert tensor's bytes and scales.\n70:fn push_fp8(\n71: name: &str,\n72: m: Matrix,\n73: n: usize,\n74: k: usize,\n75: w: &mut Vec,\n76: s: &mut Vec,\n77:) -> Result<(), String> {\n78: match m {\n79: Matrix::Fp8 {\n80: n: mn,\n81: k: mk,\n82: w: mw,\n83: scales,\n84: } if (mn, mk) == (n, k) => {\n85: w.extend_from_slice(&mw);\n86: s.extend_from_slice(&scales);\n87: Ok(())\n88: }\n89: Matrix::Fp8 { n: mn, k: mk, .. } => {\n90: Err(format!(\"{name}: [{mn}][{mk}], expected [{n}][{k}]\"))\n91: }\n92: Matrix::Bf16 { .. } => Err(format!(\"{name}: bf16 (the expert tensors take FP8)\")),\n93: }\n94:}\n95:\n96:/// The layer's 257-expert gate|up and down tensors (routed 0..256, then the shared expert).\n385: )\n386: }\n387: .map_err(gpu(\"q36 graph set_layer\"))?;\n388: }\n389: graph\n390: .set_final_norm(&final_norm)\n391: .map_err(gpu(\"q36 graph set_final_norm\"))?;\n392: // HUM L314 exact two-pass head, on by default (AIEN_Q36_EXACT_HEAD=0 keeps the plain head):\n393: // greedy tokens identical to the full bf16 head by construction (exact_head.rs), half the\n394: // head's bytes. The engine turns it off for sampled requests.\n395: let (head_screen, head_coef) = if std::env::var(\"AIEN_Q36_EXACT_HEAD\").as_deref() == Ok(\"0\") {\n396: eprintln!(\"qwen36 omega: exact two-pass head OFF (AIEN_Q36_EXACT_HEAD=0)\");\n397: (None, None)\n398: } else {\n399: let t = std::time::Instant::now();\n400: let (codes, scales, coef) = crate::exact_head::chip_screen(&head)?;\n401: let screen = Fp8Tensor::upload(1, v, h, &codes, &scales).map_err(gpu(\"exact head screen\"))?;\n402: // SAFETY: the screen is owned by the returned value and dropped after the graph (field order).\n403: unsafe { graph.set_exact_head(screen.as_raw(), &coef) }.map_err(gpu(\"q36 graph set_exact_head\"))?;\n404: eprintln!(\"qwen36 omega: exact two-pass head ON (fp8b screen + Row bound, built in {:.1} s)\", t.elapsed().as_secs_f64());\n405: (Some(screen), Some(coef))\n406: };\n407: drop(head);\n408: // Negative controls for the gates (TEST ONLY): AIEN_Q36_TEST_MUTANT=4 drops the shared expert\n409: // from COMBINE, 1 shifts the SWIGLU up half, 2 the attention GATHER, 3 drops the attention gate,\n410: // 5 inverts the exact head's MASK, 6 drops its bound.\n411: if let Some(m) = graph_mutant() {\n412: eprintln!(\"qwen36 omega: TEST MUTANT {m} set (negative control; never serve this)\");\n413: graph.test_set_mutant(m);\n414: }\n415: let row_src = RowSource {\n416: layers: c.layers,", "omega@6de999da:src/omega_blackwell_codegen_gdn.c": "340: fmul(e, R(mn), R(mn), R(cl2e)); mufu(e, BW_IR_MUFU_EX2, R(mn), R(mn)); fadd(e, R(mn), R(mn), R(fone));\n341: mufu(e, BW_IR_MUFU_LG2, R(mn), R(mn));\n342: movrz(e, R(sp)); fmaxx(e, R(sp), R(xs), R(sp));\n343: movi(e, t1, C_LN2); ffma(e, R(sp), R(mn), R(t1), R(sp));\n344: /* decay = EX2(negA * softplus * log2 e) */\n345: if (MUT == 1) movi(e, dec, C_ONE);\n346: else { fmul(e, R(dec), S(scq, 0), R(sp)); fmul(e, R(dec), R(dec), R(cl2e)); mufu(e, BW_IR_MUFU_EX2, R(dec), R(dec)); }\n347: /* beta = sigmoid(b) */\n348: if (MUT == 2) movi(e, beta, C_ONE);\n349: else {\n350: fmul(e, R(beta), S(abq, 1), R(cnl2e)); mufu(e, BW_IR_MUFU_EX2, R(beta), R(beta));\n351: fadd(e, R(beta), R(beta), R(fone)); mufu(e, BW_IR_MUFU_RCP, R(beta), R(beta));\n352: }\n353:\n354: /* ---- phase D: the state update (fresh registers per step: a reused name stays live across all its uses) ---- */\n355: int aw = V(e), pa = V(e), la = V(e), kq[4], kv[4], dl[4], vq = V128(e);\n356: for (unsigned i = 0; i < 4; i++) { kq[i] = V128(e); kv[i] = V(e); dl[i] = V(e); }\n357: if (e->err) return -1;\n358: imadi(e, R(aw), R(warp), 16u * 4u, NOREG);\n359: imadi(e, R(pa), R(warp), OMEGA_GDN_HEAD_DIM * 4u, NOREG); imadi(e, R(pa), R(lane), 16u, pa); imadi(e, R(pa), R(one), OMEGA_GDN_SM_P, pa);\n360: imadi(e, R(la), R(lane), 16u, NOREG);\n361: consume(e, SB_STATE);\n362: if (spec->state_bf16) for (unsigned r = 0; r < 16; r++) bf16x4_widen(e, sq[r], sw[r]);\n363: for (unsigned r = 0; r < 16; r++) for (unsigned j = 0; j < 4; j++) fmul(e, S(sq[r], j), S(sq[r], j), R(dec));\n364: /* kv partial over this warp's 16 rows: kv_j = sum_r S[r][j] k[r], then the 8-way cross-warp sum */\n365: for (unsigned i = 0; i < 4; i++) lds128(e, kq[i], aw, OMEGA_GDN_SM_K + i * 16u, i == 0);\n366: for (unsigned j = 0; j < 4; j++) fmul(e, R(kv[j]), S(sq[0], j), S(kq[0], 0));\n367: for (unsigned r = 1; r < 16; r++) for (unsigned j = 0; j < 4; j++) ffma(e, R(kv[j]), S(sq[r], j), S(kq[r / 4], r % 4), R(kv[j]));\n368: cross_warp_sum(e, kv, pa, one, la);\n369: /* delta = (v - kv) * beta; S += k (outer) delta; S back to memory */\n370: lds128(e, vq, la, OMEGA_GDN_SM_V, 1);\n371: for (unsigned j = 0; j < 4; j++) { fsub(e, R(dl[j]), S(vq, j), R(kv[j])); fmul(e, R(dl[j]), R(dl[j]), R(beta)); }\n372: {\n373: int k2[4];\n374: for (unsigned i = 0; i < 4; i++) k2[i] = V128(e);\n375: if (e->err) return -1;\n376: for (unsigned i = 0; i < 4; i++) lds128(e, k2[i], aw, OMEGA_GDN_SM_K + i * 16u, i == 0);\n377: for (unsigned r = 0; r < 16; r++) for (unsigned j = 0; j < 4; j++) ffma(e, S(sq[r], j), S(k2[r / 4], r % 4), R(dl[j]), S(sq[r], j));\n378: }\n379: if (spec->state_bf16) {\n380: int pk[16];\n381: for (unsigned r = 0; r < 16; r++) pk[r] = V64(e);\n382: if (e->err) return -1;\n383: for (unsigned r = 0; r < 16; r++) {\n384: bf16x4_pack(e, pk[r], sq[r]);\n385: for (unsigned w = 0; w < 2; w++) stg(e, sa, r * OMEGA_GDN_HEAD_DIM * 2u + w * 4u, S(pk[r], w), udesc);\n386: }\n387: } else {\n388: for (unsigned r = 0; r < 16; r++) for (unsigned j = 0; j < 4; j++) stg(e, sa, r * OMEGA_GDN_HEAD_DIM * 4u + j * 4u, S(sq[r], j), udesc);\n389: }\n390: /* the gate prefetch: z[h] and the norm weight, consumed in phase E */\n1020: i2fp(e, hf, half);\n1021: movi(e, fq, fbits(qs)); movi(e, t1, fbits(1.0f - qs));\n1022: ffma(e, R(fq), R(hf), R(t1), R(fq));\n1023: fmul(e, R(accA), R(accA), R(sqs)); fmul(e, R(accA), R(accA), R(fq));\n1024: imadi(e, R(ra), R(tid), 4u, NOREG);\n1025: sts32(e, ra, R(accA));\n1026: bar_sync(e);\n1027: }\n1028:\n1029: /* ---- phase C: scalars of token t ---- */\n1030: int abq = V64(e), xsc = V(e), mn = V(e), sp = V(e), dec = V(e), beta = V(e);\n1031: if (e->err) return -1;\n1032: ldg_wide(e, BW_IR_LDG_E_64, abq, aab, 0, udesc, 1);\n1033: fadd(e, R(xsc), S(abq, 0), S(scq, 1));\n1034: movi(e, mn, C_M1); fmul(e, R(mn), R(xsc), R(mn)); fminn(e, R(mn), R(xsc), R(mn));\n1035: fmul(e, R(mn), R(mn), R(cl2e)); mufu(e, BW_IR_MUFU_EX2, R(mn), R(mn)); fadd(e, R(mn), R(mn), R(fone));\n1036: mufu(e, BW_IR_MUFU_LG2, R(mn), R(mn));\n1037: movrz(e, R(sp)); fmaxx(e, R(sp), R(xsc), R(sp));\n1038: movi(e, t1, C_LN2); ffma(e, R(sp), R(mn), R(t1), R(sp));\n1039: if (MUT == 1) movi(e, dec, C_ONE);\n1040: else { fmul(e, R(dec), S(scq, 0), R(sp)); fmul(e, R(dec), R(dec), R(cl2e)); mufu(e, BW_IR_MUFU_EX2, R(dec), R(dec)); }\n1041: if (MUT == 2) movi(e, beta, C_ONE);\n1042: else {\n1043: fmul(e, R(beta), S(abq, 1), R(cnl2e)); mufu(e, BW_IR_MUFU_EX2, R(beta), R(beta));\n1044: fadd(e, R(beta), R(beta), R(fone)); mufu(e, BW_IR_MUFU_RCP, R(beta), R(beta));\n1045: }\n1046:\n1047: /* ---- phase D: the state update (S stays in registers) ---- */\n1048: int aw = V(e), pa = V(e), la = V(e), kq[4], kv[4], dl[4], vq = V128(e), zq = V128(e);\n1049: for (unsigned i = 0; i < 4; i++) { kq[i] = V128(e); kv[i] = V(e); dl[i] = V(e); }\n1050: if (e->err) return -1;\n1051: imadi(e, R(aw), R(warp), 16u * 4u, NOREG);\n1052: imadi(e, R(pa), R(warp), OMEGA_GDN_HEAD_DIM * 4u, NOREG); imadi(e, R(pa), R(lane), 16u, pa); imadi(e, R(pa), R(one), OMEGA_GDN_SM_P, pa);\n1053: imadi(e, R(la), R(lane), 16u, NOREG);\n1054: for (unsigned r = 0; r < 16; r++) for (unsigned j = 0; j < 4; j++) fmul(e, S(sq[r], j), S(sq[r], j), R(dec));\n1055: for (unsigned i = 0; i < 4; i++) lds128(e, kq[i], aw, OMEGA_GDN_SM_K + i * 16u, i == 0);\n1056: for (unsigned j = 0; j < 4; j++) fmul(e, R(kv[j]), S(sq[0], j), S(kq[0], 0));\n1057: for (unsigned r = 1; r < 16; r++) for (unsigned j = 0; j < 4; j++) ffma(e, R(kv[j]), S(sq[r], j), S(kq[r / 4], r % 4), R(kv[j]));\n1058: cross_warp_sum(e, kv, pa, one, la);\n1059: lds128(e, vq, la, OMEGA_GDN_SM_V, 1);\n1060: for (unsigned j = 0; j < 4; j++) { fsub(e, R(dl[j]), S(vq, j), R(kv[j])); fmul(e, R(dl[j]), R(dl[j]), R(beta)); }\n1061: {\n1062: int k2[4];\n1063: for (unsigned i = 0; i < 4; i++) k2[i] = V128(e);\n1064: if (e->err) return -1;\n1065: for (unsigned i = 0; i < 4; i++) lds128(e, k2[i], aw, OMEGA_GDN_SM_K + i * 16u, i == 0);\n1066: for (unsigned r = 0; r < 16; r++) for (unsigned j = 0; j < 4; j++) ffma(e, S(sq[r], j), S(k2[r / 4], r % 4), R(dl[j]), S(sq[r], j));\n1067: }\n1068: ldg_pf(e, zq, az, 0, udesc, SB_GATE);\n1069: int p[4];\n1070: {\n1071: int q2[4];\n1072: for (unsigned i = 0; i < 4; i++) { q2[i] = V128(e); p[i] = V(e); }\n1073: if (e->err) return -1;\n1074: for (unsigned i = 0; i < 4; i++) lds128(e, q2[i], aw, OMEGA_GDN_SM_Q + i * 16u, i == 0);\n1075: for (unsigned j = 0; j < 4; j++) fmul(e, R(p[j]), S(sq[0], j), S(q2[0], 0));\n1076: for (unsigned r = 1; r < 16; r++) for (unsigned j = 0; j < 4; j++) ffma(e, R(p[j]), S(sq[r], j), S(q2[r / 4], r % 4), R(p[j]));\n1077: }\n1078: bar_sync(e);\n1079: cross_warp_sum(e, p, pa, one, la);\n1080:\n1081: /* ---- phase E: gated RMSNorm, out row t ---- */\n1082: int ss = V(e), g = V(e);\n1083: if (e->err) return -1;\n1084: fmul(e, R(ss), R(p[0]), R(p[0]));\n1085: for (unsigned j = 1; j < 4; j++) ffma(e, R(ss), R(p[j]), R(p[j]), R(ss));", "omega@6de999da:src/omega_gpu_q36_graph.c": "590:}\n591:/* COMBINE|NORM of every head in one launch (L356): head h's residual x + h * 2048, down outputs a + h * 9 * 2048, weights\n592: * w + h * lb_stride, output y + h * 2048 (the xq or hidden slots). Each row runs the one-head program. ON unless\n593: * AIEN_OMEGA_Q36_CN_ROWS=0 (the per-head launches). */\n594:static int g_cn_rows = -1;\n595:static int q36_cn_rows(void) {\n596: if (g_cn_rows < 0) { const char *e = getenv(\"AIEN_OMEGA_Q36_CN_ROWS\"); g_cn_rows = (e && e[0] == '0' && e[1] == 0) ? 0 : 1; }\n597: return g_cn_rows;\n598:}\n599:static int rec_cn_rows(OmegaGpuQ36Graph *g, uint64_t x, uint64_t a, uint64_t wts, uint64_t nw, uint64_t y, float scale, uint32_t rows) {\n600: uint32_t w[OMEGA_DEC_RES_WORDS]; memset(w, 0, sizeof w);\n601: put64(w, OMEGA_DEC_RES_X, x); put64(w, OMEGA_DEC_RES_A, a); put64(w, OMEGA_DEC_RES_W, wts); put64(w, OMEGA_DEC_RES_NW, nw);\n602: put64(w, OMEGA_DEC_RES_Y, y); putf(w, OMEGA_DEC_RES_EPS, g->cfg.eps); putf(w, OMEGA_DEC_RES_SCALE, scale);\n603: return add_glue(g, OMEGA_GPU_Q36_K_RES, g->mutant == 4 ? K_CN_R_M3 : K_CN_R, 1, rows, (size_t)H * rows, w, OMEGA_DEC_RES_WORDS);\n604:}\n605:/* RES NORM|ROWS or ADD|ROWS over rows of 2048 (x, a, y move by the width per row) */\n606:static int rec_res_rows(OmegaGpuQ36Graph *g, int ki, uint64_t x, uint64_t a, uint64_t nw, uint64_t y, float scale, uint32_t rows) {\n607: uint32_t w[OMEGA_DEC_RES_WORDS]; memset(w, 0, sizeof w);\n608: put64(w, OMEGA_DEC_RES_X, x); put64(w, OMEGA_DEC_RES_A, a); put64(w, OMEGA_DEC_RES_NW, nw); put64(w, OMEGA_DEC_RES_Y, y);\n609: putf(w, OMEGA_DEC_RES_EPS, g->cfg.eps); putf(w, OMEGA_DEC_RES_SCALE, scale);\n610: return add_glue(g, ki == K_NORM_R ? OMEGA_GPU_Q36_K_NORM : OMEGA_GPU_Q36_K_RES, ki, 1, rows, (size_t)H * rows, w, OMEGA_DEC_RES_WORDS);\n611:}\n612:\n613:int omega_gpu_q36_graph_record_layer_heads(OmegaGpuQ36Graph *g, uint32_t l, const uint32_t *pos) {\n614: if (!g || !g->in_token || !pos) return OMEGA_GPU_DGRAPH_BAD_ARGS;\n615: if (g->failed) return OMEGA_GPU_DGRAPH_CHIP_FAIL;\n616: if (!g->batch) return fail(g, \"q36 graph: record_layer_heads needs set_batch\", OMEGA_GPU_DGRAPH_BAD_ARGS);\n617: if (l >= g->cfg.layers || !g->layer[l].set || (l + 1 == g->cfg.layers && !g->final_set))\n618: return fail(g, \"q36 graph: layer not set, out of order, or final norm missing\", OMEGA_GPU_DGRAPH_BAD_ARGS);\n619: const uint32_t N = g->stroke_heads, R = N * NG, ki = g->layer[l].kind_index;\n620: for (uint32_t h = 0; h < N; h++)\n621: if (g->hidden_ready[h] || g->xq_layer[h] != g->xq_layer[0]) return fail(g, \"q36 graph: heads out of step\", OMEGA_GPU_DGRAPH_BAD_ARGS);\n622: const Layout *L = &g->lo;\n623: const uint64_t x0 = va_of(g, x_of(g, 0)), xq0 = va_of(g, xq_of(g, 0)), xp = va_of(g, L->xp), mixN = va_of(g, L->mixN), abN = va_of(g, L->abN);\n624: const uint64_t aggN = va_of(g, L->aggN), attN = va_of(g, L->attN), op = va_of(g, L->op), oN = va_of(g, L->oN), rlb = va_of(g, L->rlb);\n625: const uint64_t sgu = va_of(g, L->sgu), sdn = va_of(g, L->sdn), xmap = va_of(g, L->xmap), ymap = va_of(g, L->ymap), xp2 = va_of(g, L->xp2);\n626: const uint64_t guN = va_of(g, L->guN), actN = va_of(g, L->actN), actp = va_of(g, L->actp), dnN = va_of(g, L->dnN);\n627: const uint64_t pt2048 = va_of(g, L->ptab), pt4096 = pt2048 + (uint64_t)H * 4u, pt512 = pt4096 + (uint64_t)OMEGA_GPU_Q36_MIXER_OUT * 4u;\n628: const uint64_t in_norm = va_of(g, L->norms) + (uint64_t)l * H * 4u, segd = va_of(g, L->segd) + (uint64_t)l * SEGD_ROWS * OMEGA_GEMM_SEG_BYTES;\n629: const uint64_t XS = (uint64_t)H * 4u, MOS = (uint64_t)OMEGA_GPU_Q36_MIXER_OUT * 4u;\n630: int rc = OMEGA_GPU_DGRAPH_OK;\n631: /* input norm of every head (layer 0; after that the previous layer's COMBINE|NORM left layer l's x' in the xq slots) */\n632: if (g->xq_layer[0] != (int)l) rc = rec_res_rows(g, K_NORM_R, x0, 0, in_norm, xq0, SCALE_2P64, N);\n633: /* x' of the dense trunk: the N xq rows in the GEMM's lane layout */\n634: if (rc == OMEGA_GPU_DGRAPH_OK) rc = rec_perm(g, K_PERM_XQ, xq0, pt2048, xp, H, N);\n635: if (!g->layer[l].attn) {\n636: if (rc == OMEGA_GPU_DGRAPH_OK) rc = after_op(g, OMEGA_GPU_Q36_K_AB, omega_gpu_bf16_gemv_rows_record(g->cl, g->layer[l].ab, N, xq0, abN));\n637: if (rc == OMEGA_GPU_DGRAPH_OK) rc = rec_gemm(g, OMEGA_GPU_Q36_K_MIX, g->layer[l].mix, N, 1, segd, xp, mixN, 0, 0);\n638: for (uint32_t h = 0; h < N && rc == OMEGA_GPU_DGRAPH_OK; h++) {\n639: const uint64_t mix_h = mixN + (uint64_t)h * OMEGA_GPU_Q36_GDN_MIX * 4u;\n640: uint64_t mo = 0;\n641: rc = after_op(g, OMEGA_GPU_Q36_K_GDN, omega_gpu_gdn_record(g->cl, g->gdn_h[h], ki, mix_h, mix_h + OMEGA_GPU_Q36_GDN_QKV * 4u,\n642: abN + (uint64_t)h * OMEGA_GPU_Q36_AB * 4u, g->cfg.eps_l2, g->cfg.eps, 1.0f, SCALE_2P64, &mo));\n643: if (rc == OMEGA_GPU_DGRAPH_OK) rc = rec_perm(g, K_PERM_O, mo, pt4096, op + h * MOS, OMEGA_GPU_Q36_MIXER_OUT, 1);\n644: }\n645: } else {"} \ No newline at end of file diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/probe-validation.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/probe-validation.json new file mode 100644 index 0000000..c48ff78 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/probe-validation.json @@ -0,0 +1,14 @@ +{ + "verdict": "PASS", + "finite_fp8_codes_compared": 254, + "signed_zero_checked": true, + "nan_codes_refused": [ + 127, + 255 + ], + "transform_controls": "PASS: independent explicit Hadamard, inverse, zero/constant quantizer, rank-one control", + "numpy": "2.5.4", + "ml_dtypes": "0.6.0", + "probe_sha256": "a5ddde5624e7e5d0621d6380e90d76082093b910e5558b3caafe514ef9339618", + "scope": "Independent library FP8 oracle plus synthetic controls, not inference quality or speed" +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/quantum-sources.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/quantum-sources.json new file mode 100644 index 0000000..e1317de --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/quantum-sources.json @@ -0,0 +1,114 @@ +[ + { + "id": 1, + "title": "Efficient classical simulation of slightly entangled quantum computations", + "url": "https://arxiv.org/abs/quant-ph/0301063v2", + "quote": "We present a scheme to efficiently simulate, with a classical computer, the dynamics of multipartite quantum systems on which the amount of entanglement (or of correlations in the case of mixed-state dynamics) is conveniently restricted.", + "source_content_path": "source-evidence/vidal03.txt" + }, + { + "id": 2, + "title": "A quantum-inspired classical algorithm for recommendation systems", + "url": "https://arxiv.org/abs/1807.04271", + "quote": "As a consequence, Kerenidis and Prakash’s algorithm does not in fact give an exponential speedup over classical algorithms.", + "source_content_path": "source-evidence/tang19.txt" + }, + { + "id": 3, + "title": "Quantum algorithm for linear systems of equations", + "url": "https://arxiv.org/abs/0811.3171", + "quote": "Here, we exhibit a quantum algorithm for this task", + "source_content_path": "source-evidence/hhl09.txt" + }, + { + "id": 4, + "title": "Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics", + "url": "https://arxiv.org/abs/1806.01838", + "quote": "that can apply polynomial transformations to the singular values of a block of a unitary", + "source_content_path": "source-evidence/qsvt19.txt" + }, + { + "id": 5, + "title": "Quantum Amplitude Amplification and Estimation", + "url": "https://arxiv.org/abs/quant-ph/0005055", + "quote": "We show that this quadratic speedup can also be obtained for a large family of search problems for which good classical heuristics exist.", + "source_content_path": "source-evidence/grover_amplification.txt" + }, + { + "id": 6, + "title": "Exponential algorithmic speedup by quantum walk", + "url": "https://arxiv.org/abs/quant-ph/0209131", + "quote": "We construct an oracular (i.e., black box) problem that can be solved exponentially faster on a quantum computer than on a classical computer. The quantum algorithm is based on a continuous time quantum walk, and thus employs a different technique from previous quantum algorithms based on quantum Fourier transforms.", + "source_content_path": "source-evidence/childs_walk.txt" + }, + { + "id": 7, + "title": "QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs", + "url": "https://arxiv.org/abs/2404.00456", + "quote": "without changing the output, making quantization easier.", + "source_content_path": "source-evidence/quarot24.txt" + }, + { + "id": 8, + "title": "QuIP: 2-Bit Quantization of Large Language Models With Guarantees", + "url": "https://arxiv.org/abs/2307.13304", + "quote": "QuIP consists of two steps: (1) an adaptive rounding procedure minimizing a quadratic proxy objective; (2) efficient pre- and post-processing that ensures weight and Hessian incoherence via multiplication by random orthogonal matrices.", + "source_content_path": "source-evidence/quip24.txt" + }, + { + "id": 9, + "title": "A variational eigenvalue solver on a quantum processor", + "url": "https://arxiv.org/abs/1304.3061", + "quote": "We present an alternative approach that greatly reduces the requirements for coherent evolution and we combine this method with a new approach to state preparation based on ansätze and classical optimization. We have implemented the algorithm by combining a small-scale photonic quantum processor with a conventional computer.", + "source_content_path": "source-evidence/peruzzo14.txt" + }, + { + "id": 10, + "title": "Quantum error correction below the surface code threshold", + "url": "https://www.nature.com/articles/s41586-024-08449-y", + "quote": "However, this exponential suppression only occurs if the physical error rate is below a critical threshold.", + "source_content_path": "source-evidence/nature_qec24.txt" + }, + { + "id": 11, + "title": "Logical Reversibility of Computation", + "url": "https://www.cs.princeton.edu/courses/archive/fall06/cos576/papers/bennett73.html", + "quote": "This result is of great physical interest because it makes plausible the existence of thermodynamically reversible computers which could perform useful computations at useful speed while dissipating considerably less than k T of energy per logical step.", + "source_content_path": "source-evidence/bennett73.txt" + }, + { + "id": 12, + "title": "Quantum Information and Relativity Theory", + "url": "https://arxiv.org/abs/quant-ph/0212023", + "quote": "Special relativity imposes severe restrictions on the transfer of information between distant systems.", + "source_content_path": "source-evidence/peres_terno04.txt" + }, + { + "id": 13, + "title": "Creating superpositions that correspond to efficiently integrable probability distributions", + "url": "https://arxiv.org/abs/quant-ph/0208112", + "quote": "We give a simple and efficient process for generating a quantum superposition of states which form a discrete approximation of any efficiently integrable (such as log concave) probability density functions.", + "source_content_path": "source-evidence/grover_rudolph02.txt" + }, + { + "id": 14, + "title": "Universal Quantum Simulators", + "url": "https://doi.org/10.1126/science.273.5278.1073", + "quote": "any local quantum system, is shown to be correct.", + "source_content_path": "source-evidence/lloyd96.txt" + }, + { + "id": 15, + "title": "Defining and detecting quantum speedup", + "url": "https://www.physics.ucsb.edu/~martinisgroup/papers/Ronnow2014.pdf", + "quote": "Comparing the performance of the device on random spin glass instances with limited precision to simulated classical and quantum annealers, we find no evidence of quantum speedup when the entire data set is considered, and obtain inconclusive results when comparing subsets of instances on an instance-by-instance basis.", + "source_content_path": "source-evidence/ronnow2014.txt" + }, + { + "id": 16, + "title": "Efficient Classical Simulation of Continuous Variable Quantum Information Processes", + "url": "https://arxiv.org/abs/quant-ph/0109047", + "quote": "For a collection of harmonic oscillators, any quantum process that begins with unentangled Gaussian states, performs only transformations generated by Hamiltonians that are quadratic in the canonical operators, and involves only measurements of canonical operators (including finite losses) and suitable operations conditioned on these measurements can be simulated efficiently on a classical computer.", + "source_content_path": "source-evidence/cv_gaussian02.txt" + } +] diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/repository-pins.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/repository-pins.json new file mode 100644 index 0000000..f3aa369 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/repository-pins.json @@ -0,0 +1,79 @@ +[ + { + "repo": "omega", + "root": "/home/drakestapleton/workspace/omega", + "remote": "git@github.com:aien-spark/omega.git", + "head": "ce42e62f9632b495f494aa8e419a70f4a36c88c0", + "main": "a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a" + }, + { + "repo": "cudapp", + "root": "/home/drakestapleton/workspace/cudapp", + "remote": "git@github.com:aien-dev/CUDApp.git", + "head": "8f0b645dbc859f1b63868cec77880621aa70b42d", + "main": "232332422bfdc31c8918085b50f13c1e18ab702e" + }, + { + "repo": "physics", + "root": "/home/drakestapleton/workspace/physics", + "remote": "git@github.com:aien-spark/physics.git", + "head": "e95e3ed2a86fe4bffe4d954fa94c27dfb5284280", + "main": "14273c5ce7d13fbc6e410c4fed9aa36837918177" + }, + { + "repo": "aien-sovereign-core", + "root": "/home/drakestapleton/workspace/aien-sovereign-core", + "remote": "git@github.com:aien-spark/aien-sovereign-core.git", + "head": "c83eb5b2f96b3d0a36fcb5092fcf0d66af5dd0d0", + "main": "754c07b118f41ad899607b60329bd851b1ccb13e" + }, + { + "repo": "aienos-repo", + "root": "/home/drakestapleton/workspace/aienos-repo", + "remote": "git@github.com:aien-dev/aienux.git", + "head": "7bc1713bee451573755375230e20cd60b4818f3b", + "main": "18e276590424593647cd7c39c6d16c2f9f8d6027" + }, + { + "repo": "interplane", + "root": "/home/drakestapleton/workspace/interplane", + "remote": "git@github.com:aien-dev/interplane.git", + "head": "2866d2b1cbe1215ac451a6c23e4815d49d3f0758", + "main": "b669d06e21c9debb15073289d7c0b78b1b2d362c" + }, + { + "repo": "aien-architecture", + "root": "/home/drakestapleton/workspace/aien-architecture", + "remote": "https://github.com/aien-dev/aien-architecture.git", + "head": "dbc07036878ec519142dbfa70d118a8806d34138", + "main": "1a3594340c70969c245554b07062efd8ead8a026" + }, + { + "repo": "aien-train", + "root": "/home/drakestapleton/workspace/aien-train", + "remote": "git@github.com:aien-dev/aien-train.git", + "head": "ed8b6ea2562efdda7913234ca8f34b443714a987", + "main": "ed8b6ea2562efdda7913234ca8f34b443714a987" + }, + { + "repo": "aien-rig", + "root": "/home/drakestapleton/workspace/aien-rig", + "remote": "git@github.com:aien-dev/aien-rig.git", + "head": "c1f49889e9b53c5507fe22fe6c19ede2ffb51660", + "main": "c1f49889e9b53c5507fe22fe6c19ede2ffb51660" + }, + { + "repo": "allen", + "root": "/home/drakestapleton/workspace/allen", + "remote": "https://github.com/aien-dev/allen", + "head": "e97222eb82f1ec56e852ba9571786db9ccc5c97a", + "main": "e97222eb82f1ec56e852ba9571786db9ccc5c97a" + }, + { + "repo": "aegis-runtime", + "root": "/home/drakestapleton/workspace/aegis-runtime", + "remote": "git@github.com:aien-dev/aegis-runtime.git", + "head": "e8eed5aac8612c1b846284c09d58e798e382c11b", + "main": "f85dbe3910dd2c29faff74a3a96d657531ca1320" + } +] diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/sources-ledger.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sources-ledger.json new file mode 100644 index 0000000..2384546 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sources-ledger.json @@ -0,0 +1,197 @@ +{ + "version": 1, + "sources": [ + { + "id": 1, + "url": "https://arxiv.org/abs/quant-ph/0301063v2", + "title": "Efficient classical simulation of slightly entangled quantum computations", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "We present a scheme to efficiently simulate, with a classical computer, the dynamics of multipartite quantum systems on which the amount of entanglement (or of correlations in the case of mixed-state dynamics) is conveniently restricted.", + "added": "2026-10-22" + } + ] + }, + { + "id": 2, + "url": "https://arxiv.org/abs/1807.04271", + "title": "A quantum-inspired classical algorithm for recommendation systems", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "As a consequence, Kerenidis and Prakash’s algorithm does not in fact give an exponential speedup over classical algorithms.", + "added": "2026-10-22" + } + ] + }, + { + "id": 3, + "url": "https://arxiv.org/abs/0811.3171", + "title": "Quantum algorithm for linear systems of equations", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "Here, we exhibit a quantum algorithm for this task", + "added": "2026-10-22" + } + ] + }, + { + "id": 4, + "url": "https://arxiv.org/abs/1806.01838", + "title": "Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "that can apply polynomial transformations to the singular values of a block of a unitary", + "added": "2026-10-22" + } + ] + }, + { + "id": 5, + "url": "https://arxiv.org/abs/quant-ph/0005055", + "title": "Quantum Amplitude Amplification and Estimation", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "We show that this quadratic speedup can also be obtained for a large family of search problems for which good classical heuristics exist.", + "added": "2026-10-22" + } + ] + }, + { + "id": 6, + "url": "https://arxiv.org/abs/quant-ph/0209131", + "title": "Exponential algorithmic speedup by quantum walk", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "We construct an oracular (i.e., black box) problem that can be solved exponentially faster on a quantum computer than on a classical computer. The quantum algorithm is based on a continuous time quantum walk, and thus employs a different technique from previous quantum algorithms based on quantum Fourier transforms.", + "added": "2026-10-22" + } + ] + }, + { + "id": 7, + "url": "https://arxiv.org/abs/2404.00456", + "title": "QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "without changing the output, making quantization easier.", + "added": "2026-10-22" + } + ] + }, + { + "id": 8, + "url": "https://arxiv.org/abs/2307.13304", + "title": "QuIP: 2-Bit Quantization of Large Language Models With Guarantees", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "QuIP consists of two steps: (1) an adaptive rounding procedure minimizing a quadratic proxy objective; (2) efficient pre- and post-processing that ensures weight and Hessian incoherence via multiplication by random orthogonal matrices.", + "added": "2026-10-22" + } + ] + }, + { + "id": 9, + "url": "https://arxiv.org/abs/1304.3061", + "title": "A variational eigenvalue solver on a quantum processor", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "We present an alternative approach that greatly reduces the requirements for coherent evolution and we combine this method with a new approach to state preparation based on ansätze and classical optimization. We have implemented the algorithm by combining a small-scale photonic quantum processor with a conventional computer.", + "added": "2026-10-22" + } + ] + }, + { + "id": 10, + "url": "https://www.nature.com/articles/s41586-024-08449-y", + "title": "Quantum error correction below the surface code threshold", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "However, this exponential suppression only occurs if the physical error rate is below a critical threshold.", + "added": "2026-10-22" + } + ] + }, + { + "id": 11, + "url": "https://www.cs.princeton.edu/courses/archive/fall06/cos576/papers/bennett73.html", + "title": "Logical Reversibility of Computation", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "This result is of great physical interest because it makes plausible the existence of thermodynamically reversible computers which could perform useful computations at useful speed while dissipating considerably less than k T of energy per logical step.", + "added": "2026-10-22" + } + ] + }, + { + "id": 12, + "url": "https://arxiv.org/abs/quant-ph/0212023", + "title": "Quantum Information and Relativity Theory", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "Special relativity imposes severe restrictions on the transfer of information between distant systems.", + "added": "2026-10-22" + } + ] + }, + { + "id": 13, + "url": "https://arxiv.org/abs/quant-ph/0208112", + "title": "Creating superpositions that correspond to efficiently integrable probability distributions", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "We give a simple and efficient process for generating a quantum superposition of states which form a discrete approximation of any efficiently integrable (such as log concave) probability density functions.", + "added": "2026-10-22" + } + ] + }, + { + "id": 14, + "url": "https://doi.org/10.1126/science.273.5278.1073", + "title": "Universal Quantum Simulators", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "any local quantum system, is shown to be correct.", + "added": "2026-10-22" + } + ] + }, + { + "id": 15, + "url": "https://www.physics.ucsb.edu/~martinisgroup/papers/Ronnow2014.pdf", + "title": "Defining and detecting quantum speedup", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "Comparing the performance of the device on random spin glass instances with limited precision to simulated classical and quantum annealers, we find no evidence of quantum speedup when the entire data set is considered, and obtain inconclusive results when comparing subsets of instances on an instance-by-instance basis.", + "added": "2026-10-22" + } + ] + }, + { + "id": 16, + "url": "https://arxiv.org/abs/quant-ph/0109047", + "title": "Efficient Classical Simulation of Continuous Variable Quantum Information Processes", + "accessed": "2026-10-22", + "quotes": [ + { + "text": "For a collection of harmonic oscillators, any quantum process that begins with unentangled Gaussian states, performs only transformations generated by Hamiltonians that are quadratic in the canonical operators, and involves only measurements of canonical operators (including finite losses) and suitable operations conditioned on these measurements can be simulated efficiently on a classical computer.", + "added": "2026-10-22" + } + ] + } + ] +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity-followup-results.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity-followup-results.json new file mode 100644 index 0000000..56e2e0e --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity-followup-results.json @@ -0,0 +1,225 @@ +{ + "scope": "Checkpoint-only static counts, five selected matrices; no inference or timing", + "rows": [ + { + "layer": 0, + "expert": 0, + "projection": "gate_proj", + "shape": [ + 512, + 2048 + ], + "zero_elements": 573446, + "elements": 1048576, + "all_zero_rows": 280, + "all_zero_columns": 0, + "unique_rows": 233, + "provenance": { + "model.language_model.layers.0.mlp.experts.0.gate_proj.weight": { + "meta": { + "dtype": "F8_E4M3", + "shape": [ + 512, + 2048 + ], + "data_offsets": [ + 36094720, + 37143296 + ] + }, + "sha256": "81e8478424044de8eb00b884f24aaf93d65f8a402f4bc788a96b7d6da6212838" + }, + "model.language_model.layers.0.mlp.experts.0.gate_proj.weight_scale_inv": { + "meta": { + "dtype": "BF16", + "shape": [ + 4, + 16 + ], + "data_offsets": [ + 336384, + 336512 + ] + }, + "sha256": "7320b35f20afd6aec789e56d2b1196db917166c70c63f6799ef849631df28cdc" + } + } + }, + { + "layer": 20, + "expert": 128, + "projection": "up_proj", + "shape": [ + 512, + 2048 + ], + "zero_elements": 5, + "elements": 1048576, + "all_zero_rows": 0, + "all_zero_columns": 0, + "unique_rows": 512, + "provenance": { + "model.language_model.layers.20.mlp.experts.128.up_proj.weight": { + "meta": { + "dtype": "F8_E4M3", + "shape": [ + 512, + 2048 + ], + "data_offsets": [ + 140952320, + 142000896 + ] + }, + "sha256": "2eb5db2c68b4b32e0c3ecd50fc23ffc188c249af6faa95d649e85f983c8dfb35" + }, + "model.language_model.layers.20.mlp.experts.128.up_proj.weight_scale_inv": { + "meta": { + "dtype": "BF16", + "shape": [ + 4, + 16 + ], + "data_offsets": [ + 349184, + 349312 + ] + }, + "sha256": "833922ba739ded0ef99869b70c9de5af06cc3984a0a7abc5ef88ece3580dc1f4" + } + } + }, + { + "layer": 39, + "expert": 255, + "projection": "down_proj", + "shape": [ + 2048, + 512 + ], + "zero_elements": 24, + "elements": 1048576, + "all_zero_rows": 0, + "all_zero_columns": 0, + "unique_rows": 2048, + "provenance": { + "model.language_model.layers.39.mlp.experts.255.down_proj.weight": { + "meta": { + "dtype": "F8_E4M3", + "shape": [ + 2048, + 512 + ], + "data_offsets": [ + 548520576, + 549569152 + ] + }, + "sha256": "452a5b320745342feb9f93e0c1b641d63aa892ceee304fe16af9a3c7b261c43b" + }, + "model.language_model.layers.39.mlp.experts.255.down_proj.weight_scale_inv": { + "meta": { + "dtype": "BF16", + "shape": [ + 16, + 4 + ], + "data_offsets": [ + 70912, + 71040 + ] + }, + "sha256": "5d0212b017d91d54f82cb7ad0c796dde1bd03638c5ca285586c847b5db6d0463" + } + } + }, + { + "layer": 0, + "expert": 0, + "projection": "up_proj", + "shape": [ + 512, + 2048 + ], + "zero_elements": 573446, + "elements": 1048576, + "all_zero_rows": 280, + "all_zero_columns": 0, + "unique_rows": 233, + "provenance": { + "model.language_model.layers.0.mlp.experts.0.up_proj.weight": { + "meta": { + "dtype": "F8_E4M3", + "shape": [ + 512, + 2048 + ], + "data_offsets": [ + 37143296, + 38191872 + ] + }, + "sha256": "20e8a45852934d5be753e701e2c1f8cad90c4e5c5c98f1419421fb0923aef155" + }, + "model.language_model.layers.0.mlp.experts.0.up_proj.weight_scale_inv": { + "meta": { + "dtype": "BF16", + "shape": [ + 4, + 16 + ], + "data_offsets": [ + 336512, + 336640 + ] + }, + "sha256": "cf3534da7ef4c5b2802297690c412973f76fbbcad00e956475781ae53128a3ef" + } + } + }, + { + "layer": 0, + "expert": 0, + "projection": "down_proj", + "shape": [ + 2048, + 512 + ], + "zero_elements": 573445, + "elements": 1048576, + "all_zero_rows": 0, + "all_zero_columns": 280, + "unique_rows": 2048, + "provenance": { + "model.language_model.layers.0.mlp.experts.0.down_proj.weight": { + "meta": { + "dtype": "F8_E4M3", + "shape": [ + 2048, + 512 + ], + "data_offsets": [ + 35046144, + 36094720 + ] + }, + "sha256": "e0132e90c275e9d168ec7480c08b7d1f083a7cdebce00081a7e1fb965d513fb8" + }, + "model.language_model.layers.0.mlp.experts.0.down_proj.weight_scale_inv": { + "meta": { + "dtype": "BF16", + "shape": [ + 16, + 4 + ], + "data_offsets": [ + 336256, + 336384 + ] + }, + "sha256": "058abc072944f309c54aab3ffbe408940f2cefe1b2ef28251b37077972ef986e" + } + } + } + ] +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity_followup.py b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity_followup.py new file mode 100644 index 0000000..2d60f53 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/sparsity_followup.py @@ -0,0 +1,19 @@ +"""Follow up an unexpected low numerical rank in the first selected expert. +Static checkpoint inspection only. Does not claim execution equivalence or speed. +""" +import json +import pathlib +import numpy as np +from weight_probe import fetch, SELECTION + +rows = [] +for layer, expert, proj in SELECTION + [(0,0,'up_proj'),(0,0,'down_proj')]: + ww, provenance = fetch(layer,expert,proj) + unique_rows = np.unique(ww,axis=0).shape[0] + rows.append({'layer':layer,'expert':expert,'projection':proj,'shape':list(ww.shape), + 'zero_elements':int(np.sum(ww==0)), 'elements':int(ww.size), + 'all_zero_rows':int(np.sum(np.all(ww==0,axis=1))), + 'all_zero_columns':int(np.sum(np.all(ww==0,axis=0))), + 'unique_rows':int(unique_rows), 'provenance':provenance}) + print(json.dumps(rows[-1]),flush=True) +pathlib.Path(__file__).with_name('sparsity-followup-results.json').write_text(json.dumps({'scope':'Checkpoint-only static counts, five selected matrices; no inference or timing','rows':rows},indent=2)+'\n') diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-audit.md b/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-audit.md new file mode 100644 index 0000000..f9f3eda --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-audit.md @@ -0,0 +1,30 @@ +# L582 — systems / AIEN_0 efficiency audit + +**Verdict:** useful systems opportunities exist, but this read-only pass establishes mechanisms and experiment plans, not measured speedups. The key design distinction is exact state reuse versus approximate search ordering. AIEN_0 must never replace Omega verification. + +## Pins and scope + +- **Aienux:** `aien-dev/aienux` `main@18e276590424593647cd7c39c6d16c2f9f8d6027` (read through Spark `origin/main`). +- **aien-train:** `aien-dev/aien-train` `main@ed8b6ea2562efdda7913234ca8f34b443714a987`; remote `aien0/m20` resolved to the same SHA. The assigned `~/workspace/aien-train-aien0` worktree was absent; canonical main has no tracked AIEN_0 implementation. L303 remains open. +- **Omega:** `aien-dev/omega-mv` fresh `ls-remote` main pin `a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a`. I did not have a fresh checkout at that pin, so current-main Omega details below are limited to the assigned L303 brief / earlier source copy and are not asserted as fresh code verification. +- Reused the 2026-10-21 efficiency review. Its figures are explicitly marked as derived, prior-branch, or unmeasured where applicable. + +## Findings + +1. **Repeated Store validation / hashing — reuse an already validated object result.** Aienux `native/kernel/svc/store_boot.c:269-274` performs an unkeyed `st_open` before keyed `ss_open`; the recovery keyslot path calls `ss_keyslot_bootstrap` at `:485`. The prior G4-os-1 review traces both-slot object validation plus sealed verification and another keyslot pass. A single pass/cache may remove redundant reads, but only if content identity and validation scope are unchanged; authentication checks must not be elided. The previous 5x ordinary / 7x keyslot figures are structural pass-count estimates, **not** measured boot gains. **Cheapest test:** count `dev_read` calls and bytes hashed on a populated QEMU image; then time separately. No assigned owner found; route before changes. + +2. **Store extent I/O is serialized as 4 KiB calls.** At this Aienux pin, `native/store/store_engine.c:71-105` reads unit-by-unit; `:330-343` writes unit-by-unit. Prior G4-os-2 says the depth-32/direct-DMA driver is in L199's branch, while Store still submits a synchronous unit at a time. Batch contiguous extents without changing padding, hash, error-order or crash behavior. Prior QEMU driver numbers (1,021.5 vs 7,877.4 MB/s, QD1/QD31) are not Store-layer or Spark SSD results. **Cheapest test:** QEMU command-count and crash-gate replay on a copied Store image. L199 owns the driver; Store-layer owner unassigned. + +3. **X25519 field arithmetic has a large operation-count mismatch.** At Aienux main, `native/net/x25519.c:42-54` uses 16×16 limb products (256 inner products per field multiply); prior G4-os-6 identifies a five-limb implementation in Ed25519. Reuse/port could reduce arithmetic count by 10.24×, but does **not** imply that speedup. Arithmetic must remain exact modulo the same field, with constant-time behavior and RFC 7748 edge cases intact. **Cheapest test:** host differential against RFC 7748 vectors plus boundary/random inputs; then receipt-backed Spark handshake timing. No owner listed in G4-os-6. + +4. **Ed25519 verify computes two scalar multiplications independently.** `native/sig/ed25519.c:248-263,545-548` shows a fixed 256-step loop used for `[S]B` and `[k]A`. A joint public-input double-scalar loop can share doublings; the prior 2.29× is group-operation-count arithmetic, not wall time. Exact result and canonical rejection behavior are required; signing remains on its constant-time secret-scalar path. **Cheapest test:** RFC 8032 positives/negatives and randomized differential host tests, then receipt-backed verify timing. No owner listed in G4-os-7. + +5. **Quotient search / equivalence pruning is already represented in Omega; measure before adding e-graphs or a second memoizer.** The older Omega source copy has state hashing in `src/crumbline/cl_search.c:82,249,290`; the L303 brief says the M23 corpus already records `ST_PRUNE_EQUIV`, exposes a dedup setting, and has byte-replay gates. Treat exact-equivalence classes as one state and rank their representatives. Do not confuse exact equivalence pruning with a learned ranking heuristic. **Cheapest test:** frozen tasks, dedup on/off; count equivalence prunes, verifier calls, solved tasks and cost to first solution. No corpus run was done here. L303 owns AIEN_0/M23; L049 owns plan-reuse campaign. Omega line claims await exact-pin checkout. + +6. **AIEN_0's defined target is a compact synthesis-policy ranker, but no canonical implementation or advantage result is verified.** L303 specifies decision-time features, trace corpus, comparison of pairwise ranking/imitation/value, then held-out evaluation at equal verifier budget against current/random/cheapest-first order. Canonical `aien-train` main remains pre-alpha (`README.md:3-7`) and its `aien0/m20` remote points at the same commit; the assigned worktree was absent. This is an **approximate** ordering policy: finite-budget solve rate/regret can change, while exact correctness remains with Omega's verifier. **Cheapest next step:** parent recovers the existing owner handoff/worktree and inspects it; then run non-timed fixed-budget counts before any model or hardware run. L303 stays open; no duplicate worker or model run. + +7. **Optimizer state compression / update cadence is not yet an AIEN_0 result.** Prior G5-physics-train-6/7 and L304 use an illustrative fused AdamW layout (28 B/parameter/step; BF16 states reduce bytes 1.4×). Changing update cadence changes the optimization trajectory; low-precision moments are lossy. Those numbers cannot be transferred to AIEN_0 without its actual parameter count, batch, tensor shapes and bandwidth. First compare an exact FP32 reference update with fused execution; only then evaluate low-precision states on held-out ranking quality. No training code exists in canonical main, so timing and quality impact are unknown. L304/L279 and L294 retain ownership. + +## Limits / actions not taken + +Read-only only: no edits to repositories, builds, corpus generation, benchmarks, model loads, process changes, or ledger closure. No Interplane/protocol, CI-agent-control, CUDApp, inference-kernel, literature, or Wolfram work was done in this systems/AIEN_0 slice. See `systems-findings.json` for the full structured evidence, ownership and experiment fields. diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-findings.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-findings.json new file mode 100644 index 0000000..454c395 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/systems-findings.json @@ -0,0 +1,94 @@ +{ + "audit": "L582 read-only systems/AIEN_0 efficiency audit", + "scope": "Aienux storage/crypto, Omega search-equivalence hooks, AIEN_0 training readiness. No inference-kernel or literature audit.", + "canonical_pins": { + "aienux": {"remote": "git@github.com:aien-dev/aienux.git", "main": "18e276590424593647cd7c39c6d16c2f9f8d6027", "inspected": "origin/main source via Spark checkout"}, + "aien-train": {"remote": "git@github.com:aien-dev/aien-train.git", "main": "ed8b6ea2562efdda7913234ca8f34b443714a987", "aien0/m20": "ed8b6ea2562efdda7913234ca8f34b443714a987", "inspected": "canonical main; AIEN_0 worktree absent on Spark"}, + "omega-mv": {"remote": "git@github.com:aien-dev/omega-mv.git", "main": "a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a", "inspected": "fresh ls-remote pin; tracked local source copy older, so no current-main code-line claim beyond prior review"} + }, + "findings": [ + { + "id": "SYS-AIENUX-STORE-REHASH", + "title": "Store boot validates the same objects repeatedly", + "status": "existing efficiency-review finding; not a new proposal", + "evidence": ["aienux@18e276590424593647cd7c39c6d16c2f9f8d6027 native/kernel/svc/store_boot.c:269-274 calls unkeyed st_open then ss_open; recovery keyslot path calls ss_keyslot_bootstrap at :485", "2026-10-21 efficiency review G4-os-1: store_engine.c validates both slots by reading/hashing objects; sealed verification and keyslot bootstrap add more passes"], + "opportunity": "Reuse a single validated immutable-object digest/result across slot comparison and sealed-record checks where the trust boundary permits. Keep separate authentication and structural validation semantics; do not accept a cached result across changed bytes or an untrusted generation.", + "exactness": "Potentially exact if reuse is keyed to the validated content/object identity and validity scope; no implementation equivalence established here.", + "owner": "No owner listed in prior review; route via coordinator before any patch.", + "cheapest_discriminator": "Instrument dev_read count and SHA-256 input bytes in the QEMU store gate on the same populated image; compare current path with a read-only in-memory validation-result cache. Measure mount latency separately; all timings UNKNOWN.", + "quantitative_status": "Prior review's 5x ordinary / 7x keyslot-path reduction is a structural pass-count derivation, not a measured boot speedup." + }, + { + "id": "SYS-AIENUX-STORE-IO", + "title": "Store serializes extent I/O as synchronous 4 KiB unit calls", + "status": "existing efficiency-review finding; driver improvement exists on a non-main branch", + "evidence": ["aienux@18e276590424593647cd7c39c6d16c2f9f8d6027 native/store/store_engine.c:71-105 reads one unit per dev_read; :330-343 writes one unit per dev_write", "prior review G4-os-2 says driver queue depth 32/direct DMA is in L199 branch, while Store caller still issues one synchronous unit per call"], + "opportunity": "Add extent/batched transfer at the Store boundary and preserve per-object hash, zero-padding, error ordering, and crash semantics. The disk queue-depth driver alone cannot help if this layer submits one command then waits.", + "exactness": "Exact data/result semantics are possible; request ordering and partial-I/O failure behavior must be preserved and tested.", + "owner": "L199 owns the NVMe driver; Store-layer change had no owner in G4-os-2. Coordinator should assign only after checking present ownership.", + "cheapest_discriminator": "On a copied QEMU Store image, count commands for a multi-unit extent and replay identical read/write/crash tests. Prior L199 branch reported 1,021.5 vs 7,877.4 MB/s at QD1/QD31 in QEMU; that is not Spark SSD evidence and not the Store-layer gain.", + "quantitative_status": "Prior 7.71x ratio is driver QEMU read-throughput data, not a measured Store speedup; Spark result UNKNOWN." + }, + { + "id": "SYS-AIENUX-X25519-FIELD", + "title": "X25519's 16x16 limb multiply is much wider than the existing 5-limb field implementation", + "status": "existing efficiency-review finding; source path confirmed at canonical main pin", + "evidence": ["aienux@18e276590424593647cd7c39c6d16c2f9f8d6027 native/net/x25519.c:42-54 performs 16x16 limb products and uses multiplication for squaring", "prior review G4-os-6 locates Ed25519's five-limb field implementation at native/sig/ed25519.c:22,74-97"], + "opportunity": "Consider a shared audited field representation or a dedicated five-limb X25519 implementation, reusing before rebuilding. Same prime supports the algebraic transformation; representation, reduction, constant-time behavior, and RFC 7748 edge cases still need proof.", + "exactness": "Exact modular arithmetic is required; this is not an approximation. A count of 256 vs 25 limb products (10.24x) does not imply that speed ratio.", + "owner": "No owner listed in G4-os-6; coordinator must reconcile current crypto owners first.", + "cheapest_discriminator": "Host differential against the existing implementation over RFC 7748 vectors plus boundary/random inputs, then native handshake timing on Spark; report timing only with a receipt.", + "quantitative_status": "10.24x fewer inner products is operation-count arithmetic from the prior review. End-to-end handshake speedup UNMEASURED." + }, + { + "id": "SYS-AIENUX-ED25519-JOINT", + "title": "Ed25519 verification performs two independent scalar-multiplication loops", + "status": "existing efficiency-review finding; implementation not verified here", + "evidence": ["aienux@18e276590424593647cd7c39c6d16c2f9f8d6027 native/sig/ed25519.c:248-263 defines a fixed 256-step scalar multiplication; :545-548 invokes it for [S]B and [k]A"], + "opportunity": "Use a public-input joint double-scalar multiplication (shared doubling loop) for verification, retaining the existing path as a differential oracle and keeping signing constant-time. Signature verification result must remain exact.", + "exactness": "Exact group result, not lossy; signature verification uses public signature/key inputs. Keep canonical encoding and rejection checks unchanged.", + "owner": "No owner listed in G4-os-7; check current ownership before assigning.", + "cheapest_discriminator": "Run RFC 8032 valid/invalid vectors and differential randomized signatures on host; then time verify-only batch on Spark with identical inputs.", + "quantitative_status": "Prior 2.29x count of group operations is an algebraic estimate; wall-clock gain UNKNOWN." + }, + { + "id": "OMEGA-QUOTIENT-SEARCH", + "title": "Search already has equivalence pruning; AIEN_0 should learn ordering over equivalence classes, not rediscover duplicate states", + "status": "existing mechanism; promising measurement gap, avoid duplicate implementation", + "evidence": ["omega-mv canonical main pin from git ls-remote: a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a", "available Omega source copy reports src/crumbline/cl_search.c:249,290 hashes states and :265 applies candidate cutoff; source copy is an older worktree, not treated as canonical-main proof", "prior L303 brief identifies src/searchtrace and spec/searchtrace/M23_SEARCH_TRACE_CORPUS_V1.md as built trace-corpus code; trace format records ST_PRUNE_EQUIV and a dedup task setting"], + "opportunity": "Treat each exact-equivalence class as one search state and train/rank its representatives. Reuse the existing hash/equivalence and M23 trace corpus. First quantify duplicate-prune share and solved-at-equal-verification-budget by task; do not build a second hash-cons/e-graph layer unless current code shows an uncovered equivalence relation.", + "exactness": "Equivalence pruning must be exact for the declared observations. Learned score/order is approximate and may change which candidates fit a finite budget; the verifier remains authoritative and outside the model.", + "owner": "L303 owns AIEN_0/M23 training integration; L049 is the plan-reuse campaign. Parent/coordinator routes follow-on, no duplicate worker.", + "cheapest_discriminator": "Replay frozen task set with equivalence dedup on/off and current order, count exact equivalence-pruned candidates, verifier calls, solved tasks and first-solution cost. No model load or timing needed for initial counts.", + "quantitative_status": "Corpus/task counts and benefit UNKNOWN in this audit; no corpus gate or benchmark run." + }, + { + "id": "AIEN0-ONCHIP-RANKER", + "title": "AIEN_0 is a small synthesis-policy ranker, but no canonical implementation/evaluation was present", + "status": "active existing L303 objective; not a new training proposal; completion not demonstrated", + "evidence": ["aien-train canonical main ed8b6ea2562efdda7913234ca8f34b443714a987: README.md:3-7 says pre-alpha, Omega/no-CUDA path, claims must link source or receipt; docs/PLAN.md:12 prohibits third-party training framework in product path", "aien0/m20 remote ref resolves to the same ed8b6ea2562efdda7913234ca8f34b443714a987; expected Spark worktree ~/workspace/aien-train-aien0 was absent; no AIEN_0 artifact/status was found in canonical tracked main", "L303 brief: rank next Omega operation from synthesis traces; oracle training then M21/M22 path; held-out equal-verification-budget search test; model size guided by L279", "L303 remains open in ~/handoffs/LEDGER.tsv"], + "opportunity": "Prioritize a compact candidate scorer that ranks operations/states using only decision-time features. Evaluate imitation, pairwise ranking and value heads on the same frozen tasks, then compare learned order against current/random/cheapest-first at equal verifier budget. This is search-control efficiency, not a replacement verifier.", + "exactness": "The learned policy is approximate and can miss solutions under finite budget. Correctness stays exact only because Omega's verifier decides acceptance; report solve-rate/regret separately from semantic correctness.", + "owner": "L303; no duplicate implementation or worker. Coordinate status recovery with parent and do not close ledger.", + "cheapest_discriminator": "Read-only first: recover the already-assigned worktree/handoff and inspect source/status. Then perform non-timed held-out task counts for existing order vs random vs cheapest-first vs scorer at one fixed verifier-call budget. Do not load a model or run hardware measurements for this audit.", + "quantitative_status": "No AIEN_0 trained weights, train receipt, held-out advantage, or energy result verified. UNKNOWN, not a negative result." + }, + { + "id": "AIEN0-TRAIN-STATE-TRADEOFF", + "title": "Training-state compression is a separate lossy tradeoff; optimizer-pass reuse is the exact first lever", + "status": "existing L304 design notes from prior review; AIEN_0 applicability unproven", + "evidence": ["aien-train@ed8b6ea2562efdda7913234ca8f34b443714a987 README.md:5 frames weight-residency as a thesis under test; repo is pre-alpha and has no training code in canonical main", "prior efficiency review G5-physics-train-6/7 and ledger L304 describe 28 B/parameter/step for one illustrative fused AdamW layout, plus a 1.4x byte reduction using BF16 m/v states"], + "opportunity": "For any implemented trainer, first accumulate microbatches and execute one fused optimizer update per chosen token batch; avoid repeating the same state read/write per microbatch. Evaluate BF16 optimizer state only as a separately labelled lossy experiment after exact FP32 baseline exists.", + "exactness": "Optimizer-update frequency changes training trajectory; low-precision m/v is lossy. Neither is algebraically identical to full-precision per-microbatch updates. Do not transfer LLM-scale crossover numbers to AIEN_0 without its parameter count, batch, shapes and measured bandwidth.", + "owner": "L304 owns training target; L279 physics and L294 kernel backlog. Use their existing owners/receipts, do not open duplicate work.", + "cheapest_discriminator": "Once an AIEN_0 training executable exists, compare exact same-seed short runs for fused vs reference FP32 updates, check parameter/optimizer-state equality, then measure bytes and elapsed time. Only after this control, compare BF16-state held-out ranking quality.", + "quantitative_status": "Prior 626-token crossover and 2.07x example are derived from an illustrative optimizer layout and external ceiling inputs, not measured or transferable to AIEN_0. AIEN_0 gains UNKNOWN." + } + ], + "coverage_limits": [ + "Read-only audit only. No builds, corpus generation, measurements, model loads, process changes, launches, or product edits.", + "No Interplane/protocol, CI-agent-control, CUDApp, inference-kernel, literature, or Wolfram audit; parent/other researchers own those lanes.", + "Omega canonical main pin was fetched by ls-remote, but a fresh checkout at that pin was not available; line-level Omega source claims are explicitly marked older copy / prior brief rather than asserted as current-main findings.", + "No ledger item closed." + ] +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/validate_probe.py b/evidence/QUANTUM_EFFICIENCY/2026-10-22/validate_probe.py new file mode 100644 index 0000000..85409b2 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/validate_probe.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +"""Independent CPU oracle checks of the throwaway probe, never inference. +Run: uv run --with numpy --with ml-dtypes validate_probe.py +Synthetic bytes only. No SSH, GPU, model loading, or timing. +""" +import base64 +import hashlib +import json +import pathlib +from unittest.mock import patch +import numpy as np +import ml_dtypes +import weight_probe as probe + + +def payload(codes): + name = 'model.language_model.layers.0.mlp.experts.0.gate_proj' + raw = codes.tobytes() + scale = np.array([0x3F80], dtype=' 0) + exp = ((codes >> 3) & 15).astype(int) + mant = (codes & 7).astype(int) + assert not np.any((exp == 15) & (mant == 7)), 'NaN FP8 code' + val = np.where(exp == 0, mant * 2.0**-9, (1 + mant/8) * np.exp2(exp - 7)) + val *= np.where(codes & 128, -1, 1) + assert scales.shape == (val.shape[0]//128, val.shape[1]//128) + val *= np.repeat(np.repeat(scales, 128, axis=0), 128, axis=1) + provenance = {k: {a: v[a] for a in ('meta', 'sha256')} for k,v in data.items()} + return val, provenance + + +def h128(arr): + """Orthogonal 128-wide Sylvester Hadamard on contiguous row blocks.""" + shape = arr.shape + out = arr.copy().reshape(-1, 128) + step = 1 + while step < 128: + view = out.reshape(-1, 128//(2*step), 2*step) + left, right = view[..., :step].copy(), view[..., step:].copy() + view[..., :step] = left + right + view[..., step:] = left - right + step *= 2 + return (out / np.sqrt(128)).reshape(shape) + + +def q4(arr): + """Toy symmetric INT4, [-7,7], one f64 analysis scale per 128 weights. + This is NOT NVFP4, GPTQ, QuaRot, SpinQuant or a deployable format. + """ + shape = arr.shape + blocks = arr.reshape(-1, 128) + scale = np.max(np.abs(blocks), axis=1, keepdims=True)/7 + scale[scale == 0] = 1 + return (np.clip(np.rint(blocks/scale), -7, 7)*scale).reshape(shape) + + +def selfcheck(): + # Independent explicit Hadamard matrix and hand-coded FP8 known values. + hh = np.array([[1.]]) + for _ in range(7): + hh = np.block([[hh, hh], [hh, -hh]]) + hh /= np.sqrt(128) + x = np.arange(256, dtype=np.float64).reshape(2,128)/17 + assert np.allclose(h128(x), x @ hh, rtol=0, atol=1e-12) + assert np.allclose(h128(h128(x)), x, rtol=0, atol=1e-12) + assert np.array_equal(q4(np.zeros((1,128))), np.zeros((1,128))) + assert np.allclose(q4(np.ones((1,128))), 1) + assert np.linalg.matrix_rank(np.outer(np.arange(1,5), np.arange(1,7))) == 1 + return 'PASS: independent explicit Hadamard, inverse, zero/constant quantizer, rank-one control' + + +def main(): + control = selfcheck() + rows = [] + for layer, expert, proj in SELECTION: + ww, provenance = fetch(layer, expert, proj) + assert np.isfinite(ww).all() + ss = np.linalg.svd(ww, compute_uv=False) + norm = np.linalg.norm(ww) + ss_energy = float(np.sum(ss*ss)) + assert np.isclose(ss_energy, norm*norm, rtol=1e-12) + plain = float(np.linalg.norm(q4(ww)-ww)/norm) + rotated = float(np.linalg.norm(h128(q4(h128(ww)))-ww)/norm) + n,k = ww.shape + row = {'layer':layer,'expert':expert,'projection':proj,'shape':[n,k], + 'provenance':provenance,'numerical_rank_tol_maxdim_eps':int(np.sum(ss > ss[0]*max(n,k)*np.finfo(float).eps)), + 'rank_relative_frobenius_error':{str(r):float(np.sqrt(np.sum(ss[r:]**2)/ss_energy)) for r in [64,128,204,256,409]}, + 'toy_int4_relative_frobenius_error':plain,'block_hadamard_toy_int4_relative_frobenius_error':rotated, + 'rotation_error_ratio':rotated/plain, + 'same_dtype_rank64_entry_ratio':64*(n+k)/(n*k), + 'bf16_rank64_vs_fp8_dense_byte_ratio_no_metadata':2*64*(n+k)/(n*k)} + rows.append(row) + print(json.dumps(row),flush=True) + result = {'verdict':'PARTIAL: feasibility evidence on three selected matrices, NOT model accuracy or speed', + 'scope':'Frozen predetermined first/middle/last layer and expert selection; not random or representative; existing FP8 checkpoint, not BF16 original. No timings collected.', + 'model_path':MODEL,'python':sys.version,'numpy':np.__version__,'platform':platform.platform(), + 'controls':control,'selection':SELECTION,'rows':rows} + pathlib.Path(__file__).with_name('weight-probe-results.json').write_text(json.dumps(result,indent=2)+'\n') + print(control) + +if __name__ == '__main__': + main() diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/wolfram-results.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/wolfram-results.json new file mode 100644 index 0000000..da64376 --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/wolfram-results.json @@ -0,0 +1,88 @@ +{ + "provenance": "Values copied from actual mcp__wolfram__WolframLanguageEvaluator output for checks.wl; symbolic strings de-escaped for readability", + "result": { + "basis_identity_residual": [ + 0, + 0 + ], + "orthogonality": [ + [ + 1, + 0 + ], + [ + 0, + 1 + ] + ], + "four_orbital_hybrid_orthogonality": [ + [ + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "nonlinearity_does_not_commute": "{-1/2*((-1 + Sqrt[2])*x1^2) + x1*x2 - ((-1 + Sqrt[2])*x2^2)/2, -1/2*((x1 - x2)*((-1 + Sqrt[2])*x1 + (1 + Sqrt[2])*x2))}", + "interference_probability": "Cos[theta/2]^2", + "expert_matrix_entries": 1048576, + "rank64_entry_ratio": 0.15625, + "rank64_bf16_vs_fp8_byte_ratio_no_metadata": 0.3125, + "rank_break_even_equal_precision": "Element[rr, Integers] && Inequality[1, LessEqual, rr, LessEqual, 409]", + "rank_break_even_bf16_vs_fp8": "Element[rr, Integers] && Inequality[1, LessEqual, rr, LessEqual, 204]", + "hadamard2048_add_sub_count_excluding_normalization": 22528, + "complex128_state_GiB": [ + [ + 30, + 16 + ], + [ + 32, + 64 + ], + [ + 33, + 128 + ] + ], + "uniform_independent_eight_slot_expert_union_ASSUMPTION": 57.42083078599535, + "rotation_relative_weight_error_reduction_percent": [ + 15.566945060055627, + 2.2398566027061806, + 9.770039755864612 + ], + "rank64_relative_weight_error_percent": [ + 60.85668140383203, + 85.60844464246313, + 77.71349973363621 + ], + "rank204_relative_weight_error_percent": [ + 15.022797722044212, + 59.989309608626066, + 49.05376373789379 + ], + "selected_first_expert_zero_channel_fraction": 0.546875, + "selected_first_expert_zero_weight_payload_bytes": 1720320, + "selected_first_expert_total_weight_payload_bytes": 3145728, + "amdahl_halving_80percent_EXAMPLE": 1.6666666666666667, + "amdahl_halving_20percent_EXAMPLE": 1.1111111111111112 + } +} diff --git a/evidence/QUANTUM_EFFICIENCY/2026-10-22/zero-support-byte-confirm.json b/evidence/QUANTUM_EFFICIENCY/2026-10-22/zero-support-byte-confirm.json new file mode 100644 index 0000000..a6c92eb --- /dev/null +++ b/evidence/QUANTUM_EFFICIENCY/2026-10-22/zero-support-byte-confirm.json @@ -0,0 +1,295 @@ +{ + "zero_counts": { + "gate_proj": 280, + "up_proj": 280, + "down_proj": 280 + }, + "identical_support": true, + "zero_indices": [ + 1, + 2, + 3, + 4, + 6, + 7, + 9, + 10, + 13, + 14, + 15, + 16, + 18, + 19, + 22, + 23, + 26, + 27, + 30, + 31, + 32, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 42, + 43, + 44, + 45, + 46, + 47, + 49, + 52, + 53, + 54, + 55, + 56, + 59, + 60, + 61, + 62, + 64, + 65, + 67, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 79, + 81, + 82, + 84, + 85, + 88, + 89, + 92, + 93, + 96, + 97, + 98, + 100, + 101, + 102, + 107, + 110, + 112, + 113, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 128, + 132, + 134, + 136, + 137, + 138, + 140, + 147, + 149, + 150, + 154, + 155, + 158, + 159, + 160, + 162, + 163, + 164, + 166, + 168, + 169, + 170, + 177, + 178, + 180, + 181, + 183, + 185, + 186, + 189, + 190, + 192, + 193, + 194, + 195, + 197, + 199, + 205, + 207, + 208, + 214, + 217, + 221, + 223, + 224, + 226, + 229, + 232, + 234, + 235, + 236, + 237, + 238, + 241, + 242, + 243, + 248, + 250, + 253, + 254, + 257, + 258, + 259, + 261, + 263, + 265, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 275, + 276, + 277, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 290, + 293, + 295, + 297, + 298, + 302, + 303, + 307, + 309, + 311, + 312, + 313, + 315, + 316, + 318, + 325, + 327, + 330, + 332, + 334, + 335, + 340, + 341, + 342, + 344, + 345, + 349, + 350, + 352, + 355, + 361, + 362, + 363, + 365, + 367, + 370, + 374, + 375, + 376, + 383, + 384, + 385, + 386, + 387, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 399, + 401, + 402, + 404, + 406, + 407, + 409, + 411, + 414, + 416, + 419, + 420, + 421, + 422, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 432, + 434, + 437, + 444, + 445, + 446, + 447, + 448, + 451, + 452, + 453, + 454, + 456, + 457, + 458, + 459, + 460, + 461, + 463, + 466, + 467, + 469, + 472, + 474, + 475, + 477, + 478, + 479, + 481, + 484, + 486, + 488, + 489, + 492, + 499, + 500, + 501, + 502, + 503, + 505, + 509, + 511 + ], + "tensor_hashes": { + "gate_proj": "81e8478424044de8eb00b884f24aaf93d65f8a402f4bc788a96b7d6da6212838", + "up_proj": "20e8a45852934d5be753e701e2c1f8cad90c4e5c5c98f1419421fb0923aef155", + "down_proj": "e0132e90c275e9d168ec7480c08b7d1f083a7cdebce00081a7e1fb965d513fb8" + } +}