# Double Slit **One particle at a time — the fringe pattern builds itself. Classically this is supposed to be impossible.** Particles pass through two slits one by one. There is no wave function evaluated anywhere in the engine — each particle is a leaf Frame taking a single 1-pixel step per tick. The banded arrival distribution at the detector wall is **emergent** from single-occupancy collisions and the per-Frame oscillation alone. *New to FRQTL? Start with **Hello, FRQTL** (`getting-started-hello-frqtl`) for the `caps.frqtl` setup-module + declarative-canvas basics this notebook assumes.* The experiment assembly — slit screen, light source, detector wall — as editable user code: /* setupDoubleSlit — THIN ADAPTER over the canonical setup factory * (WS gym-controls-as-sugar Bite 0: this cell used to hand-copy the physics — * a divergent fork of lib/frqtl/objects/setup/setupDoubleSlit.js that had * already drifted onto a stale `universe.init(...)` positional-argument call the * engine now FAIL-LOUDs on, plus a dead `CollisionActions.RECOLOR` reference the * canonical source removed. The canonical factory is imported by BARE SPECIFIER * (a relative path here would 404 — see lib/shim/notebook/frqtl-setups-importmap.js); * this cell only bridges the notebook builder's `(frqtl, universe, options)` call * shape to the factory's `(universe, options)` shape — ZERO physics here.) */ import { setupDoubleSlit as _setupDoubleSlit } from '@frqtl/setups/double-slit'; export function setupDoubleSlit(frqtl, universe, options) { return _setupDoubleSlit(universe, options); } Declare a canvas that runs it. `setup="#"` + `stage`/`seed`; the shim synthesizes and runs the builder boilerplate in the realm. Click **Run** (or **Run All**): ## What you are seeing Particles emit from the light source on the left, most are blocked by the slit screen, and the few that pass through the two openings travel to the detector wall on the right. Over many ticks the arrival positions cluster into fringes — the classical "impossible" result, built from individually launched particles with no wave equation. **The geometry is a knob.** `wavelength` (default 64) is the single master parameter: it scales slit height, inter-slit gap, wall positions, and detector distance all at once. At `wavelength = 64` on a 480×480 canvas both slits receive balanced illumination (slit1/slit2 ratio ≈ 1.0) and a clear multi-band pattern emerges. The captured sweep across `wavelength` 16 → 128 is in [`docs/internal/physics-lab/double-slit-wavelength.md`](../../docs/internal/physics-lab/double-slit-wavelength.md). **`detectAtSlits` — the "which-slit" knob.** The default (`1`) applies `RANDOM_XY` at each slit opening: detection disturbs the particle's trajectory. Set it to `0` (transparent slits, no detection) or `2` (color-only, no disturbance) to compare the unobserved and color-only cases. **Edit the physics:** open the `./setups/double-slit.js` tab and pass an option override to the canonical factory — e.g. change the adapter's `_setupDoubleSlit(universe, options)` call to `_setupDoubleSlit(universe, Object.assign({ wavelength: 32 }, options))` (also try `angleIncrement` or `detectAtSlits`) — then re-Run. The fringe pattern changes because you edited the construction. (The physics body itself lives in the canonical `lib/frqtl/objects/setup/setupDoubleSlit.js` — this cell is a thin, engine-agnostic adapter over it, the SAME construction the `double-slit-rosetta-qft` notebook drives.) The simulation runs live in your browser on the compiled FRQTL (WASM) engine.