Real-Time WebGL 2 Quantum Simulation & Time-Dependent Schrödinger Wave Mechanics Laboratory.
Language: EN | TR • ✦ Live Simulation (doubleslit.hfatih.com) · GitHub Pages · Overview · Physics Engine · Measurement & Decoherence · Controls
Quantum Double-Slit is a real-time, browser-native simulation of the foundational experiment of quantum mechanics, powered by pure WebGL 2 shaders and zero external dependencies.
Instead of drawing an animated heuristic or pre-baked interference texture, it directly solves the 2D time-dependent Schrödinger equation (TDSE) on a high-resolution
- Genuine Wave Mechanics: GPU leapfrog finite-difference time-domain (FDTD) solver with absorbing sponge boundary layers eliminating edge reflections.
-
Born's Rule & Particle Detection: Computes the true integrated quantum probability current flux
$J_x = \int j_x , dt$ arriving at the screen. Individual particles are sampled via exact inverse-CDF Monte Carlo. Random one-by-one, interference en masse. -
Which-Way Measurement (Decoherence): Toggle the slit detector to observe quantum decoherence. State entanglement destroys cross-term phase interference, collapsing the fringe pattern into the classical sum of two single-slit envelopes (
$V = 0.83 \to 0.00$ ). - Single-Particle Wavepacket Mode: Watch an isolated Gaussian wavepacket leave the source, pass through both slits simultaneously in coherent superposition, and collapse into a single localized flash at the detector screen.
- Continuous Beam Mode: High-flux steady state beam creating stationary interference patterns with live histogram build-up and theoretical curve comparison.
- Starlit Cosmic Dark UI: Crafted in the signature Starlit aesthetic (#150a14 deep obsidian plum, #f0abc5 celestial rose, frosted glass cards, and 4-point sparkle stars ✦).
[ Coherent Source ] [ Barrier ] [ Detector Screen ]
x = 140 x = 360 x = 1000
│ │ │
════════╪══════════════════════════╡ Slit 1 │
│ │ (width a) │ Probability
ψ(x, y, t) ────────────────────► ╞═══════════ │ Flux Flux J(y)
│ │ Spacing d ───────────────► │ ──────────────►
│ ╞═══════════ │ Monte Carlo
════════╪══════════════════════════╡ Slit 2 │ Sampling N
│ │ │
Splitting the complex wavefunction
The probability flux crossing the screen at
The cumulative probability distribution
For distance
Measured simulation values match theoretical hyperbolic fringe spacing within
Quantifying quantum fringe visibility from local maxima and minima:
-
Interference Mode:
$V \approx 0.83$ (High contrast dark and bright bands). -
Detector Active Mode:
$V \approx 0.00$ (Flat classical distribution; which-way information completely destroys interference).
| Shortcut | Action | Description |
|---|---|---|
| Space | Pause / Resume | Freezes time evolution for frame inspection |
| C | Clear Screen | Clears accumulated detector dots without resetting wave state |
| R | Reset All | Restarts wavefunction and resets particle count |
| D | Toggle Detector | Activates / deactivates slit which-way measurement |
| M | Toggle Mode | Switches between Continuous Beam and Single Particle |
| 1 | |ψ|² View | Displays probability density in celestial starlight glow |
| 2 | Re ψ View | Displays real wave amplitude (crests & troughs in rose / cyan) |
| 3 | Phase View | Displays complex argument |
No build steps, no package managers, no server needed.
- Clone or download the repository:
git clone https://github.com/Hfatih/quantum-double-slit.git
- Open
index.htmlin any modern web browser with WebGL 2 support (Chrome, Edge, Firefox, Safari).
-
✦ Girişim Deseni (Standard Interference):
$\lambda = 12$ ,$d = 112$ ,$a = 30$ , detector OFF. - ✦ Dedektörü Aç (Detector ON): Slit observers active; shows loss of interference fringes.
-
✦ Yarıklar Uzak (Wide Spacing):
$d = 180$ ; denser, closely packed fringe spacing$\Delta y$ . -
✦ Dar Yarıklar (Narrow Slits):
$a = 14$ ; broad single-slit diffraction envelope. -
✦ Uzun Dalga Boyu (Long Wavelength):
$\lambda = 18$ ; widely spaced interference fringes.
This project is open-source under the GNU GPL v3.0.
Developed with ✦ by Fatih Han (Hfatih).
Project-owned code and original material in this revision are licensed under GNU GPL v3.0 (GPL-3.0-only). Third-party code, fonts, imagery, data, and brand assets retain their own terms and attributions. Previous license and copyright notice.