quantcore_circuits.sim_tools.subset¶
Subset simulation: render and simulate only some qubits of a chip, keep the netlist whole.
The user names the qubits (and optionally their readout resonators) to simulate, e.g. pairs=[("Q3", "R3"), ("Q5",
"R5")]; plan_subset() turns that into ordinary sim groups (SimGroup)
that the builder, the exporters, AEDT and the read-back already understand. Designer.sim_subset wraps it.
What goes into a subset box, and why:
The chosen qubits and their readout chains. A readout chain is everything between the qubit and the feedline: the readout resonator route, then any series capacitor, Purcell filter, tee or airbridge connection on the way (walked through routes, instances and declared route–route couplings such as a readout–Purcell tap), up to the first feedline route.
The feedline is never selected; it is always in the box and cut by it. A feedline route is a hanger host, a route ending on a bond pad / launcher (a 50 Ω port line, e.g. tutorial 02’s readout line
L_Q2), or a route on a pad-to-pad backbone through tees (surface-17’sFL2_*). The box (selection bounding box + margin) cuts it, and the builder ends each cut in a 50 Ω port: an edge port (Q3D: its own net; driven: the S21 ports) or a lumped 50 Ω termination 1 µm inside the edge (eigenmode). A line that is not grounded is always terminated where the box cuts it, so the group needs noportsentry for it ("edge"is written only for a grounded feedline).Buses and couplers between chosen qubits come in (the bus route, its tees and stubs) when the bus reaches at least two chosen qubits; a stub of that bus towards a qubit outside the subset is cut. A declared coupling between two chosen qubits (facing arms) needs no geometry; it only puts both qubits in one box.
A bus to a qubit outside the subset is cut (
ports={"<bus>": "cut"}): the route is removed for every analysis. Q3D: the chosen qubit’s coupling pad keeps a 100 µm stub ending in a port, so the pad is its own net (<Q>.<port>) and its capacitances to the qubit and to ground are extracted. Eigenmode / driven: the pad is left open — it still loads the qubit through its coupling capacitance, the bus mode is gone and nothing radiates (a stub port inside a pocket has no port polygon, so AEDT would skip a termination there). The LOM keeps the bus. The cut end at a tee or another non-qubit component is left open.Disjoint pairs get one box each (
split="auto"): pairs that share a bus or a declared coupling stay in one box; others are separate groups<name>_<Q>…. AEDT solves them one at a time, so peak memory is the largest box, not the sum, and no box spans the chip between two distant qubits.split="one"forces one box.
Read-back: circuit.fill.fill(whole_chip_model, design, [job, …]) fills only the branches owned by the chosen
components (and their couplings to the feedline); every other branch keeps its estimate, marked as outside the
subset. See quantcore_circuits.circuit.fill.
Attributes¶
Classes¶
One box of a subset: the sim group spec and what it holds. |
Functions¶
|
Markdown: one row per box (what is rendered and simulated, what is cut). |
|
A qubit for the subset: its LOM model has a junction (JJ / SQUID). Wrapped Metal tees and couplers carry a |
|
The sim groups of a subset (module docstring). |
|
The readout resonator route of |
|
The components a job of |
Module Contents¶
- class quantcore_circuits.sim_tools.subset.SubsetGroup¶
One box of a subset: the sim group spec and what it holds.
- spec(margin_um: float, analyses, settings) dict¶
- buses: list[str] = []¶
- cut: list[str] = []¶
- feedlines: list[str] = []¶
- name: str¶
- notes: list[str] = []¶
- ports: dict[str, str]¶
- qubits: list[str]¶
- resonators: dict[str, list[str]]¶
- select: list[str]¶
- quantcore_circuits.sim_tools.subset.describe(groups: list[SubsetGroup]) str¶
Markdown: one row per box (what is rendered and simulated, what is cut).
- quantcore_circuits.sim_tools.subset.has_junction(design: quantcore_circuits.design.Design, inst: str) bool¶
A qubit for the subset: its LOM model has a junction (JJ / SQUID). Wrapped Metal tees and couplers carry a
junction_typeparameter and thecouplercategory, so neither tells a qubit from a tee. A junction cell on its own (KQCJunctionsubclasses, Quantcore trilayer cells, Metaljunctioncategory,is_junction_cell()) is not a qubit: it belongs in a qubit’s gap.
- quantcore_circuits.sim_tools.subset.plan_subset(design, name: str, pairs=None, qubits=None, split: str = 'auto', readouts: bool = True) list[SubsetGroup]¶
The sim groups of a subset (module docstring).
pairs:[("Q3", "R3"), ...](resonator None → the qubit’s readout,readout_of()); orqubits:["Q3", "Q5"](each with its readout).split:"auto"(pairs joined by a chosen bus or a declared coupling share a box, other pairs get one box each) or"one"(one box for everything).readouts=False: the qubits alone (an eigenmode box that fits a workstation, tutorial 01’sQ1_qrecipe): the readout chain is not selected, so the box (qubit + margin) cuts the readout line and the builder terminates it in 50 Ω (ports={readout: "edge"}for a grounded λ/4); the job gives the qubit mode (f_q, α, p_J) and the read-back fills the qubit’s own branches only.
- quantcore_circuits.sim_tools.subset.readout_of(design, qubit: str) str | None¶
The readout resonator route of
qubit: a route at one of its ports whose walk (through capacitors, tees, Purcell filters) reaches a feedline or a free / hanger end but no other qubit. None if there is none.
- quantcore_circuits.sim_tools.subset.subset_scope(design, group: str) set[str] | None¶
The components a job of
groupfills: its selected instances and routes (None for the whole chip).
- quantcore_circuits.sim_tools.subset.WHOLE = 'whole'¶