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.
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.
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.
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.
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%.
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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.