Routing waveguides

How to connect component pins into real waveguide paths in Qfactr. Routes are explicit S-bend and Manhattan geometry between real pins, drawn in true micrometers — not abstract nets.

Once parts are on the canvas, routing is how you connect them. In Qfactr a connection is not a logical net between symbols — it is an explicit waveguide route, drawn as real S-bend and Manhattan geometry between the physical pins of two components, in true micrometers. A route has a shape the moment you make it, and that shape determines how much light survives the trip.

This page covers the mechanics: how to make a connection in Connect mode, how the canvas tells you what is still open, and how to read and refine a route for loss. For the underlying physics — how a waveguide guides light and where optical power is lost — see Waveguides & routing. If you have not placed components yet, start with Placing components.

Pins and connection state

Every component you place carries pins — its physical optical ports, each with a real position and orientation on the canvas. Routing attaches to pins, so a waveguide always starts and ends at genuine geometry rather than a free-floating node.

The canvas shows connection state directly in color: a pin renders red when unconnected and green when connected. That gives you an at-a-glance map of what still needs routing — when every pin you care about has turned green, the circuit is wired. Because pins carry orientation, the route leaving a pin begins in the direction the port faces, which is part of why a clean placement makes for a short, gentle route.

Making a connection

Routing is a short loop: enter Connect mode, pick the two pins, and let the route draw as real geometry. The toolbar exposes the interaction modes — Select, Connect, and Delete — plus a Simulate action.

  1. Switch to Connect modeSelect Connect in the toolbar. In this mode, clicking pins defines waveguide routes rather than selecting or moving parts.
  2. Pick the source pinClick the pin you want to route from — for example PS2.out on a phase shifter. Routing always begins at a real, oriented port, so the path starts as true geometry.
  3. Pick the destination pinClick the pin you want to connect to — for example CMB.in2 on a combiner. Qfactr draws a real waveguide between the two: an S-bend where the ports are laterally offset, or Manhattan segments joined by rounded corners in denser regions.
  4. Watch the pins turn greenBoth pins switch from red to green once the route lands, confirming the connection is made. Repeat for every pair of ports that needs wiring.
  5. Refine in Select modeSwitch back to Select to move components and adjust spacing. Because the canvas is physical, nudging a part changes the real distance and bends the route has to take — shortening paths and easing turns directly reduces loss.
  6. Remove a route with Delete modeTo undo a connection, switch to Delete mode and select the route. Its pins return to red, marking those ports open again.

Reading a route for loss

Because a route is real geometry rather than an abstract net, its optical cost is built into the design and can be evaluated directly. Transmission and loss are derived from the actual path — its length, its bends, and the components it passes through — not estimated from a schematic. A long detour or a tight turn shows up as real lost power, not a footnote discovered later at the mask stage.

Running Simulate makes this visible. A power-flow gradient animates along the waveguides — teal → green → yellow → red as power drops along the path — and the status bar shows a loss readout for the current design. The gradient turns the principle that "geometry is loss" into something you can see on the route you just drew: where the color shifts toward red is where power is going. For how that estimate is computed and where its limits lie, see Simulation-aware design.

Routes inside hierarchy and on export

Routes are part of the editable design model, so they compose with everything else. Inside a hierarchical block, the internal routing is frozen with the block's layout and carried with it wherever the block is instanced, so a well-routed subcircuit stays efficient at every reuse. And because routes are real geometry, they carry through on export: a Nazca (Python) and GDS hand-off preserves the actual waveguide paths for a fabrication flow, rather than dropping back to connectivity that a downstream tool would have to re-route.

Next steps