quantcore_circuits.route.waveguide ================================== .. py:module:: quantcore_circuits.route.waveguide .. autoapi-nested-parse:: 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 :class:`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 (:func:`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 :data:`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 ---------- .. autoapisummary:: quantcore_circuits.route.waveguide.CORNER_R quantcore_circuits.route.waveguide.JOIN_SHIFT Classes ------- .. autoapisummary:: quantcore_circuits.route.waveguide.WaveguideCompositeCorners Functions --------- .. autoapisummary:: quantcore_circuits.route.waveguide.ensure_registered quantcore_circuits.route.waveguide.etch_near quantcore_circuits.route.waveguide.has_corner_radii quantcore_circuits.route.waveguide.joined_nodes quantcore_circuits.route.waveguide.misses_etch quantcore_circuits.route.waveguide.waveguide_class Module Contents --------------- .. py:class:: WaveguideCompositeCorners Bases: :py:obj:`kqcircuits.elements.waveguide_composite.WaveguideComposite` ``WaveguideComposite`` whose plain nodes may set the bend radius of their own corner (node param ``corner_r``). .. py:function:: ensure_registered() -> None Register :class:`WaveguideCompositeCorners` in KQC's element library (idempotent). .. py:function:: 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). .. py:function:: has_corner_radii(nodes) -> bool .. py:function:: 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 :data:`JOIN_SHIFT` into the cell, and ``{"a" | "b": shift (µm)}`` per moved end. .. py:function:: 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 :data:`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. .. py:function:: waveguide_class(nodes) The cell class for a route with these KQC nodes: :class:`WaveguideCompositeCorners` when a node sets its own corner radius, else KQC's ``WaveguideComposite``. .. py:data:: CORNER_R :value: 'corner_r' .. py:data:: JOIN_SHIFT :value: 0.01