PhotonForge 1.5.1 Documentation

The photonic design cycle in PhotonForge: schematic, PDK, layout, multi-physics simulation, optimization, DRC, yield, and time-domain analysis

PhotonForge is a design tool that integrates with foundry PDKs to speed up the design, simulation, and verification cycle for optical components and systems.

Installation

Simply go to tidy3d.simulation.cloud and sign up for an account. From there, just load our web GUI (no installation required) or continue with the next steps for the Python interface.

PhotonForge is a python module that can be easily installed via pip. Python 3.10 or newer is required:

pip install photonforge

This command will install PhotonForge and its dependencies in the current environment. If you have Tidy3D already installed in a virtual environment, you can use the same environment for PhotonForge.

A Tidy3D API key is required to authenticate PhotonForge users. If you don’t have one already configured, you can get a free API key and configure it with the following command:

tidy3d configure

On Windows, it is easier to use pipx to find the path to the configuration tool:

pip install pipx
pipx run tidy3d configure

More information about the installation and configuration of Tidy3D can be found here.

You can verify that the PhotonForge installation worked by running the following command to print the installed version:

python -c 'import photonforge as pf; print(pf.__version__)'

Optional: PDK Installation

Proprietary foundry PDKs are loaded as PhotonForge technologies, which are distributed within each PDK package along with installation instructions.

Publicly available PDKs can be installed with pip. For example, to install SiEPIC OpenEBL or Luxtelligence LNOI400 or LTOI300 PDKs for PhotonForge, simply use:

pip install siepic-forge
pip install siepic-sin-forge
pip install luxtelligence-lnoi400-forge
pip install luxtelligence-ltoi300-forge

First Run

With the module installed and the API key configured, this short script exercises the full cloud workflow: it builds a parametric S bend, runs a 3D FDTD simulation on it, and plots the resulting S parameters.

 1import numpy as np
 2import photonforge as pf
 3
 4# Set the default project technology
 5pf.config.default_technology = pf.basic_technology()
 6
 7# Create an S bend from the parametric component library using the "Strip"
 8# waveguide profile defined in the Basic Technology, set up for a 3D FDTD simulation
 9s_bend = pf.parametric.s_bend(port_spec="Strip", length=4, offset=1.5, model=pf.Tidy3DModel())
10
11# Computing the S matrix runs the Tidy3D simulation in the cloud
12s_matrix = s_bend.s_matrix(pf.C_0 / np.linspace(1.5, 1.6, 11))
13
14# We can easily plot the S parameters with the following utility
15fig, ax = pf.plot_s_matrix(s_matrix)

The parametric.s_bend() function creates a parametric component with 2 ports, and the model argument attaches a Tidy3DModel to it. If we look at the created s_bend component in a Jupyter notebook, we can see an SVG representation of the geometry and ports, as below.

S bend representation

Parametric S bend for a “Strip” waveguide.

When we calculate the S parameters in line 12, the model generates a Tidy3D simulation that is automatically run and provides the required scattering coefficients. Line 15 uses the plot_s_matrix() utility function to quickly plot the S parameters:

Plot of the S parameters

S parameters for the parametric S bend.

Note

The S parameters are cached by Tidy3DModel, so the FDTD simulation can be skipped in future runs as long as there are no changes to it.

Next Steps