quantcore_circuits.layouts.others.spirals

Spiral lines ported from the QWri drawing library components/python/draw.py::spiral (kinetic-inductance / TWPA spiral inductors; request #7).

The legacy function draws a pya.Path of width w through npoints points of a spiral given by angle, φ = linspace(start_ang, end_ang, npoints):

  • archimedean (legacy type 0): r = spiral_r · φ;

  • fermat (type 1): r = √(spiral_r² · φ) = spiral_r · √φ;

  • double_fermat (type 2, “double Fermat in/out”): the Fermat arm and its point reflection (−x, −y) joined at the centre, so both ends lie outside — a two-terminal spiral inductor. The legacy code has a typo here (it computes y_bls and then uses an undefined y1s, so type 2 raises NameError); the port implements the evident intent (y1s = r sin φ), which the golden test checks against the legacy function with that one name fixed.

Coordinates are the legacy ones (same numpy and pya calls, so the geometry XORs clean), with spiral_r and width in µm (legacy: database units) and the angles in radians. The path is metal on base_metal_addition (metal, default) — place it on a pocket (e.g. metal:Rectangle with subtract: true, or pocket_margin) — or etched on base_metal_gap_wo_grid (metal=False, where the legacy chips draw 1/0).

Ports a (path start) and b (path end), facing outward along the path tangent (not Manhattan in general), a = width, b = the element b. pocket_margin > 0 etches a square pocket that far beyond the spiral’s bounding box; the ports stay at the path ends inside it. LOM: one conductor a → b, a line of the drawn centre-line length (SpiralLine.qcc_length()) with the mean turn spacing as its gap (SpiralLine.qcc_turn_gap(); quantcore_circuits.lom.quantcore_models).

Attributes

Classes

SpiralLine

Spiral line by angle (legacy draw.spiral): Archimedean, Fermat or double Fermat; ports a / b.

Functions

draw_spiral_points(dbu, start_angle, end_angle, ...) → list

Legacy draw.spiral centre line (spiral_r in µm, angles in rad), points in dbu (pya.Point).

Module Contents

class quantcore_circuits.layouts.others.spirals.SpiralLine

Bases: kqcircuits.elements.element.Element

Spiral line by angle (legacy draw.spiral): Archimedean, Fermat or double Fermat; ports a / b.

build()
classmethod qcc_length(params: dict) → float

Drawn centre-line length (µm).

classmethod qcc_points(params: dict, dbu: float = 0.001) → list
classmethod qcc_port_widths(params: dict) → dict

Ports: a = the line width, b = the element b (a route continues as a CPW of that gap).

classmethod qcc_turn_gap(params: dict) → float

Mean spacing between neighbouring turns (µm): radial span / turns − width (double Fermat: the two arms interleave, half that pitch).

end_angle
metal
pocket_margin
points
qcc_category = 'resonator'
spiral_r
spiral_type
start_angle
width
quantcore_circuits.layouts.others.spirals.draw_spiral_points(dbu, start_angle, end_angle, spiral_r, spiral_type, npoints) → list

Legacy draw.spiral centre line (spiral_r in µm, angles in rad), points in dbu (pya.Point).

quantcore_circuits.layouts.others.spirals.SPIRAL_TYPES