quchip.chip.partition¶
Exact subsystem partitioning into connected components of a chip’s independence graph.
Two device labels share a component when any structural object couples them. Such an object is a coupling edge, a non-separable bath whose target set contains both, classical drive crosstalk between their lines, or the captured maps of one effective contribution, which can mix the devices they act on. All decisions use only labels and object presence, never parameter values, which can be JAX tracers.
When observables are split across components, the user’s own indices pass through unchanged, and any injected factor is appended after them. A scalar local value colliding with one or more factors is re-indexed to 0, with each factor appended after it in encounter order.
The independence graph only recognizes line-mixing as Crosstalk entries. It
does not see a user-authored SignalTransform
that mixes drive lines in another way. Such mixing must be expressed as
Crosstalk so the affected devices land in one component.
Functions
|
Union-find components, each in |
|
Label pairs that must share one solve. |
|
Split a chip into independent sub-chips along its independence graph. |
|
Route drive ops to their owning component (edge targets through an endpoint). |
|
Group local observables and cross-component factors before assigning indices. |
|
Distribute a device-keyed state mapping over components. |
Classes
|
A cross-component correlator: its two local factors, multiplied at recombine time. |
|
Where one user e_ops key landed: component, component-dict key, optional list index. |
|
One independent block: its device labels (chip order) and its solve-ready sub-chip. |
|
Connected components of a chip's independence graph, as solve-ready sub-chips. |
- quchip.chip.partition.independence_edges(chip, resolved=None)[source]¶
Label pairs that must share one solve.
A clique over N labels is emitted as an (N-1)-edge star, giving identical connected components with fewer edges.
- quchip.chip.partition.connected_components(labels, edges)[source]¶
Union-find components, each in
labelsorder, ordered by first member.
- class quchip.chip.partition.PartitionComponent(labels, chip)[source]¶
Bases:
objectOne independent block: its device labels (chip order) and its solve-ready sub-chip.
- class quchip.chip.partition.PartitionResult(components, chip_order, notes=())[source]¶
Bases:
objectConnected components of a chip’s independence graph, as solve-ready sub-chips.
chip_orderis the parent chip’s original device-label order (itschip.devicesorder). It is not the concatenation of thecomponentslabels, which follows connected-component discovery order. The two can interleave differently when the chip’s device order does not already group each component’s members together. Anything that reconstructs a joint state from the per-component pieces (for examplePartitionedSimulationResult) must permute intochip_orderto match the joint solve.- components: tuple[PartitionComponent, ...]¶
- quchip.chip.partition.partition_chip(chip, *, resolved=None, extra_supports=(), clone_trivial=True)[source]¶
Split a chip into independent sub-chips along its independence graph.
Exact: the joint solve of the original chip factorizes as the tensor product of the component solves. Public results contain independent models even with one component.
- class quchip.chip.partition.LocalEop(component, key, index=None)[source]¶
Bases:
objectWhere one user e_ops key landed: component, component-dict key, optional list index.
- class quchip.chip.partition.CrossEop(a, b)[source]¶
Bases:
objectA cross-component correlator: its two local factors, multiplied at recombine time.
- quchip.chip.partition.split_drive_ops(part, chip, drive_ops)[source]¶
Route drive ops to their owning component (edge targets through an endpoint).