Designing a Photonics Circuit
Create a ring filter circuit by drawing the schematic, reviewing the layout, simulating the circuit, and iterating on your design.
This tutorial uses the photonics-full PDK, a public resource bundled with GDSFactory+. To take full advantage of this tutorial, create a new template project with the New GDSFactory+ Project button at the top of the GF+ sidebar, select photonics--full-public--pdk from the list, and customize the destination folder. Then, use 🚀 Create Project to get started!

The following video demonstrates building a two-ring circuit, routing its connections, and running a simulation in GDSFactory+.
Schematic: Add components and connect them
Start with an empty schematic.
Let's add two ring resonators and practice optical wiring in the Schematic Editor. Then, we'll adjust and route them in the Layout & Routing Editor.
-
We'll add the rings with the "Add component from library" button at the bottom. Select the component icon, make sure "gpdk" is selected on the left menu, type in "ring_single", then select
ring_single type:cktfrom the right menu. Then simply place the component twice.
-
Use the "Wire" tool on the top left to connect the two rings, or just hover over the exposed o2 port of the left ring and click to drag a wire to the o1 port of the right ring.

-
Now let's add ports to your circuit, so we can simulate inputs and outputs later. Select the "Add port" tool on the bottom interface, or press [p]. Then click on the input port. Use the [r] key to rotate the tool, then click on the output port. You should now see ports P1 and P2 on either end of your circuit.

Layout: Route optical waveguide connection
Now it's time to lay out your photonic circuit. Select "Open in layout editor" on the top right.

-
You should see your two ring resonators connected with a ghost wire.

-
You have two options for routing: either manually click and drag between the appropriate ports with the Route tool in the top left (exactly the same as with the Wire tool earlier!), or let GF+ auto-route by right clicking the ghost wire or selecting "Auto Route" in the top right.

To refine existing routes, open Router Settings… from the routing dropdown, turn on Enable optimizer, and apply the settings. Select the route and choose Route selected with profile to run the optimizer.
-
Now you can build your layout's GDS and view it with the built-in GDS viewer; just select the hammer icon on the top right of the Layout Editor and the GDS should pop up in a new window.

Congratulations! You've now designed and laid out your first photonic circuit with GDSFactory+!
Simulate the circuit
In order to make sure your circuit works as intended, let's run a simple wavelength sweep simulation on the two rings. Luckily, you've already placed your input and output ports; in your own designs, make sure to include ports wherever you need optical or electrical I/O.
-
In the right top bar of the Schematic or Layout Editor, click the button with the rocket
🚀icon. This should open the simulation window, with a few default values automatically provided.
You can select the Simulation tool from either the Schematic or Layout editor.
-
These defaults should be sufficient for our purposes; go ahead and press the
â–· Simulatebutton to see your results.
Optionally, try toggling "Layout" to "Schematic" on the top left of the
â–· Simulatebutton. In this particular case the layout and schematic are functionally identical (the path length between the rings doesn't introduce any additional physics effects) so they should look the same, but this may not hold true in more complicated circuits.
Understanding the simulation results
Under the hood, the default radius for the ring_single gpdk component is 10μm, so both rings are filtering the exact same wavelengths. Now, back in the Schematic Editor let's try explicitly setting the two rings' radii to different values, say to 10μm and 11μm. This should result in a different resonance pattern for our photonic circuit.
Click on the Schematic Editor window, then right click the ring components to change their radius values.

Be aware: when you change values in the schematic, your layout auto-updates to match. Now if you visit the Layout Editor, you'll see the rings are misaligned, since you've made one of them larger, and the route was expecting a perfectly horizontal Manhattan route between the two.

Now is a good time to practice adjusting your layout. GDSFactory+ Layout Editor features a handy snap-to-grid function that helps you align components based on their port locations horizontally and vertically. Try clicking and dragging the right ring until the blue lock icon snaps your mouse and the component exactly in line with the left component.

Now you have two rings with different radii, and thus they should filter slightly different wavelengths (and have different FSRs). Indeed, if you re-run the simulation now they have two different resonance patterns.

Conclusion
In this tutorial, you designed, laid out, simulated and iterated on a simple two-ring system, all far quicker than you could with legacy EDA tools. Continue to the next step to see how GDSFactory+ can also help with layout verification.
- Continue to Check for Design Errors - DRC
- Continue to Run Your First Circuit Simulation for a walkthrough of simulating and modifying this two-ring circuit.
Optional: For more design and simulation, continue to Advanced Workflow: Layout Aware Design with Grating Couplers
Appendix: Additional info about component loading
Note about lazy loading
Component GDS files are built when needed; in other words, they are lazy loaded. To manually build a component, select the hammer icon on the component listing, or select the hammer icon on the header to build all currently-visible components (this may take a while for large projects). You'll know it was successful when you see a green highlight to the left of the component listing, and ✓ OK to the right of the component's name.

Note about models
All shown components in the list have an associated .gds file that can be built, but the ✓ MODEL tag means that the component has both a layout and an ideal schematic-side simulation model associated with it.

Note that some hierarchical components may not show ✓ MODEL, but you might still be able to simulate them if their components with models are used in the hierarchy.