Examples#
A gallery of TorchOptics examples organized by topic. Each example is a self-contained script that can be downloaded and run locally.
Optical Phenomena#
Optical phenomena and diffractive optical elements, including interference patterns, zone plates, the Talbot effect, and grating dispersion.
Optical Systems#
Multi-element optical systems and instruments, including lenses, telescopes, interferometers, and holographic beam shapers.
Aberrations#
Optical aberrations and wavefront errors, including chromatic aberration in dispersive lenses and Zernike polynomial wavefront aberrations.
Coherence & Polarization#
Physical properties of the light field beyond scalar amplitude and phase, including polarization states, spatial coherence, and laser speckle statistics.
Optimization & Inverse Design#
Differentiable optics examples using gradient-based optimization to design phase elements and multi-layer diffractive systems for various applications.
Quantum Optics#
Quantum optical applications, including minimum-error discrimination between non-orthogonal quantum states encoded in spatial beam modes.