quantcore_circuits.layouts.registry¶
Resolve design.json cell references to Element classes and introspect their ports.
Attributes¶
Functions¶
|
Canonical reference string for a class (inverse of |
|
|
|
|
|
Ports of an already created element cell, with CPW widths. |
|
A light outline of an element in its local frame, for a placement preview (the KLayout plugin's ghost): |
|
Ports of an element in its local frame (builds the cell in |
|
The parameters a designer edits, for the KLayout panel: |
|
KQC |
|
Components usable as |
|
|
|
Resolve a cell reference. |
|
|
|
|
|
Centre lines of the four arms of KQC |
Module Contents¶
- quantcore_circuits.layouts.registry.cell_ref(cls: type[kqcircuits.elements.element.Element]) str¶
Canonical reference string for a class (inverse of
resolve_cell()).
- quantcore_circuits.layouts.registry.create_cell(layout: kqcircuits.pya_resolver.pya.Layout, cls: type[kqcircuits.elements.element.Element], what: str = '', **params) kqcircuits.pya_resolver.pya.Cell¶
cls.createthat raisesCellBuildErrorinstead of silently producing an error cell.
- quantcore_circuits.layouts.registry.default_params(cls: type[kqcircuits.elements.element.Element]) dict¶
- quantcore_circuits.layouts.registry.element_cell_ports(cls: type[kqcircuits.elements.element.Element], cell: kqcircuits.pya_resolver.pya.Cell, params: dict) dict[str, quantcore_circuits.layouts.ports.Port]¶
Ports of an already created element cell, with CPW widths.
a/bcome from the element parameters; a class may override them per port with a classmethodqcc_port_widths(params) -> {port_name: (a, b)}(e.g. the Xmon claw tails); KQC classes get theirs fromKQC_PORT_WIDTHS. KQC classes without port refpoints get theirs fromKQC_EXTRA_PORTS(a Quantcore class: its static methodqcc_extra_ports). A multi-face class records each port’s chip face with a classmethodqcc_port_faces(params) -> {port_name: face_id}.
- quantcore_circuits.layouts.registry.element_outline(cls: type[kqcircuits.elements.element.Element], max_points: int = 400, **params) dict¶
A light outline of an element in its local frame, for a placement preview (the KLayout plugin’s ghost):
{"bbox": [x0, y0, x1, y1], "outline": [[[x, y], ...], ...], "ports": [...]}in µm.The outline is the merged etched shape (the
base_metal_gaplayers; else every drawn layer), smoothed so the preview stays a few hundred points; a shape too fine to keep (junction fingers) is dropped, the bbox always stays.
- quantcore_circuits.layouts.registry.element_ports(cls: type[kqcircuits.elements.element.Element], layout: kqcircuits.pya_resolver.pya.Layout | None = None, **params) dict[str, quantcore_circuits.layouts.ports.Port]¶
Ports of an element in its local frame (builds the cell in
layoutor a scratch layout).
- quantcore_circuits.layouts.registry.element_schema(cls: type[kqcircuits.elements.element.Element]) list[dict]¶
The parameters a designer edits, for the KLayout panel:
[{"name", "default", "type", "description", "unit", "choices"}](JSON-safe defaults; internal / face / EPR parameters left out).
- quantcore_circuits.layouts.registry.flip_chip_rf_ports(refpoints: dict, p: dict) dict[str, quantcore_circuits.layouts.ports.Port]¶
KQC
FlipChipConnectorRfnames its CPW ends<face>_port(+_corner), notport_<name>:ais the end onface_ids[0](CPW a/b),bthe end onface_ids[1](CPW a2/b2, -1 = a/b), each facing out and recording its face.
- quantcore_circuits.layouts.registry.list_components(category: str | None = None, source: str | None = None, chips: bool = False) collections.abc.Mapping¶
Components usable as
cell(ref → class, resolved lazily), fromcatalog.catalog().Quantcore cells, KQC elements and Quantum Metal components (
metal:<Class>); whole chips only withchips=True(orcategory="chip").
- quantcore_circuits.layouts.registry.port_width_hook(cls: type[kqcircuits.elements.element.Element])¶
qcc_port_widthsof a class, or theKQC_PORT_WIDTHSentry of a KQC class, or None.
- quantcore_circuits.layouts.registry.resolve_cell(ref: str) type[kqcircuits.elements.element.Element]¶
Resolve a cell reference.
Accepts a dotted class path (
"kqcircuits.qubits.swissmon.Swissmon","quantcore_circuits.layouts.Xmon"), a bare class name of any quantcore_circuits/KQC PCell ("Xmon","Swissmon","FingerCapacitorSquare"), or"metal:<Class>"for a Quantum Metal qlibrary component ("metal:TransmonPocket").
- quantcore_circuits.layouts.registry.shape_params(cls: type[kqcircuits.elements.element.Element], params: dict) dict¶
paramswith JSON shapes converted for the class’sTypeShapeparameters (design.jsonstores shapes as point lists; KQC expectspya.DPath/DPolygon).
- quantcore_circuits.layouts.registry.trilayer_junction(cell_ref: str, lj_nH: float | None = None, squid: bool = False, pdk=None) tuple[dict, dict]¶
(params, junction)that make a qubit’s junction the Quantcore trilayer junction (design decisions #6 / #21).paramsare the instance parameters to merge:junction_type="Quantcore Junction"(squid:"Quantcore Squid") plus, whenlj_nHis given, the sizing for that L_J (SQUID: the parallel total) on the PDK junction rule —junction_params: {"lj_nH": ...}for cells that forward one (Xmon,metal:<Class>, the QPDK / SQDMetal qubits), KQC’sjunction_width(straight finger, µm; bent finger at the PDK 0.6 µm) for KQC qubits.junctionis the drawn junction’s{"Lj_nH", "Cj_fF"}for the instance’sjunction(LOM). Withoutlj_nHthe PDK nominal device is drawn: a 0.5 × 0.6 µm junction (45 kΩ) or a SQUID whose parallel R_n is 45 kΩ (two 0.25 × 0.6 µm junctions of 90 kΩ; the window is for the whole SQUID, 2026-11-13).>>> params, junction = trilayer_junction("Swissmon", lj_nH=12.0) >>> d.add("QB", "Swissmon", junction=junction, **params)
- quantcore_circuits.layouts.registry.x_coupler_arms(p: dict) dict[str, list[tuple[float, float]]]¶
Centre lines of the four arms of KQC
CapacitiveXCoupler(itsbuild): arm-end refpoint name →[end, (bend), capacitor centre]in µm. Each arm is a CPW (the element a/b) from its end through a FingerCapacitorSquare (at the last point) to the centre splitter at the origin. ‘+’: p11 S, p21 E, p31 N, p41 W; ‘x’: the corners (p11 lower left, counter-clockwise), with a straight lead along the longer side when the box is not square.
- quantcore_circuits.layouts.registry.KQC_EXTRA_PORTS¶
- quantcore_circuits.layouts.registry.KQC_PORT_WIDTHS¶