Computational Photonics in Python

Build complex geometries and numerical models easily with the versatility provided by the Python ecosystem.

Constructive solid geometry and high quality meshing with the most popular open-source mesh generator Gmsh.


Solve Maxwell's equations with the powerful Finite element library FeniCS.


  • Scattering models in 2D and 3D with computation of cross sections and LDOS
  • Grating models in 2D and 3D with computation of diffraction efficiencies and absorption
  • Modal analysis for non dispersive materials
  • Two scale convergence homogenization of metamaterials in 2D and 3D
  • Band diagrams of photonic crystals in 2D
  • Parallelization using MPI with domain decompostion
  • Parametric studies with embarrassingly parallel loops
  • Spectrum sampler utility
  • Automatic differentiation for inverse design

Install gyptis


conda install gyptis -c conda-forge


pip install gyptis


curl -s | bash
gyptis run

from source

git clone
cd gyptis && pip install -e .