Blaze2D is a solver for light that can travel through two-dimensional photonic crystals, written in Rust and about an order of magnitude faster than MPB in recorded parameter sweeps. It began as the solver for my master’s thesis and has grown into a long-term research project.
Light in a crystal
A photonic crystal is a material whose structure repeats on the scale of the wavelength of light, such as a material pierced by a regular pattern of long, parallel air holes. That pattern decides which light can travel through it and which is blocked, much as the atomic lattice of a semiconductor decides how electrons move.
The map of which light can pass is the band structure. Computing it means solving an eigenvalue problem from Maxwell’s equations, repeated for every wavevector the diagram samples.

Checked against MPB
MPB, developed at MIT, is the established reference solver for photonic band structures. Blaze computes the same bands, and in recorded parameter sweeps it is about an order of magnitude faster.
TM MPBTE MPBTM BlazeTE Blaze
Time per configuration (ms, lower is faster)
MPBBlaze f64Blaze mixed
Blaze’s core
Blaze writes the light field as a sum of plane waves and finds the bands with a mixed-precision block eigensolver (LOBPCG), applying Maxwell’s operator through fast Fourier transforms instead of storing large matrices. A study runs whole calculations in parallel rather than splitting each one across threads.
It returns more than bands: projected Maxwell operators, the quantities my master’s thesis needed. And it is a research ground of its own: new numerical ideas, such as reusing the crystal’s symmetries or starting the next geometry from the last one’s solution, are designed to go in as modules and be measured against the plain solver, regressions included.
Blaze is easy
Blaze was built to be easy to use from the start. Its website explains the theory and can even run the solver in the browser: the Workbench helps design a study, runs it, and exports the results.
For scripts and larger studies, Blaze has clear, modern interfaces in Python, Rust, and TOML, all sharing one configuration format. The Python package installs from PyPI with a single command.

Scope and scale
Blaze is substantially more than a shell around an existing numerical library: it is a full solver, written from scratch. Behind its interfaces sits a Rust workspace of separate parts: the solver core, one configuration contract shared by every interface, a runner for parallel studies, the command-line tool, the Python bindings, and backends for the CPU, the browser, and CUDA. Release workflows build portable Python wheels and test the installation outside the repository.
50,399 lines of Rust
the solver and its interfaces
663 automated tests
in Rust, Python, and the browser
8 crates
in one Rust workspace
17,636 lines of TypeScript
the website and the Workbench
443 commits
since November 2025
Where Blaze is headed
Blaze aims to become a full drop-in replacement for MPB workflows, and to enable research that is currently prohibitive due to computational limits or MPB’s legacy codebase. Blaze’s roadmap has multiple stages. The first builds a reliable research core: the solver is done, its use of the crystal’s symmetries is in development, warm starts are planned, and the pages on theory and benchmarks are being written.
The second makes the two-dimensional solver general and faster: crystals of any shape, quicker solves, calculations at a chosen frequency, gradients for optimizing a design automatically, and running existing MPB calculations in Blaze.
The third adds GPU computing and three dimensions: full 3D crystals, and photonic slabs, thin patterned films that confine light vertically. Every new feature is checked against MPB.
- Stage 1
Research foundation
Establish a reliable research core.- 2D research coreDoneRust implementation and theory: LOBPCG, mixed precision, clear API/TOML interfaces, and operator projections.
- SymmetriesIn DevelopmentQualified reuse, real or reduced coordinates, and measured automatic selection.
- Configuration warm startsPlannedCertified geometry continuation in public sweeps with bounded worker caches.
- Theory and benchmarksIn DevelopmentDocument the science and measure each change.
- Stage 2
Generalize and optimize 2D
Fully generalize 2D geometry, improve solving, and support MPB workflows. - Stage 3
GPU, 3D, and slabs
Add GPU execution and extend the physical models beyond 2D.
Context
Primary references
- Johnson & Joannopoulos (2001): Block-iterative frequency-domain methods for Maxwell’s equations in a planewave basis (the MPB reference method)
- Knyazev (2001): Toward the optimal preconditioned eigensolver (LOBPCG)
- Joannopoulos, Johnson, Winn & Meade: Photonic Crystals: Molding the Flow of Light (2nd ed.)
- MPB developers: User interface, run functions (MPB documentation; on reusing fields between runs)
- Georg, Ackermann, Corno & Schöps (2019): Uncertainty quantification for Maxwell’s eigenproblem based on isogeometric analysis and mode tracking
- Börm, Köhl & Talebi (2023): Computing Maxwell eigenmodes with Bloch boundary conditions (preprint)
- Minkov et al. (2020): Inverse design of photonic crystals through automatic differentiation
- Jin & Xie (2026): A robust GPU-accelerated kernel compensation solver with novel discretization for photonic crystals in anisotropic media (preprint)
- Feng (2024): Inverse design of photonic crystal waveguides using neural networks and dispersion optimization (preprint)
- Zanotti et al. (2024): Legume, a free implementation of the guided-mode expansion method for photonic crystal slabs
Novelty scope: Plane-wave expansion, the LOBPCG eigensolver, and MPB-style preconditioning are established methods; Blaze’s contribution is what it builds on them. It is an independent solver in modern Rust that computes the same bands as MPB, much faster in recorded parameter sweeps, and is easier to use in research. Its modular design leaves plenty of room for new methods and optimizations, each validated against MPB, to make band calculations and research on photonic crystals faster and more practical while keeping their accuracy.
