Skip to main content Switch to mobile version lightsim 0.1.1 Rust-native simulation engine for photonic chips: FDTD on GPUs, mode solvers, eigenmode expansion, finite elements, circuits, inverse design and quantum light, with a Python API
pip install lightsim Copy PIP instructions
Rust-native simulation engine for photonic chips, with a Python API.
lightsim's core is a GPU-first FDTD solver. Around it are waveguide mode solvers, eigenmode expansion, finite-element heat, electrostatics and modes, circuit simulation and inverse design, all without external programs. On one RTX PRO 6000 it runs at 22–27 Gcells/s, 2.2–2.4× faster than FDTDX from 17 M cells up (benchmarks).
CUDA: kernels written in Rust and compiled to PTX with NVIDIA's cuda-oxide; one build runs on Ampere through Blackwell (tested on RTX PRO 6000 and GB10), on one GPU, several GPUs (peer-to-peer halos) or several machines (TCP halos).
Vulkan and Metal: a portable GPU backend for AMD, Intel and NVIDIA GPUs through Vulkan and Apple GPUs through Metal (Rust kernels compiled to SPIR-V with rust-gpu, run through wgpu).
FDTD in 3-D and 2-D on non-uniform meshes, with dispersive, nonlinear (χ², χ³), anisotropic and magneto-optic media, gain media and conducting sheets; CPML, Bloch and mirror-symmetry boundaries.
Inverse design: adjoint gradients and exact gradients through reverse mode, density and shape optimisation.
RF and electro-optics: antennas, transmission lines and RF circuits; the Pockels chain from the RF field to the optical response.
gdsfactory: layout import, port-driven S-parameters, and lightsim.gplugins with the interface of gdsfactory's Meep plugin.
Process design kits: load a fab's kit (gdsfactory, KLayout technology, lightsim's technology file, a licensed kit on disk) and simulate its cells.
Fabrication Monte Carlo: width, thickness, etch, sidewall and overlay spreads and tiny defects (line-edge roughness, particles, missing elements) per sample, run in batches on CPUs and GPUs, with yield.
Quantum light (lightsim.quantum): photons and Gaussian states through circuits built from simulated or measured S-matrices, with loss, partly distinguishable photons, sources, detectors and heralded gates; permanents and hafnians on CPUs and GPUs; gradients for inverse design.
pip install lightsim Wheels for Linux (x86-64 and arm64: the CPU, NVIDIA GPUs through CUDA with only the driver installed, and any GPU with a Vulkan driver) and macOS (Apple silicon and Intel: the CPU and the Mac's GPU through Metal), for Python 3.10 and newer. The package holds the Python API and the lightsim command:
python -c "import lightsim; print(lightsim.__version__, lightsim.devices())" lightsim info From source (Rust 1.99.1; for NVIDIA GPUs, CUDA 13):
git clone https://github.com/su3co/lightsim && cd lightsim pip install maturin maturin develop --release # CPU only maturin develop --release --features cuda # with GPU support (NVIDIA, CUDA) maturin develop --release --features vulkan # portable GPU backend (metal on macOS) cargo build --release -p lightsim-cli # the `lightsim` program alone (same --features) Details: installation guide.
S-parameters of a gdsfactory component (pip install "gdsfactory>=8"), on a laptop CPU in seconds:
import gdsfactory as gf import numpy as np from lightsim.sparams import write_sparameters gf.gpdk.PDK.activate() # gdsfactory's generic PDK c = gf.components.straight(length=2) # 2 um of 500 x 220 nm silicon strip sp = write_sparameters(c, wavelengths=np.linspace(1.5e-6, 1.6e-6, 5), steps_per_wavelength=12, device="cpu") print(sorted(k for k in sp if "@" in k)) print(np.round(np.abs(sp["o2@0,o1@0"]) ** 2, 3)) # power transmission o1 -> o2 print(round(sp["mode_neff"]["o1"].real, 3)) # effective index of the port mode ['o1@0,o1@0', 'o1@0,o2@0', 'o2@0,o1@0', 'o2@0,o2@0'] [0.999 1. 1. 1. 0.999] 2.422 With device="cuda:0" the same call runs on a GPU. The quick start continues with a simulation built by hand.
Features against Lumerical FDTD and FDTDX
Released: Dec 4, 2026
All 5 files in this release have provenance metadata.
View provenance details
MIT View SPDX License List
gds plot quantum quantum-crosscheck test
fdtd electromagnetics maxwell photonics simulation gpu cuda gdsfactory inverse-design adjoint mode-solver eigenmode-expansion finite-elements photonic-integrated-circuits quantum-optics boson-sampling
Development Status 3 - Alpha
Environment GPU :: NVIDIA CUDA :: 13
Intended Audience Science/Research
Operating System MacOS
Programming Language Python :: 3
Topic Scientific/Engineering :: Physics
Release files for lightsim 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distributions (wheels)
Total release size: 41.1 MB
Release files / lightsim-0.1.1.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Release files / lightsim-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
Security for lightsim 0.1.1
All 5 files in this release have been uploaded with provenance metadata.
With provenance lightsim-0.1.1.tar.gz Dec 4, 2026
With provenance lightsim-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl Dec 4, 2026
Attestation for lightsim-0.1.1.tar.gz
Attestation for lightsim-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 4, 2026 5 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 1274d9b











