quantcore_circuits.route.waveguide

KQC WaveguideComposite with a bend radius per corner.

KQC’s WaveguideComposite bends every corner of a straight-waveguide stretch with one radius r; a node’s own r only takes effect on element nodes (tapers, airbridges, …) and then for the rest of the route. A route with per-corner radii (Waypoint.r) is built with WaveguideCompositeCorners instead: its plain nodes may carry corner_r (µm), the radius of the bend at that node only. Where two neighbouring corners differ, the stretch is split into separate WaveguideCoplanar pieces in the middle of the straight between them (between the two bend cuts), so each piece rounds its corners with its own radius. Routes without corner_r keep the stock KQC class, so existing designs build exactly as before.

Joins (joined_nodes()): where a route ends at a cell’s port, its gap strips and the cell’s etch meet along one line. Both are snapped to the 1 nm grid on their own, so at an angled port (a ConcentricTransmon coupler at 60°, a Metal tee at 45°) or a port half a grid step off (an Xmon claw at y = ….4625 µm) they can miss each other by less than 1 nm. The build then keeps the strip a separate polygon behind a zero-width metal crack, and the fab export’s corner rounding (per polygon) opens the crack into metal slivers (~0.5 µm² each). Such an end is drawn JOIN_SHIFT into the cell, so its strips overlap the cell’s etch; the route’s port refpoints stay on the cell’s port and the plan’s route length is unchanged (the drawn route is 10 nm longer). Ends that already merge are drawn as before.

Attributes

Classes

WaveguideCompositeCorners

WaveguideComposite whose plain nodes may set the bend radius of their own corner (node param

Functions

ensure_registered() → None

Register WaveguideCompositeCorners in KQC's element library (idempotent).

etch_near(cell, trans, layer, box) → kqcircuits.pya_resolver.pya.Region

cell's shapes on layer placed with trans, within box (parent dbu).

has_corner_radii(nodes) → bool

joined_nodes(route_cell, nodes, node_strings, origin, ...)

Nodes for a route whose ends meet a cell's etch across a hairline (see the module docstring), or None.

misses_etch(cell_etch, route_etch, direction, dbu) → bool

True if a piece of the route's etch neither overlaps nor touches the cell's etch (so the merge keeps it apart)

waveguide_class(nodes)

The cell class for a route with these KQC nodes: WaveguideCompositeCorners when a node sets its own

Module Contents

class quantcore_circuits.route.waveguide.WaveguideCompositeCorners

Bases: kqcircuits.elements.waveguide_composite.WaveguideComposite

WaveguideComposite whose plain nodes may set the bend radius of their own corner (node param corner_r).

quantcore_circuits.route.waveguide.ensure_registered() → None

Register WaveguideCompositeCorners in KQC’s element library (idempotent).

quantcore_circuits.route.waveguide.etch_near(cell: kqcircuits.pya_resolver.pya.Cell, trans: kqcircuits.pya_resolver.pya.ICplxTrans, layer: int, box: kqcircuits.pya_resolver.pya.Box) → kqcircuits.pya_resolver.pya.Region

cell’s shapes on layer placed with trans, within box (parent dbu).

quantcore_circuits.route.waveguide.has_corner_radii(nodes) → bool
quantcore_circuits.route.waveguide.joined_nodes(route_cell: kqcircuits.pya_resolver.pya.Cell, nodes: list, node_strings: list, origin: kqcircuits.pya_resolver.pya.DVector, joins: list, placed: dict, layer: int, half_width: float)

Nodes for a route whose ends meet a cell’s etch across a hairline (see the module docstring), or None.

route_cell is the route as built from nodes (relative to origin), node_strings the plan’s nodes, joins the plan’s [{"inst", "node": 0 | -1}], placed the chip’s instances by name, layer the etch layer and half_width the route’s a/2 + b (µm). Returns (nodes, shifts): fresh nodes (relative to origin) with those ends moved JOIN_SHIFT into the cell, and {"a" | "b": shift (µm)} per moved end.

quantcore_circuits.route.waveguide.misses_etch(cell_etch: kqcircuits.pya_resolver.pya.Region, route_etch: kqcircuits.pya_resolver.pya.Region, direction: kqcircuits.pya_resolver.pya.DVector, dbu: float) → bool

True if a piece of the route’s etch neither overlaps nor touches the cell’s etch (so the merge keeps it apart) although the cell is etched within JOIN_SHIFT behind it (direction points along the route): a hairline gap. A pin on solid metal, or a join that already merges, gives False.

quantcore_circuits.route.waveguide.waveguide_class(nodes)

The cell class for a route with these KQC nodes: WaveguideCompositeCorners when a node sets its own corner radius, else KQC’s WaveguideComposite.

quantcore_circuits.route.waveguide.CORNER_R = 'corner_r'
quantcore_circuits.route.waveguide.JOIN_SHIFT = 0.01