# Hydrogen Matrix Lab 0.8.0

This lab contains two explicitly separated engines:

1. **Quantum reference:** exact non-relativistic hydrogen `1s` and `2p_z` basis functions, including a time-dependent coherent superposition stored as a four-dimensional `(time, x, y, z)` density matrix.
2. **Geometric hypothesis:** two tangent 3-spheres embedded in four spatial coordinates, rotated and projected into interacting 3D wave sources. This is synthetic and is not asserted to be hydrogen physics.

Release 0.3.0 adds a third layer: **spectroscopy calibration and falsification**. It clocks the quantum animation from the two NIST Lyman-alpha fine-structure wavelengths, freezes a tangent-sphere fit on eight phases, and evaluates sixteen unseen phases against the quantum reference and two baselines. The exact release-0.2 rotor family fails four of five predeclared gates and is rejected as an adequate generator of this reference.

Release 0.4.0 tests two proposed rescues without changing that record. First, it adds up to four nonnegative phase-shifted copies of the frozen release-0.3 rotor. The four-component candidate improves unseen-phase squared Hellinger error by only 0.34%, remains much worse than the time-mean baseline, and fails five of six gates. Second, it tests whether temperature reverses quantum phase direction. In a bounded two-level model negative temperature reverses population ordering, but every thermal density matrix commutes with the Hamiltonian and is stationary. Time reversal changes the coherent phase direction; temperature does not.

Release 0.5.0 corrects the statement that electromagnetism was absent from the ideal hydrogen model. The Coulomb potential is already its nonrelativistic electromagnetic interaction. A frozen spectroscopy ladder adds ordinary electron-proton reduced mass and then point-nucleus Dirac fine structure. Reduced mass alone removes 97.77% of the old centroid error; the reduced-mass Dirac calculation predicts both NIST lines and leaves a 3.303 ppm centroid residual. That residual remains assigned to omitted standard recoil/QED/finite-size/hyperfine terms unless a separately derived higher-dimensional operator makes and passes a distinct prediction.

Release 0.6.0 adds the equation-level bridge between a changing density and an observable harmonic. It implements the conserved probability-current field for the existing `1s + 2p_z` wave packet, checks `partial_t rho + div(j) = 0`, computes the exact oscillating electric dipole and ideal E1 lifetime, and adds a three-state harmonic catalog. A counterexample is retained: `1s + 2s` and the `1s <-> 3s` pair have density beats but no one-photon `z`-dipole harmonic. Observable matrix elements and selection rules therefore filter the raw energy-gap harmonics.

Release 0.7.0 audits proposed golden-ratio alignments before adding any golden parameter to the physical engine. It represents \(\varphi=(1+\sqrt5)/2\) exactly in \(\mathbb Q(\sqrt5)\), verifies the Fibonacci companion-matrix and icosahedral identities, and separates them from a golden-angle sampler where \(\varphi\) is inserted by construction. A written all-level result excludes an exact \(\varphi\) ratio between any two nonzero ideal Coulomb bound-state gaps: every such ratio is rational, whereas \(\varphi\) is irrational. The fixed protocol also scans all 303,809 distinct pairs among 780 transitions with \(n\le40\); the closest numerical match is retained as a coincidence, not promoted to a law. The same rationality boundary means an exact golden turn cannot be one step of a finite angular grid, although Fibonacci grids approximate it increasingly well.

Release 0.8.0 adds a forward observable compiler. One declared coherent `1s + 2p_z` state generates position density, probability current, electric charge/current, an electric dipole, a far-zone coherent radiation field, and an operator-filtered harmonic catalog. The compiler also reports channels it cannot generate. Its decisive exact boundary is that the cycle-averaged classical dipole field carries one half of the initial quantum E1 energy-loss rate of the corresponding half-excited state. A classical expectation field is therefore not the complete spontaneous-photon channel; a quantized electromagnetic field is a missing operator, not a license to add unconstrained hidden rotors.

## Model

For an ideal point proton fixed at the origin, the Schrödinger `1s` wavefunction is

\[
\psi_{100}(r)=\frac{1}{\sqrt{\pi a_0^3}}e^{-r/a_0},
\qquad
\rho(r)=|\psi|^2=\frac{e^{-2r/a_0}}{\pi a_0^3}.
\]

The code evaluates \(\rho\) at every cell of a Cartesian `129 x 129 x 129` matrix spanning `[-8 a0, +8 a0]` on every axis. It then integrates the voxel weights, derives radial moments, samples a visible probability cloud from the matrix, and exports the centered surface enclosing 90% of the represented probability.

The exported surface is **not a solid electron shell** and the points are **not trajectories**. They are two visualization conventions for the same stationary probability density.

## Time-dependent quantum reference

