# Hydrogen Observatory v0 — science note

## Question

How do the quantum numbers of hydrogen determine its spatial probability density,
phase, and radial nodes? v0 examines two-dimensional slices of analytic stationary
states. v1 is planned to render the same fields in three dimensions.

## Model and conventions

One electron in the Coulomb potential of a fixed, point proton. The nucleus has
infinite mass in this approximation. We omit spin, relativity, fine structure,
external fields, measurement dynamics, and interactions with other atoms.
Coordinates are in Bohr radii a₀ (approximately 0.0529 nm). We use atomic units,
with energies Eₙ = −1/(2n²) Hartree; one Hartree is approximately 27.211386 eV.
The controls allow 1 ≤ n ≤ 4, 0 ≤ ℓ < n and −ℓ ≤ m ≤ ℓ: 30 states.

At the displayed reference time:

    ψₙℓₘ(r,θ,φ) = Rₙℓ(r) Yℓᵐ(θ,φ)
    ρ = 2r/n
    Rₙℓ = √[(2/n)³ (n−ℓ−1)! / (2n (n+ℓ)!)]
           exp(−ρ/2) ρ^ℓ L⁽²ℓ⁺¹⁾ₙ₋ℓ₋₁(ρ)

Generalized Laguerre polynomials use L₀ᵅ=1, L₁ᵅ=1+α−ρ and their three-term
recurrence. Spherical harmonics use normalized associated Legendre polynomials
with the Condon–Shortley phase, exp(imφ), θ measured from +z, and φ from +x
around +z. Negative orders obey Yℓ⁻ᵐ = (−1)ᵐ conjugate(Yℓᵐ).
Nonzero m selects complex angular-momentum eigenstates, not real pₓ/pᵧ or dₓᵧ
combinations. The m=0 p, d and f presets are aligned with z.

There is no time integration: the analytic eigenfunctions are evaluated directly
in JavaScript double precision. A stationary state's time dependence is an
overall phase; its density does not change. Changing a control selects a different
state, rather than simulating a physical transition. Global phase is arbitrary.

## What the display means

The image samples |ψ|², a three-dimensional density in a₀⁻³, on either an x–z
plane at fixed y, or an x–y plane at fixed z. It is not a line-of-sight projection
or a normalized two-dimensional probability distribution. An infinitesimally thin
slice has zero integrated three-dimensional probability. A blank nodal plane is
a valid result; use the offset control to move away from it.

A 480 × 480 pixel grid samples pixel centers. Each axis initially spans ±3n² a₀;
the field-of-view slider changes that span. The domain is finite and does not
contain the entire orbital. Features narrower than a pixel may be unresolved.
The tiny white center marker identifies the proton only for a central slice;
its drawn size is schematic, not a physical nuclear radius.

Brightness is B = log(1 + g d/dmax) / log(1+g), where d is density, dmax is the
sampled peak of the current slice, and g is the exposure control (1 to 10000).
Therefore apparent brightness cannot be compared between different slices or
states. The peak and pointer readout report unscaled density. Colors encode phase
arg(ψ) with a cyclic palette, or use a single cyan ramp in density mode. Phase at
a node is undefined and is hidden by zero brightness. No particles or trajectories
are sampled, and no motion is added for decoration.

The separate radial chart displays P(r)=r²|Rₙℓ(r)|² in a₀⁻¹, including integration
over all solid angles through the normalized angular function. Its horizontal
range is 0 to 6n² a₀. Its vertical scale adapts to the labelled peak. The area under
the complete curve is one; the displayed finite interval excludes a small tail.
The mean radius is [3n²−ℓ(ℓ+1)]/2 a₀, and radial nodes number n−ℓ−1.

## Validation and reproducibility

Run `node quantum/v0/scripts/validate.mjs` from the repository root. The checked-in
`results/validation.json` records the runtime, individual absolute errors,
tolerances and results. Checks include independent Cartesian formulas for 1s,
2s, and all 2p components; known nodes; angular normalization; radial normalization
and mean radius at two quadrature resolutions; radial orthogonality; ±m symmetry;
and a Cartesian finite-difference check of Hψ=Eψ at two spatial step sizes for
every allowed state. Radial integrals extend to 20n² a₀. These checks sample the
implementation and are not a proof of a global numerical error bound.

Browser checks exercise presets, dependent quantum-number bounds, nodal slices,
phase and density modes, reset, archive delivery, and narrow/touch layouts.
Physical-phone frame time, energy use, and native-platform parity are not yet
measured; v0 makes no mobile performance claim.

## Portability and the path to v1

`src/hydrogen.mjs` contains no browser or rendering APIs. The browser worker uses
its field evaluator; a native port can use the same analytic formulas and checked
reference values. That native port is not implemented or validated in v0.
The 3D version can evaluate this same analytic field for volumes or isosurfaces
without first introducing a general time-dependent solver.

## References

- Richard Fitzpatrick, University of Texas at Austin: [Energy Levels of Hydrogen
  Atom](https://farside.ph.utexas.edu/teaching/qm/lectures/node42.html), for the
  Coulomb model, separated eigenfunctions, quantum numbers, energies and normalization.
- [NIST Digital Library of Mathematical Functions, §18.9](https://dlmf.nist.gov/18.9),
  for orthogonal-polynomial recurrence relations.
- Visual direction for future v1: kavan, [Simulating Atoms in C++](https://www.youtube.com/watch?v=OSAOh4L41Wg).
