🌈⚙️ Neural Photonic Hybrid — light in, number out

Three trained nets in series: light interferes through the MZI2.pt optical core (verified 256/256), is measured by the PD.pt neural photodetector (verified 1024/1024), and folded into a single OUTPUT byte by the real ADC8 neural-CPU adder. Every value below is computed end-to-end by the three loaded, verified nets — no analytic formulas.

☝️ The prism above is real physics, not a gradient. A white beam enters an SF10 glass wedge; its refractive index (from the Sellmeier equation) depends on wavelength, so Snell's law at each face bends every colour by a different angle — violet (67°) harder than red (59°), which is why the violet edge lands closest. Each ray is traced forward, the honest way light actually travels. (Spread exaggerated ~2.6× for visibility; drag to orbit.) This is the same dispersion a photonic chip uses to separate wavelength channels — the doorway into the optical computer below. ⬇️

4 24
0 50
0 23

① Optical core — MZI2.pt (verified 256/256). Light is injected into one waveguide and propagates through a Mach-Zehnder mesh; every 2×2 mixing block is computed by the net. Height & colour = optical intensity, layer by layer — this is interference performing a matrix multiply, the part ray optics can't show. Press ▶ propagate light to watch the wavefront sweep.

② Photodetector — PD.pt (verified 1024/1024). A learned |·|² that measures the complex output field and returns one intensity byte per waveguide (bars). This is where a coherent light field becomes a real, readable number.

③ Neural CPU — ADC8 (real neural-aarch64 adder). The detected bytes are folded into a 16-bit output by ripple-carrying the verified 8-bit adder — the integer arithmetic passive light can't do. Result shown in decimal & binary, checked bit-exact.


🔬 Hardware reality (v2) — where verification meets analog imperfection

The N/N verification proves the discrete logic exactly. Real analog photonic hardware can't be exhaustively verified — fabrication variation, thermal phase drift, detector nonlinearity, ADC noise. There, correctness becomes a bounded-error / yield claim. Move the sliders to watch a 6-mode mesh degrade, then hit calibrate to fix the deterministic part.

0 0.12
0 0.1

v2 findings: a two-moons photonic classifier scores 99% on idealized HW → 61% on real (noisy) HW; noise-aware training recovers it to 98%. Per-device calibration lifts fabrication fidelity 0.90 → 1.0000, leaving a thermal floor of 0.983. Exact where it can be proven (digital); error-bounded where it can't (analog); deterministic error is calibratable, random drift is the floor.