Quantum Light Simulation

Numerical solutions to the time-dependent Schrödinger equation, visualising wave-particle duality, diffraction, and interference through optical simulation scenes.

Each scene numerically solves the time-dependent Schrödinger equation on a 2D or 3D grid, propagating a complex wavefunction ψ through an optical scene encoded as a potential field. Mirrors, lenses, and absorbers are all represented by spatially-varying complex potentials — the real part bends and slows the wave; the imaginary part absorbs it. Incoherent illumination is approximated by injecting wave packets at randomised frequencies each timestep and accumulating |ψ|² into a long-exposure intensity image.

Two solvers are used: RK4 (4th-order Runge–Kutta, explicit finite-difference) and SSFM (split-step Fourier, kinetic term solved exactly in frequency space — unconditionally stable, larger timesteps). Scenes run on either a Go CPU or Taichi GPU backend, deployed on AWS EC2.

Technical document preview Open PDF

2D Scene
Parabolic Mirror

A parabolic solar collector illuminated by parallel rays entering at 45° from the top-left. The mirror focuses the wavefront onto a small absorber at its focal point, demonstrating diffraction-limited concentration of wave energy.

2D RK4 9-point Isotropic Go CPU Diffraction Interference
Parabolic mirror simulation
Wave propagation — accumulated |ψ|²

2D Scene
Pinhole Camera

A reflective circle illuminated by an incoherent radial source, imaged through a pinhole camera. The sensor strip captures an inverted, diffraction-limited image of the object.

A thin wall on the right side of the scene demonstrates quantum tunnelling — the wave partially penetrates the barrier despite having insufficient energy to pass classically.

2D RK4 9-point Isotropic Taichi GPU Pinhole Incoherent Source
2D pinhole camera simulation
Scene (top) + sensor readout (bottom)

2D Scene
2D Torus Slice

A parabolic spotlight with a secondary mirror directs an incoherent broadband source toward a torus, while a hooded pinhole camera captures the image from below. A baffle blocks direct illumination of the camera.

The SSFM solver propagates the kinetic term exactly in Fourier space, allowing unconditionally stable evolution at large timesteps. Captures zoom into the camera and torus regions with independent exposure normalisation.

2D SSFM Taichi GPU Pinhole Parabolic Mirror Incoherent Source
2D torus slice — full scene
Full scene — accumulated |ψ|²
Pinhole camera capture
Pinhole camera
Torus cross-section capture
Torus cross-section

3D Scene
3D Pinhole Camera — Torus

A full 3D simulation of a pinhole camera observing a reflective torus. The wave is injected as a 3D incoherent radial source; the 3D RK4 solver propagates the complex wavefunction on a voxel grid using a 19-point isotropic Laplacian stencil (6 face + 12 edge neighbours).

The sensor plane is a 2D slice rendered via the camera system. A raytraced scene overview and expected geometric projection outline are shown alongside the quantum intensity result.

3D RK4 19-point Isotropic Taichi CUDA Pinhole Raytracing
3D scene raytraced overview
Raytraced scene geometry
Expected geometric projection
Expected geometric image (reference)
3D pinhole sensor — pure intensity
Sensor — pure |ψ|² intensity
3D pinhole sensor — with overlay
Sensor — with geometric overlay

3D Scene
3D Pinhole Camera — Large Grid

The same 3D pinhole torus setup scaled up to a 2400×800×800 voxel grid. Switching to SSFM makes this grid size feasible — the kinetic term is applied exactly in Fourier space across the full volume, with the potential step handled separately. The simulation runs on an L40S (48 GB) GPU via AWS EC2.

3D SSFM Taichi CUDA Pinhole Raytracing
Sensor readout — frame 4720
Sensor readout — frame 4720
Sensor accumulation — live
Sensor — accumulated intensity (live accumulation)
Pinhole outward view
Through the pinhole — looking outward toward the torus
Expected geometric projection
Expected geometric image (reference)
Top-down view
Top-down — spotlight → baffle → camera path
Dish front view
Dish front — secondary mirror inside sleeve
Scene overview
Scene overview
Spotlight exit monitor
Spotlight dish — light exit monitor