qcc_kplugin.edits

Edit-menu actions that change design.json parts the drawing tools do not reach: rename a component, chip settings (label, die size), junction values (Lj, Cj) of a qubit, a lumped coupling between two components, and the PDK pad-edge fix. The pure edits are in design_ops (unit-tested); this module is the dialogs and menu functions.

An exception never escapes into KLayout: it goes to the status bar and the log (session.report_error).

Attributes

Functions

add_coupling() → None

Edit > Add coupling…: a lumped C (fF) or L (nH) between two components or a route and a component, for the LOM

chip_settings() → None

Design > Chip settings…: the label on the die, the die width and height, the KQC ground grid, and the

die_size_rows(dialog, form, width, height)

Die width / height rows and a "square" checkbox (on: the height follows the width and is greyed out), for New

fix_pad_edges() → None

Check and LOM > Fix pad edge warnings: place.edge = "auto" on every pad the PDK pad-edge rule flags (the

junction_values([name]) → None

Edit > Junction values (L_J or I_c or R_n, and C_J)…: the lumped junction of the selected qubit that the LOM,

rename_instance([name]) → None

Edit > Rename component…: the selected component (KLayout's selection, or under the Move/Snap cursor) gets a new

Module Contents

qcc_kplugin.edits.add_coupling() → None

Edit > Add coupling…: a lumped C (fF) or L (nH) between two components or a route and a component, for the LOM (the layout implies it but no route carries it, e.g. two facing qubit arms).

qcc_kplugin.edits.chip_settings() → None

Design > Chip settings…: the label on the die, the die width and height, the KQC ground grid, and the design’s substrate (thickness, εr, loss tangent).

qcc_kplugin.edits.die_size_rows(dialog, form, width: float, height: float)

Die width / height rows and a “square” checkbox (on: the height follows the width and is greyed out), for New design and Chip settings. Returns size() → (width, height) in µm; raises ValueError on a non-number.

qcc_kplugin.edits.fix_pad_edges() → None

Check and LOM > Fix pad edge warnings: place.edge = "auto" on every pad the PDK pad-edge rule flags (the build then puts its outer edge the PDK distance from the die edge, the position along the edge stays).

qcc_kplugin.edits.junction_values(name: str | None = None) → None

Edit > Junction values (L_J or I_c or R_n, and C_J)…: the lumped junction of the selected qubit that the LOM, the estimates and the simulations use (junction in design.json: L_J and C_J); empty fields remove it.

qcc_kplugin.edits.rename_instance(name: str | None = None) → None

Edit > Rename component…: the selected component (KLayout’s selection, or under the Move/Snap cursor) gets a new name; routes, snaps, targets, sim groups and couplings that name it follow.

qcc_kplugin.edits.SQUARE_TEXT = 'Square die (height = width)'