quantcore_circuits.layouts.ports

Ports as seen by quantcore_circuits: KQC refpoints port_<name> + optional port_<name>_corner.

A port has a position, an outward unit direction (corner - port; the direction a connecting waveguide comes from) and the CPW centre width a / gap b at that point. A port of a multi-face cell (a TSV or bump transition) also names its KQC chip face (face, e.g. "2b1"); None is the cell’s own face.

Exceptions

CellBuildError

A PCell's build() failed. KLayout swallows the exception and draws it on the error layer; this re-raises it.

Classes

Functions

cell_ports(cell[, a, b, rec_levels]) → dict[str, Port]

Ports of a cell in its own coordinates (only the cell's own refpoints by default).

check_cell(cell[, what]) → kqcircuits.pya_resolver.pya.Cell

Raise CellBuildError if cell (or any child) failed to build.

direction_vector(angle_deg) → kqcircuits.pya_resolver.pya.DVector

ports_from_refpoints(refpoints[, a, b]) → dict[str, Port]

Extract ports from a refpoint dict (as returned by get_refpoints(..., rec_levels=0)).

Module Contents

exception quantcore_circuits.layouts.ports.CellBuildError

Bases: RuntimeError

A PCell’s build() failed. KLayout swallows the exception and draws it on the error layer; this re-raises it.

class quantcore_circuits.layouts.ports.Port
as_dict() → dict
transformed(trans: kqcircuits.pya_resolver.pya.DCplxTrans) → Port
a: float | None = None
property angle: float | None
b: float | None = None
property corner: kqcircuits.pya_resolver.pya.DPoint | None
dir: kqcircuits.pya_resolver.pya.DVector | None
face: str | None = None
name: str
pos: kqcircuits.pya_resolver.pya.DPoint
quantcore_circuits.layouts.ports.cell_ports(cell: kqcircuits.pya_resolver.pya.Cell, a: float | None = None, b: float | None = None, rec_levels: int = 0) → dict[str, Port]

Ports of a cell in its own coordinates (only the cell’s own refpoints by default).

quantcore_circuits.layouts.ports.check_cell(cell: kqcircuits.pya_resolver.pya.Cell, what: str = '') → kqcircuits.pya_resolver.pya.Cell

Raise CellBuildError if cell (or any child) failed to build.

quantcore_circuits.layouts.ports.direction_vector(angle_deg: float) → kqcircuits.pya_resolver.pya.DVector
quantcore_circuits.layouts.ports.ports_from_refpoints(refpoints: dict, a: float | None = None, b: float | None = None) → dict[str, Port]

Extract ports from a refpoint dict (as returned by get_refpoints(..., rec_levels=0)).