quantcore_circuits.design.io¶
Load, save and hash designs.
Functions¶
|
Deterministic JSON: sorted keys, no whitespace, floats normalised so 1 == 1.0. |
|
sha256 over the canonical design JSON plus tool versions (the results-store key). |
|
|
|
Load a design from a |
|
|
|
Versions that change geometry or physics: quantcore-circuits, KQC, KLayout and the PDK. |
Module Contents¶
- quantcore_circuits.design.io.canonical_json(data: Any) str¶
Deterministic JSON: sorted keys, no whitespace, floats normalised so 1 == 1.0.
- quantcore_circuits.design.io.design_hash(design: quantcore_circuits.design.schema.Design, extra: dict | None = None, short: bool = True) str¶
sha256 over the canonical design JSON plus tool versions (the results-store key).
targetsare excluded: changing a target does not change geometry or simulation results.
- quantcore_circuits.design.io.group_hash(design: quantcore_circuits.design.schema.Design, group: str, short: bool = True) str¶
design_hash()of what one sim group’s jobs see: the design with only that group’s spec (the others are left out), so adding or changing another sim group (a new subset) does not make this group’s kept results look like another revision. Written tojob.jsonasgroup_hash(additive; older jobs only havedesign_hash).
- quantcore_circuits.design.io.load_design(source: str | pathlib.Path | dict | quantcore_circuits.design.schema.Design) quantcore_circuits.design.schema.Design¶
Load a design from a
.jsonfile, a.pyfile, a dict or aDesign.A
.pydesign file must definedesign(a dict orDesign) or a functiondesign()returning one.
- quantcore_circuits.design.io.save_design(design: quantcore_circuits.design.schema.Design, path: str | pathlib.Path) pathlib.Path¶
- quantcore_circuits.design.io.tool_versions(pdk_name: str | None = None) dict[str, str]¶
Versions that change geometry or physics: quantcore-circuits, KQC, KLayout and the PDK.