PhotonForge Learning Center / Build and Simulate a Circuit
PhotonForge · GUI tutorial · Part 2

Build and Simulate
a Circuit

From a single directional coupler to a Mach‑Zehnder interferometer, and on to a hybrid circuit that mixes analytical models with a layout‑driven FDTD component from a foundry PDK. All inside the PhotonForge GUI.

Use arrow keys or the buttons below. New to the GUI? Start with the Getting Started guide.

Step 1 · Place a component

Drag a Directional Coupler onto the canvas

Open a schematic editor and drag the Directional Coupler from the Abstract Components library onto the canvas. Selecting it shows its analytical model in the Properties panel: Coupling Ratio 0.5, Cross Phase −90°, N Eff 2.4, all editable.

Tip: if N Group is left empty it defaults to N Eff. The same convention applies to the other components in this guide.

Directional Coupler placed on the canvas with its Properties panel
Step 2 · Assign ports

Expose the ports of your circuit

External ports define the S‑matrix of your circuit. The recommended way to create them: right‑click each open port of the component and choose Assign port. PhotonForge numbers them automatically (P0, P1, P2, P3). The same menu also offers a time monitor for time‑domain runs.

Right-click port menu with Assign port option
Right‑click an open port and select Assign port.
Directional coupler with assigned ports P0 to P3
All four ports assigned: P0, P1 in, P2, P3 out.
Step 3 · Configure the simulation

Set the frequency-domain sweep

Switch the left panel to the Simulation tab. Keep the mode on Frequency Domain and set the sweep: start wavelength 1.53 µm, stop wavelength 1.57 µm, 101 points.

Simulation tab with frequency domain settings 1.53 to 1.57 um
Step 4 · Run

Run the simulation

Click Run (top right). The job appears in the Results panel at the bottom of the canvas and completes in seconds for analytical models: status Succeeded, progress 100%.

Simulation job succeeded in the results panel
Step 5 · View results

Create a plot from the data set

Open the Results tab at the top of the workbench. Every run stores its data under Data set → S Matrix. Hover over S-matrix result 1 and click the button that appears, then choose Create plot (the same menu lets you Rename results). Alternatively, click a plot type under Add plot and pick the result from the dropdown.

Menu of an S-matrix result with Create plot option
The … menu of a result in the Data set panel.
Add plot panel with the available plot types
Or pick a plot type from the Add plot panel.
Step 6 · The 50/50 splitter

A perfect splitter, as expected

In the plot editor, add the S‑matrix elements S(P0,P2) (through) and S(P0,P3) (cross) with the Input/Output port dropdowns. Both sit at exactly −3 dB across the band: the ideal coupler splits power 50/50 with no wavelength dependence.

Flat -3 dB transmission of the ideal directional coupler
Step 7 · Build the MZI

Two couplers and a waveguide

Drag in a second Directional Coupler and a WG (waveguide). Connect ports by dragging from one port to another: the top arm goes through the WG, while the bottom arm is a direct port‑to‑port connection, a virtual, ideal link with zero length. Assign the four external ports as before.

MZI schematic with two couplers, a waveguide arm and a virtual connection
Step 8 · Set the arm imbalance

Give the WG a length of 100 µm

Select the WG and set Length = 100 µm in Properties. With the bottom arm ideal (zero length), this is the full path imbalance ΔL of the interferometer. N Group is empty, so the group index defaults to N Eff = 2.4 and the expected fringe spacing is:

FSR = lambda squared over n_g Delta L = 10 nm
WG properties with Length 100 um and empty N Group highlighted
Step 9 · MZI spectrum

Interference fringes

Run again and plot S(P0,P2) and S(P0,P3) from the new result. The two outputs show complementary fringes with the predicted ~10 nm spacing: when one output is dark the other is bright, and power is conserved. For this ideal, lossless MZI the extinction at the fringe minima is actually infinite; the dips only look finite because of the finite number of wavelength points. Click Save Plot to save this plot.

Complementary interference fringes of the analytic MZI
Step 10 · Add a foundry PDK

Load the SiEPIC EBeam library

So far every model was analytical. Now let's bring in a real fabricable component. Click the library icon at the top of the Component Library panel and Add the SiEPIC EBeam silicon PDK. Its components carry full layout information, ready for physical simulation.

Libraries dialog with SiEPIC EBeam PDK highlighted
Step 11 · Pick the crossing

Find ebeam_crossing4 in the PDK

The SiEPIC EBeam library now appears in the panel: grating couplers, Y‑branches, tapers, terminators, and the waveguide crossing we want, ebeam_crossing4. We will place it in the bottom arm, a common situation in dense layouts where two waveguides must cross.

SiEPIC EBeam library with ebeam_crossing4 tile highlighted
Step 12 · Swap the virtual connection

A physical crossing in the bottom arm

Right‑click the bottom‑arm wire and choose Delete Edge, then drag ebeam_crossing4 in and connect its left and right ports (the straight‑through path). Select it and look at Models: the Active Model is Tidy3D. This component is characterized by a full 3D FDTD simulation derived from its layout, not by an analytical formula.

Hybrid MZI with the crossing wired in and its Tidy3D model highlighted
Step 13 · Automatic FDTD

PhotonForge creates the Tidy3D simulation for you

Click Run. PhotonForge detects that the crossing needs its S‑matrix, builds the 3D structure from the PDK layout and process stack, and submits Tidy3D FDTD simulations automatically, one per input port, with sources and monitors already in place. You can watch the task in the Tidy3D web GUI. Results are cached: the next run reuses them at no cost.

Automatically created Tidy3D FDTD simulation of the crossing
Step 14 · Hybrid spectrum

Behavioral + FDTD in one S-matrix

When the FDTD tasks finish, the circuit solver combines the couplers and waveguide (analytical) with the crossing (FDTD data) into a single response. The fringes are back, now including the real insertion loss and dispersion of the fabricable crossing. Save this plot as well.

Spectrum of the hybrid MZI with the FDTD-characterized crossing
Step 15 · Compare

Ideal vs. physical, side by side

Because we saved each plot, the dashboard now shows both: the purely analytical MZI (left) and the hybrid MZI with the FDTD‑characterized crossing (right). The responses are nearly identical, the crossing adds only a fraction of a dB of loss and a slight fringe shift. Exactly the kind of check this workflow makes effortless.

Dashboard with analytic and hybrid MZI plots side by side
You built a hybrid circuit

What's next?

  • Sweep and tune: change coupling ratios, waveguide lengths, or component parameters and re‑run in seconds.
  • Go physical, gradually: replace more abstract components with PDK counterparts as your design matures.
  • Time domain: switch the Simulation mode to Time Domain and add time monitors from the same right‑click menu.
  • Scripted design: everything here maps to the Python API for parametric, automated workflows.