A pure energy eigenstate has a moving complex phase but a static probability density. To obtain a genuinely changing density, release 0.2.0 uses the coherent superposition

\[
\Psi(\mathbf r,t)=\frac{1}{\sqrt2}\left[
\psi_{1s}(\mathbf r)e^{-iE_1t/\hbar}+
\psi_{2p_z}(\mathbf r)e^{-iE_2t/\hbar}
\right].
\]

Its interference term oscillates at `(E2-E1)/hbar`. The saved `24 x 49 x 49 x 49` matrix is therefore a real time-indexed sequence of 3D density slices.

## Conserved flow and observable harmonics

For charge `q`, the electromagnetic Hamiltonian and its conserved current are

\[
H=\frac{(-i\hbar\nabla-q\mathbf A)^2}{2m}+q\phi,
\qquad
\partial_t\rho+\nabla\cdot\mathbf j=0.
\]

`quantum_harmonic_current.py` evaluates the `A=0` probability-current vector for the existing packet and the electric-dipole observable `d(t)=-e<r>`. The exact `1s`--`2p_z` matrix element is `256/(243 sqrt(2)) a0`. The engine also catalogs pairwise energy-gap harmonics and keeps only those visible to the declared observable. It does not depict a localized particle orbit.

## Touching-rotor hypothesis

`four_d_touching_rotors.py` constructs two equal 3-spheres in `R4`. Their centers remain `2R` apart and each sphere remains distance `R` from their shared contact point while the center axis rotates through the `x-w` plane. Perspective-projected source envelopes emit complex waves whose squared sum forms a 3D intensity matrix.

This engine formalizes the proposed projection mechanism so it can be tested. It does **not** establish that hydrogen is generated by touching four-dimensional spheres.

## Run

```bash
python hydrogen_matrix.py
python hydrogen_4d_wave.py
python four_d_touching_rotors.py
python real_data_rotor_test.py
python temperature_phase_test.py
python latent_component_test.py
python spectroscopy_ladder.py
python quantum_harmonic_current.py
python golden_ratio_audit.py
python reality_observable_compiler.py
python -m unittest -v
python independent_check.py
python independent_wave_check.py
python independent_real_data_audit.py
python independent_extension_audit.py
python independent_spectroscopy_audit.py
python independent_quantum_current_audit.py
python independent_golden_ratio_audit.py
python independent_observable_compiler_audit.py
python render_preview.py
python render_wave_frames.py
python render_real_data_comparison.py
python render_quantum_current.py
python render_golden_ratio_audit.py
python render_reality_observer.py
```

Outputs are written to `outputs/`:

- `hydrogen_1s_density.npz`: coordinates, the full density matrix, and sampled voxel centers.
- `hydrogen_1s_90pct.obj`: static 3D probability envelope; coordinates are in Bohr radii.
- `summary.json`: matrix configuration, moments, probability radii, and epistemic status.
- `independent_check.json`: a separate SciPy quadrature and matrix audit.
- `hydrogen_1s_preview.png`: static preview generated from the saved matrix samples.
- `hydrogen_1s_2pz_basis.npz`: independently testable `1s` and signed `2p_z` basis matrices.
- `hydrogen_1s_2pz_4d_density.npz`: 24 time-indexed 3D quantum density and interference frames.
- `wave_summary.json` and `independent_wave_check.json`: quantum-wave results and independent audit.
- `touching_rotor_4d_projection.npz`: synthetic 4D-rotor projection and interference frames.
- `touching_rotor_summary.json`: exact geometric invariants and numerical periodicity checks.
- `hydrogen_1s_2pz_wave_frames.png`: four representative time slices.
- `hydrogen_1s_2pz_spectroscopy_clocked.npz`: ideal spatial densities with phase timestamps calibrated to the NIST listed-intensity-weighted Lyman-alpha centroid.
- `rotor_holdout_comparison.npz`: frozen quantum, rotor, time-mean, and radial matrices for the 0.3 evaluation.
- `real_data_rotor_result.json` and `independent_real_data_audit.json`: preregistered scores, decision, and separate replay.
- `rotor_holdout_comparison.png`: representative unseen quantum, rotor, and residual slices.
- `temperature_phase_result.json`: spectroscopy-clocked two-level temperature/population test and coherent time-reversal control.
- `latent_component_result.json` and `latent_component_holdout.npz`: the bounded one-to-four-component rescue curve, frozen four-component matrices, and decision.
- `independent_extension_audit.json`: separate reconstruction of the temperature and latent-component results.
- `spectroscopy_ladder_result.json`: H0 fixed-proton, H1 reduced-mass, and H2 reduced-mass Dirac comparisons to the two NIST Lyman-alpha levels.
- `independent_spectroscopy_audit.json`: independent Decimal recomputation of all central spectroscopy-ladder values.
- `quantum_harmonic_current.npz`: 48 time slices of the `y=0` density and probability-current vector field.
- `quantum_harmonic_summary.json`: exact dipole, ideal E1 rate, continuity checks, and three-state harmonic catalog.
- `independent_quantum_current_audit.json`: independent quadrature and fourth-order finite-difference replay.
- `quantum_harmonic_current.png`: density/current phases and the observable-selection counterexample.
- `golden_ratio_audit.json`: exact identities, fixed-grid convergents, exhaustive `n<=40` ideal-hydrogen gap-ratio scan, and evidence classification.
- `independent_golden_ratio_audit.json`: independent scalar replay of the exhaustive scan and exact identities without importing the production module.
- `golden_ratio_audit.png`: visual separation of imposed sampling, exact algebra, near coincidences, and external measured examples.
- `reality_observable_compiler.npz`: synchronized density, probability-current, charge/current, and far-field radiation arrays from one declared state.
- `reality_observable_compiler.json`: observer contract, channel registry, finite checks, and exact semiclassical/quantum boundary.
- `independent_observable_compiler_audit.json`: independent scalar and saved-array replay without importing the production compiler.
- `reality_observer_map.png`: one-page rendering of generated, approximate, blocked, and non-identified channels.

