quantcore_circuits.layouts.metal.component

MetalComponent: any Quantum Metal qlibrary QComponent as a KQC element with ports.

The PCell has two parameters of its own: metal_class (qlibrary class name, e.g. TransmonPocket, or a dotted path to a user QComponent) and options (the Metal options as JSON). Building it instantiates the component in a shared headless Metal design (see geometry, cached per class + options) and renders, in µm:

  • base_metal_gap_wo_grid = union(subtract shapes) − union(metal shapes); paths are buffered by width / 2 with flat ends, path and polygon fillets are honoured; plus ground_grid_avoidance (the drawn shapes grown by margin), as other KQC elements do;

  • metal outside the component’s own pockets → base_metal_addition (metal wins over other gaps, as in Metal); for junction components (jj_manhattan, jj_dolan, SQUID_LOOP, SNAIL, BridgeFreeJunction) the metal goes to SIS_junction instead;

  • every junction-table line → its footprint (line × width) on SIS_junction, and refpoints port_squid_a (line start; the island side of Metal’s grounded qubits) / port_squid_b (line end) for the first junction (junction_<k>_a/b for all of them), which the simulation builder uses for the junction port;

  • trilayer junctions (design decisions #6 / #21): junction_type = "Quantcore Junction" / "Quantcore Squid" (or any trilayer cell of the Junction Library, e.g. "Trilayer Junction") replaces each junction line’s footprint by that cell (CLEARER on), its window spanning the gap the line crosses (the etched span along the line through its middle; window width ≤ 32 µm, 1 µm inside the gap’s lateral extent on each side), origin_squid on the port_squid_b side and port_common on the port_squid_a side; junction_params (JSON dict, e.g. {"lj_nH": 6.7}) is passed to the cell (sizing by the PDK junction rule). "Metal" (default) and "Sim" (what simulation builds set) keep Metal’s footprint; "No Squid" draws no junction (refpoints stay);

  • every Metal pin → a port named like the pin at the pin middle, facing the pin normal (outward), with the pin width/gap as the port’s CPW a/b (qcc_port_widths);

  • pin ends: some components’ own etch continues past a pin (TransmonCross claws: the claw etcher is the claw buffered by claw_gap, so it runs claw_gap beyond the pin over the full claw width). Metal’s GDS renderer draws every non-subtract shape on top of the etch, so there the route’s trace (which starts at the pin) fills it. A qcc route only etches its gaps, so the wrapper does what the renderer does: the etch beyond each pin within the pin width (the part touching the pin line, up to where it ends) is removed at every pin that ends one of the component’s conductors (not at LaunchpadWirebondDriven’s inward in pin). The pin then ends on metal, as every KQC port does: connect a route, or terminate it (metal:OpenToGround). open_pins (comma-separated pin names) keeps Metal’s etch at those pins, as Metal draws a pin with no route (an open end);

  • launch pads (LaunchpadWirebond, ...Driven, ...Coupled) → refpoints lumped_signal / lumped_ground across the pad’s side gap at the pad centre (the simulation builder’s 50 Ω port, as for BondPad).

The element’s a/b set Metal’s cpw_width/cpw_gap design variables.

In design.json and Designer.add use cell: "metal:<Class>" with the Metal options as flat params (nested dicts allowed). metal_cell() makes the per-class subclass whose qcc_params turns those options into the two PCell parameters; quantcore_circuits.assembly.plan calls it before creating the cell.

Attributes

Classes

MetalComponent

Any Quantum Metal qlibrary QComponent rendered as a KQC element (Metal pins → ports).

Functions

pin_end_strip(pin, length) → kqcircuits.pya_resolver.pya.DPolygon

The pin-width strip from the pin line length µm outward (along the pin normal).

Module Contents

class quantcore_circuits.layouts.metal.component.MetalComponent

Bases: kqcircuits.elements.element.Element

Any Quantum Metal qlibrary QComponent rendered as a KQC element (Metal pins → ports).

build()
classmethod create(layout, library=None, **parameters) → kqcircuits.pya_resolver.pya.Cell

Create the cell; accepts raw Metal options too (converted with qcc_params()).

display_text_impl()
classmethod qcc_geometry(params: dict)

The cached MetalGeometry for PCell parameters (or raw Metal options).

classmethod qcc_params(params: dict) → dict

Metal options as typed in design.json → the PCell parameters (metal_class, options JSON, plus any KQC element parameters such as margin). Raises ValueError for unknown or placement options.

Names shared by a Metal option and a KQC element parameter (n, r, a, b, margin, …):

  • design.json form (no options, or options as a dict): the Metal option wins (n of ResonatorCoilRect = turns);

  • PCell form (options already a JSON string, as in a plan, merged with the chip’s inherited element parameters such as n = 64 circle points): every schema parameter stays an element parameter and the Metal options come from options only, so an inherited n never overrides the Metal n.

classmethod qcc_port_widths(params: dict) → dict

Per-port CPW widths (a, b) = the Metal pin width/gap.

junction_params
junction_type
metal_class
open_pins
options
qcc_category = 'other'
qcc_metal_class: str | None = None
quantcore_circuits.layouts.metal.component.pin_end_strip(pin, length: float) → kqcircuits.pya_resolver.pya.DPolygon

The pin-width strip from the pin line length µm outward (along the pin normal).

quantcore_circuits.layouts.metal.component.FOOTPRINT_TYPES = ('Metal', 'Sim', '')
quantcore_circuits.layouts.metal.component.JUNCTION_CLASSES = ('jj_manhattan', 'jj_dolan', 'SQUID_LOOP', 'SNAIL', 'BridgeFreeJunction')
quantcore_circuits.layouts.metal.component.JUNCTION_TYPES = ('Metal', 'Quantcore Junction', 'Quantcore Squid', 'Trilayer Junction', 'Trilayer Squid', 'Sim',...
quantcore_circuits.layouts.metal.component.LUMPED_PORTS