quantcore_circuits.lom.fragment

LOM fragments: the lumped model of one layout component, and how its layout ports attach to it.

A component’s LOM model is a Fragment built from the instance (cell parameters, junction values, PDK):

  • nodes — local node name → {"island": FEM net label} (e.g. "island" → "Q1.island"). Local names island / island1 / island2 are qubit islands (a floating transmon has two), pad a 50 Ω port conductor; anything else is a coupler / line conductor,

  • elements — lumped branches between local nodes or "gnd" with an estimated value (see estimates and calibration), and the fem source that can replace the estimate ("cmatrix"),

  • port_nodes — layout port → local node; "gnd" for galvanically grounded ports; "control:<kind>" for ports that carry a control line (flux bias, drive) rather than a circuit connection,

  • lines — distributed CPW sections inside the component (a resonator, a meander, a plain waveguide). The builder decides what a line is once it knows what its ends connect to (wire, λ/4 or λ/2 resonator), and it adds the length of routes that continue the line (see Line).

  • hangers — coupled-line sections of a line to a conductor outside the component that no port carries (a legacy resonator whose coupler runs next to a separate feedline cell). A design coupling without a value between the instance (or its line node) and that conductor (d.couple("K_R1", "R1", "FL")) becomes the HANGER element; each entry is {"line": <line name>, "coupling_length_um", "ground_gap_um", "end": "short"|"open"} (the line end the section is at), optionally "source".

  • straps — local nodes that are ground straps when no port on them is joined (route, wire coupling or snap): an airbridge over a waveguide lands on the ground plane on both sides, so its ports map to gnd (no element).

Cells declare their model with a qcc_lom(name, instance, pdk) -> Fragment classmethod, or are registered with register_lom() (KQC cells: kqc_models; Quantum Metal wrapper cells "metal:<Class>": metal_models; ported legacy cells: quantcore_models). Cells without a model get one bare node per port (and a note).

Attributes

Classes

EffectiveJunction

A component's junction as the LOM and every simulation take it (lumped, fixed at design time).

Element

Fragment

Line

A CPW section inside a component, on local node node (one conductor: both ends are that node).

Functions

cell_params(inst) → dict

Cell parameter defaults merged with the instance's parameters (KQC / Quantcore cells), with the junction the

drawn_junction(params[, process]) → tuple[float, float, str] | None

(L_J nH, C_J fF, source) of the trilayer junction a qubit draws — its junction_type is a trilayer cell

effective_junction(inst[, params, pdk, kind]) → EffectiveJunction

The junction values of an instance: the design's junction (L_J0, C_J, Φ, d; first entry of a list), else

generic_fragment(name, inst, ports) → Fragment

No LOM model: every layout port becomes its own bare node (connectivity is kept, values are not).

instance_junction(name, inst[, pdk]) → EffectiveJunction | None