See `RESULTS.md` for the preserved 0.1.0 result, `RESULTS_0.2.md` for the dynamic release, `RESULTS_0.3.md` for the spectroscopy/holdout result, `RESULTS_0.4.md` for the bounded rescue tests, `RESULTS_0.5.md` for the electromagnetic correction ladder, `RESULTS_0.6.md` for conserved flow and observable harmonics, `RESULTS_0.7.md` for the golden-ratio exactness audit, `RESULTS_0.8.md` for the forward observable compiler, and `CLAIM_LEDGER.md` for explicit claim boundaries.

## Interpretation boundary

These are written analytic or synthetic models plus finite computation. They are not measurements of a particular atom. The spatial density reference still ignores proton recoil, spin, fine/hyperfine structure, Lamb shift, relativity, external fields, and finite proton size. The 0.5 spectroscopy ladder adds reduced mass and leading Dirac structure only to the energy comparison; it does not turn the old voxel animation into a precision-QED state. A density animation does not imply that a localized electron follows a trajectory. The synthetic rotor engine has not been derived from the hydrogen Hamiltonian and does not identify a deeper physical or theological cause.

The NIST wavelengths are real spectral constraints, but they do not supply a measured 3D density. The spectroscopy-clocked matrix is therefore a calibrated proxy, not a direct movie of an atom. The failed rotor holdout is preserved; the holdout must not be reused to tune a replacement.

Probability current is conserved flow of position probability, not proof of a hidden orbit. A changing density is also insufficient to predict emitted light: an operator matrix element can cancel a density harmonic exactly. Release 0.6 implements only the field-free `A=0` current; external vector potentials and driven dynamics remain future tests.

Golden-ratio language now has an exact gate. A result counts as intrinsic only when \(\varphi\) follows symbolically from the declared generator, symmetry, or geometry. Choosing a golden angle or icosahedral coordinate inserts \(\varphi\) and is not evidence that hydrogen selected it. A close decimal ratio found after hundreds of thousands of comparisons is a finite near-match unless a frozen physical derivation predicts it. External appearances in an `E8` Ising-chain spectrum, quasicrystals, or phyllotaxis do not transfer to hydrogen without a Hamiltonian coupling and a fresh observable prediction.

The observable compiler is deliberately incomplete in public. “Generated” means the declared state and operator produce a value; it does not mean reality has been exhausted. The far-field light layer is a semiclassical electric-dipole projection. It lacks vacuum fluctuations, photon statistics, self-consistent backreaction, spin magnetization, recoil, full QED, and finite proton size. Those channels are marked `blocked` rather than being assigned post hoc to an unseen dimension. Existing measurement devices may themselves be limited, but a proposed deeper engine must still reproduce their stable outputs through an explicit observation map.

“Missing variables” remains a hypothesis, not a universal escape clause. The 0.4 test rejects only extra phase-shifted copies with the same frozen geometry. Other latent-variable proposals remain open only after specifying their variables, dynamics, observable map, parameter budget, and a fresh failure condition. Unbounded additions can interpolate finite data without explaining it.

A proposed fourth spatial coordinate must enter through an explicit field equation or action. The release-0.5 admission rule requires a derived operator `O_4`, its units and coupling to charge/current, a gauge or conservation law, a frozen parameter budget, and a fresh state-dependent prediction. No such operator is yet specified, so no residual is attributed to a four-dimensional source.
