quantcore_circuits.assembly.netlist

Netlist check: connections declared in design.json vs. the geometric netlist KQC extracts from the layout.

Declared connections come from routes with two port ends (from ↔ to), from snap placements with gap == 0 (snap ↔ to) and from wire couplings. Route ends that are free or hangers are declared open (connected to nothing).

Extracted connections come from KQC export_cell_netlist: KLayout joins overlapping port texts into nets. Waveguides, meanders and other unnamed sub-elements inside routes are treated as wire, so following them from one named-instance pin to the next gives the galvanic connections between design ports.

check_netlist reports opens (declared, not found in the layout) and shorts (found, not declared) with the port coordinates in µm.

Classes

Functions

check_netlist(result) → NetlistReport

Compare result (a BuildResult) with its design (see module doc).

declared_connections(design[, skip]) → set[frozenset[str]]

Port groups that design says are galvanically connected (singletons = open ends). skip names routes

extract_netlist(cell) → dict

KQC export_cell_netlist of cell as a dict.

extracted_connections(netlist, instance_names[, ...]) → set[frozenset[str]]

Connected groups of named-instance ports in a KQC netlist (unnamed sub-circuits are wire).

Module Contents

class quantcore_circuits.assembly.netlist.NetlistIssue
kind: str
ports: tuple[str, ...]
where: list[tuple[float, float]]
class quantcore_circuits.assembly.netlist.NetlistReport
declared: set[frozenset[str]]
extracted: set[frozenset[str]]
issues: list[NetlistIssue] = []
property ok: bool
property opens: list[NetlistIssue]
property shorts: list[NetlistIssue]
quantcore_circuits.assembly.netlist.check_netlist(result) → NetlistReport

Compare result (a BuildResult) with its design (see module doc).

quantcore_circuits.assembly.netlist.declared_connections(design, skip=()) → set[frozenset[str]]

Port groups that design says are galvanically connected (singletons = open ends). skip names routes that were not built (failed): the check reports them once, as route_failed, not as opens.

quantcore_circuits.assembly.netlist.extract_netlist(cell) → dict

KQC export_cell_netlist of cell as a dict.

quantcore_circuits.assembly.netlist.extracted_connections(netlist: dict, instance_names: set[str], face_ports: dict[str, dict[str, str]] | None = None) → set[frozenset[str]]

Connected groups of named-instance ports in a KQC netlist (unnamed sub-circuits are wire).

face_ports ({instance: {face: port}}) names the unnamed pins of cells whose ports record their chip face (KQC FlipChipConnectorRf labels both CPW ends ""): such a pin is the port on the face of the route piece it meets (that piece’s face_ids[0]). Other unnamed pins are port.