interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / research / atemporal / at0 / oracle / NUMERICAL_ERROR.md

77 lines · 5795 bytes Raw Blame History Source

Numerical error documentation for the AT-0 reference oracle

Every record this oracle writes says arithmetic BINARY64, bound_kind ESTIMATED, threads 1. ESTIMATED means: the bounds below are stated numerical estimates backed by the analysis and the measurements here, not proven enclosures. A RIGOROUS claim would need directed-rounding interval arithmetic with enclosed cos, sin and exp; Rust's standard library does not provide that and this oracle pulls in nothing else, so it does not claim it. A case that demands min_bound_kind RIGOROUS therefore fails bound_kind_sufficient here by design (fixture n5-rigorous-demand).

eps below is 2^-52 (about 2.2e-16), the binary64 unit roundoff for values of order 1.

What is exact

Stated bounds

QuantityPathStated absolute boundReasoning
constraint_residualmatrix8 (N + M) epsH_total Psi is a sum of at most 2N products of inputs of size max|E|, |h| by amplitudes of size <= 1; for the ideal cases every product is exactly representable and the result is exactly 0. The factor 8 (N + M) covers the matrix-vector sums and the normalization.
povm_residualmatrix8 (N + M) epsM rank-one terms of size w/N, each with error about eps per complex exponential (cos/sin from the platform libm, accurate to a few ulp), summed in a fixed order, then a Frobenius norm. Absolute error grows at most linearly in M.
clock_probability kmatrix8 (N + M) eps||phi_k||^2 / ||Psi||^2 with phi_k an N-term sum; error linear in N.
pauli k AXIS SIGNmatrix8 (N + M) epsTr(rho_k Pi) with rho_k normalized by ||phi_k||^2; two 2 x 2 products on top of the phi_k error.
reference k AXIS SIGNanalytic64 eps (1 + |t| (|h0| + |h|))one cos, one sin, one unit-modulus phase of argument up to |h0 t|, a handful of complex multiplies; the argument-size term covers the absolute error of trig functions at large arguments.

Bounds are written as scaled decimals at the twentieth decimal place, rounded up and then increased by one further unit (bound_token), so the written bound is never smaller than the float estimate even if the decimal scaling itself rounded.

At the contract maximum N = 64, M = 256 the matrix bound is 8 * 320 * eps, about 5.7e-13, under the frozen example's tolerances 1@12. For the ideal fixtures (N = M = 4) it is 1421087@20, about 1.4e-14.

Measured errors (fixtures, rustc 1.98.1, aarch64-unknown-linux-gnu, glibc libm)

MeasurementValueWhere
Largest deviation of any matrix-path or analytic-path Pauli probability from its hand-derived exact rational, over the 12 fixtures that carry expectations (N in 3..8, offsets, phases, spec section 13 tables incl. the tilted-field P2 table)2.2e-16fixtures/CALIBRATION.md
Same for the clock probabilities 1/N<= 2.2e-16same
constraint_residual, ideal casesexactly 0*.values
constraint_residual, tilted field (p2-tilted-3-10-2-5, p2-h0-shift)9.8e-18*.values
povm_residual, N = 42.6e-16*.values
povm_residual, N = 81.8e-15*.values
Agreement between the three independent routes (matrix, Schrodinger closed form, Bloch rotation)<= 1e-12 asserted, ~1e-16 observedtests
Agreement between the vector route and the density-matrix route inside the matrix path<= 1e-12 assertedtests
Bit-for-bit agreement of every f64: value token with the earlier Python/CPython 3.12 version of this oracle on the same machineall 21 fixtures of the first release identicalchecked with cmp before that version was removed

Observed errors sit one to two orders of magnitude below the stated bounds and three to four below the 1@12 tolerances. The margin is intentional: ESTIMATED bounds must not be tight.

Known limitations

  1. Portability of the last bits. f64::cos, f64::sin and the derived phases come from the platform C library. Two machines may differ in the last bit of a reference or pauli token, which changes verdict_id. The verdict outcome does not change unless a value sits within one ulp of a tolerance edge, which none of the fixtures does.
  2. ESTIMATED, not RIGOROUS. The bounds are analysis plus measurement, not interval enclosures.
  3. Dense arithmetic. O(N^2 M) complex operations; at the contract maximum this is about a million operations, well under a second, and the dimension limits are enforced by the parser.
  4. i128 rationals. Exact arithmetic relies on the contract's 1048576 limit on numerators and denominators; the parser refuses anything larger, so overflow cannot be reached from a valid case.