quantcore_circuits.assembly.builder¶
Build a design into a KQC chip cell and write it out.
Classes¶
Functions¶
|
Build |
|
Build, write and open in KLayout via klive (the Jupyter equivalent of |
|
Write the chip as static geometry (no PCell context), atomically so a live viewer never reads half a file. |
Module Contents¶
- class quantcore_circuits.assembly.builder.BuildResult¶
- require_complete(what: str = 'this') None¶
Raise when a route failed (a
keep_goingbuild):whatneeds every route.
- route_lengths() dict[str, float]¶
- cell: kqcircuits.pya_resolver.pya.Cell¶
- design: quantcore_circuits.design.Design¶
- property failed_routes: dict¶
Routes left out of this build (
build(keep_going=True)only):{name: FailedRoute}.
- property hash: str¶
- layout: kqcircuits.pya_resolver.pya.Layout¶
- property refpoints: dict[str, kqcircuits.pya_resolver.pya.DPoint]¶
Chip-level refpoints, e.g.
Q1_port_claw_n,FL_port_a(instance name prefixes).
- source: pathlib.Path | None = None¶
- top: kqcircuits.pya_resolver.pya.Cell¶
- quantcore_circuits.assembly.builder.build(source, layout: kqcircuits.pya_resolver.pya.Layout | None = None, keep_going: bool = False, last_good: dict | None = None, **chip_overrides) BuildResult¶
Build
source(path, dict orDesign) into aDesignChipcell.chip_overridesreplace chip parameters for this build only (e.g.with_grid=Falsefor simulation).keep_goingleaves a route that cannot be built out of the layout instead of raising (it is listed inresult.failed_routes, with itslast_goodgeometry when given); the default is strict.
- quantcore_circuits.assembly.builder.show(source, path: str | pathlib.Path | None = None, **chip_overrides) BuildResult¶
Build, write and open in KLayout via klive (the Jupyter equivalent of
qcc watch). KLayout is started (with the layout) when klive is not listening and raised to the front, unlessQCC_KLAYOUT_GUI=0.
- quantcore_circuits.assembly.builder.write_layout(result: BuildResult, path: str | pathlib.Path, layers=None, sidecar: bool = True) pathlib.Path¶
Write the chip as static geometry (no PCell context), atomically so a live viewer never reads half a file.
Also writes
<name>.qcc.json(ports, instances, routes) for the KLayout plugin unlesssidecar=False.