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.

Animate Propagation

Animate Propagation

Aperture-Limited PSF

Aperture-Limited PSF

Gaussian Beam Propagation

Gaussian Beam Propagation

Young’s Double Slit

Young's Double Slit

Talbot Effect

Talbot Effect

Fresnel Zone Plate

Fresnel Zone Plate

Polychromatic Light with Grating

Polychromatic Light with Grating

Optical Systems#

Multi-element optical systems and instruments, including lenses, telescopes, interferometers, and holographic beam shapers.

Mach-Zehnder Interferometer

Mach-Zehnder Interferometer

Lens Focusing

Lens Focusing

Shaping Fields Using Phase-Only Modulators

Shaping Fields Using Phase-Only Modulators

4f System

4f System

Aberrations#

Optical aberrations and wavefront errors, including chromatic aberration in dispersive lenses and Zernike polynomial wavefront aberrations.

Zernike Aberrations

Zernike Aberrations

Chromatic Aberration of a Dispersive Lens

Chromatic Aberration of a Dispersive Lens

Coherence & Polarization#

Physical properties of the light field beyond scalar amplitude and phase, including polarization states, spatial coherence, and laser speckle statistics.

Spatial Coherence

Spatial Coherence

Laser Speckle Patterns

Laser Speckle Patterns

Polarized Field

Polarized Field

Optimization & Inverse Design#

Differentiable optics examples using gradient-based optimization to design phase elements and multi-layer diffractive systems for various applications.

Training Petal Beam

Training Petal Beam

Training Multi-Plane Focusing

Training Multi-Plane Focusing

Quantum Optics#

Quantum optical applications, including minimum-error discrimination between non-orthogonal quantum states encoded in spatial beam modes.

Quantum State Discrimination

Quantum State Discrimination

Gallery generated by Sphinx-Gallery