feat(adr-0249): reader→Hamiltonian compiler — design spike + P1 quantity kernel #66
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/reader-hamiltonian-compiler"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Opens the reader→Hamiltonian compiler arc — next-arc candidate #1 from the intelligence-loop acceptance evidence. The generalized-lift instrument recorded GSM8K/NL non-ingestibility as the composition frontier; this arc builds the mechanism that crosses it. First increment: the design spike (reviewed against the live tree) plus P1, the conformal quantity kernel.
Design thesis (spike)
docs/research/reader-hamiltonian-compiler-spike-2026-07-18.md— composition = certified turn sequences. The compiler does not compile a problem into one large Hamiltonian; it compiles a turn program — an ordered DAG of small relation-Hamiltonians, each solvable in one lifecycle turn, chained through the merged Ring-2 residual-protocol path ledger. The ≤5-atom ceiling is structural (2⁵ = 32 = the Cl(4,1) blade basis), so composition depth must live in the certified chain, not in matrix size. This is why the intelligence-loop arc was the prerequisite.All §8 rulings recorded RESOLVED (Shay, approved): affine-only Tier-1; >5-atom deduction is the next arc (a sequencing choice, not a math-impossibility — composition handles it deterministically); one ADR (0249); field wedge continues independently (INV-27 import-disjointness intact).
P1 — conformal quantity kernel
core/physics/quantity_kernel.py(serve-quarantined; A-04). Quantities as null points on the Cl(4,1) conformal line; add/scale by known constants as translator/dilator versor sandwiches (affine Tier-1). Projective, scale-invariant decode absorbs the dilator's conformal weight, so relation compilation (P2) can normalize losslessly.Every algebraic claim was first verified numerically against
algebra/cl41.py's own multiplication table (spike §3), then pinned as permanent tests.Reproducibility (spike §4.6) — three tiers, honestly bounded
<f8LE bytes; endianness already coerced.geometric_productis a fixed-order scatter-add (no BLAS/reduction) so IEEE-754 hardware-deterministic, but it silently truncates to float32 unless handed f64 (cl41.py:110-112). The kernel constructs everything in explicit f64 and pins a golden-bytes canary (frozen SHA-256 ofembed_quantity(3.0)) as a cross-hardware drift detector.H = c(I − ψψᵀ)has a 31-fold-degenerate excited eigenspace whose LAPACK basis is build-dependent, so propagator bytes are not cross-hardware identical. Mitigation: recover the ground state analytically (the target is constructed, not discovered) and pin the basis-invariantphase_correlation/2agreement to ψ, never the bytes. Recorded, not papered over.Tests
tests/test_adr_0249_quantity_kernel.py— 35/35 green. Nullity, translator exactness (algebraic), dilator sign convention (e^{−α}, pinned — caught a sign error in my own composition test), projective scale-invariant round-trip, affine-chain composition, f64-dtype guards, golden-bytes canary, fail-closed refusals on non-finite input and degenerate conformal weight.Governance
Serve-quarantined (A-04); reuses the existing
HamiltonianCompileError/ProblemHamiltoniancontracts rather than forking them; no self-Accept — ADR-0249 lands with acceptance evidence as the arc completes. P2–P5 stack on this branch.[Verification]:
uv run python -m pytest tests/test_adr_0249_quantity_kernel.py -q→ 35 passed;uv run core test --suite smoke -q→ 176 passed (1 benign engine_state warning).