The junction of a placed component as its LOM model gives it (its JJ / SQUID element: the export uses

junction_element(name, a, b, inst[, kind, note, ...]) → Element

The J_<name> element of a qubit between nodes a and b (effective_junction(): the design's

junction_from_element(el) → EffectiveJunction

The EffectiveJunction of a model's JJ / SQUID element (Lj_nH is L_J0; an amplifier that

junction_kind(junction_type) → str | None

"SQUID", "JJ" or None (no junction) from a KQC/Quantcore junction_type name.

junction_value(ej) → dict

A JJ / SQUID element value: Lj_nH (L_J0), Cj_fF, source and, for a SQUID, asym and

junction_values(inst) → tuple[float | None, float]

(Lj nH or None, Cj fF) of an instance (first entry when the design gives a list per junction).

lom_model(cell_ref) → LomFn | None

The LOM model of a cell reference, or None (static cells, unknown cells, cells without a model).

metal_class(cell_ref) → str | None

Metal class name of a wrapper cell reference ("metal:TransmonPocket" → "TransmonPocket").

missing_junction_message(name, inst[, ej]) → str

Why name has no junction L_J and where to set it (KLayout component dialog or design.json).

port_resistor(name[, node, r_ohm, note]) → Element

register_lom(cell_name)

Decorator: @register_lom("Swissmon") def swissmon_lom(name, inst, pdk) -> Fragment.

registered() → dict[str, LomFn]

All registered LOM models (cell / metal: class name → model function).

squid_l_eff(lj0_nH[, flux_phi0, asym]) → float

L of a DC SQUID (no loop inductance) at flux Φ/Φ0 with asymmetry d:

Module Contents

class quantcore_circuits.lom.fragment.EffectiveJunction

A component’s junction as the LOM and every simulation take it (lumped, fixed at design time).

lj0_nH: L_J at zero flux (a SQUID: both junctions in parallel); lj_eff_nH: at flux_phi0 with asymmetry asym (a single JJ: lj0_nH); None when nothing gives a value. kind: "JJ", "SQUID" or None (no junction). source: "design", "drawn <type> (PDK junction rule)", a model’s own fallback (e.g. a Metal option), or None.

as_dict() → dict

Plain JSON (the build sidecar’s instances.<name>.junction).

describe() → str

junction L 6.734 nH, C 15 fF (drawn Quantcore Squid, PDK junction rule; Φ = 0, d = 0).

asym: float = 0.0
cj_fF: float = 0.0
flux_phi0: float = 0.0
kind: str | None = 'JJ'
lj0_nH: float | None
property lj_eff_nH: float | None
source: str | None = None
class quantcore_circuits.lom.fragment.Element
knob: dict | None = None
name: str
nodes: tuple[str, str]
note: str = ''
type: str
value: dict
class quantcore_circuits.lom.fragment.Fragment
elements: list[Element] = []
hangers: list[dict] = []
knobs: dict[str, tuple[float, float]]
lines: list[Line] = []
nodes: dict[str, dict]
notes: list[str] = []
port_nodes: dict[str, str]
straps: list[str] = []
class quantcore_circuits.lom.fragment.Line

A CPW section inside a component, on local node node (one conductor: both ends are that node).

ports are the layout ports at its two ends (None for an end inside the component, e.g. the coupling capacitor of a KQC QuarterWaveCpwResonator). term is what each end is when nothing connects to it: "short" (KQC waveguides with term = 0 end in the ground plane), "open" (a termination gap or a coupling capacitor). resonator=True makes it a resonator whatever its ends connect to (a meander between two couplers is a λ/2 bus); otherwise a line between two connected conductors is a wire and only a line with a free end is a (stub) resonator. couplings are coupled-line sections to other local nodes (a hanger: {"node": "pl", "coupling_length_um": 500, "ground_gap_um": 10}).

Lines joined end to end (a route between two line ports, a wire coupling or snap between them, a termination on a line end) are one line for the builder. through=True marks a pass-through section (a taper, an airbridge crossing): it only extends whatever line it joins, which is named after its main line or route, not after it (length_um 0: the builder takes the distance between its two ports).

a_um: float
b_um: float
couplings: list[dict] = []
knob: str | None = None
length_um: float
name: str
node: str
ports: tuple[str | None, str | None]
resonator: bool = False
term: tuple[str, str] = ('short', 'short')
through: bool = False
quantcore_circuits.lom.fragment.cell_params(inst) → dict

Cell parameter defaults merged with the instance’s parameters (KQC / Quantcore cells), with the junction the build draws: an unset KQC default junction_type ("Manhattan", …) is the PDK trilayer junction (assembly.plan.pdk_junction_type), so the LOM and the simulations take the drawn junction’s PDK value.

quantcore_circuits.lom.fragment.drawn_junction(params: dict, process=None) → tuple[float, float, str] | None

(L_J nH, C_J fF, source) of the trilayer junction a qubit draws — its junction_type is a trilayer cell ("Quantcore Junction", "Trilayer Squid", …), sized by junction_params (Xmon, metal:) or KQC junction_width — on the PDK junction rule (process: a junction process; None the default); None for other junction types.

quantcore_circuits.lom.fragment.effective_junction(inst, params: dict | None = None, pdk=None, kind: str | None = None) → EffectiveJunction

The junction values of an instance: the design’s junction (L_J0, C_J, Φ, d; first entry of a list), else the drawn trilayer junction on the PDK junction rule (drawn_junction() of params), else no L.

params: the cell parameters the drawn junction is read from (junction_type, junction_params, junction_width); None: the cell defaults merged with the instance’s. kind: "JJ" / "SQUID" / None as the model knows it; None derives it from junction_type. pdk: a junction process for the drawn values (None: the default Quantcore process, which the layout cells draw with). Φ and d are design values whatever gives L_J (they are simulation values, not fab values).

quantcore_circuits.lom.fragment.generic_fragment(name: str, inst, ports: list[str]) → Fragment

No LOM model: every layout port becomes its own bare node (connectivity is kept, values are not).

quantcore_circuits.lom.fragment.instance_junction(name: str, inst, pdk=None) → EffectiveJunction | None

The junction of a placed component as its LOM model gives it (its JJ / SQUID element: the export uses the same L_J0, C_J, Φ, d as the LOM). None: the component has no junction (its model has no such element, or a cell without a model is a Metal wrapper or has no junction_type); another cell without a model and with a junction_type gets effective_junction().

quantcore_circuits.lom.fragment.junction_element(name: str, a: str, b: str, inst, kind: str = 'JJ', note: str = '', drawn_params: dict | None = None) → Element

The J_<name> element of a qubit between nodes a and b (effective_junction(): the design’s junction, else the drawn trilayer junction of drawn_params — None: the cell’s merged parameters).

quantcore_circuits.lom.fragment.junction_from_element(el: Element) → EffectiveJunction

The EffectiveJunction of a model’s JJ / SQUID element (Lj_nH is L_J0; an amplifier that applies its own static bias keeps L_J0 in Lj0_nH and the bias in bias_phi0).

quantcore_circuits.lom.fragment.junction_kind(junction_type: str) → str | None

"SQUID", "JJ" or None (no junction) from a KQC/Quantcore junction_type name.

quantcore_circuits.lom.fragment.junction_value(ej: EffectiveJunction) → dict

A JJ / SQUID element value: Lj_nH (L_J0), Cj_fF, source and, for a SQUID, asym and flux_phi0 (the LOM applies them when it fills the circuit: squid_l_eff()).

quantcore_circuits.lom.fragment.junction_values(inst) → tuple[float | None, float]

(Lj nH or None, Cj fF) of an instance (first entry when the design gives a list per junction).

quantcore_circuits.lom.fragment.lom_model(cell_ref: str) → LomFn | None

The LOM model of a cell reference, or None (static cells, unknown cells, cells without a model).

quantcore_circuits.lom.fragment.metal_class(cell_ref: str) → str | None

Metal class name of a wrapper cell reference ("metal:TransmonPocket" → "TransmonPocket").

quantcore_circuits.lom.fragment.missing_junction_message(name: str, inst, ej: EffectiveJunction | None = None) → str

Why name has no junction L_J and where to set it (KLayout component dialog or design.json).

quantcore_circuits.lom.fragment.port_resistor(name: str, node: str = 'pad', r_ohm: float = 50.0, note: str = '') → Element
quantcore_circuits.lom.fragment.register_lom(cell_name: str)

Decorator: @register_lom("Swissmon") def swissmon_lom(name, inst, pdk) -> Fragment.

KQC/Quantcore cells are registered by class name (subclasses inherit the model); Quantum Metal wrapper cells by "metal:<MetalClass>".

quantcore_circuits.lom.fragment.registered() → dict[str, LomFn]

All registered LOM models (cell / metal: class name → model function).

quantcore_circuits.lom.fragment.squid_l_eff(lj0_nH: float, flux_phi0: float = 0.0, asym: float = 0.0) → float

L of a DC SQUID (no loop inductance) at flux Φ/Φ0 with asymmetry d: L_J0 / (|cos πΦ| √(1 + d² tan² πΦ)) = L_J0 / √(cos² πΦ + d² sin² πΦ). Raises at Φ = ½ with d = 0 (no finite L).

quantcore_circuits.lom.fragment.LomFn
quantcore_circuits.lom.fragment.METAL_PREFIX = 'metal:'
quantcore_circuits.lom.fragment.QUBIT_NODES = ('island', 'island1', 'island2')