quchip.control.equipment

Control-equipment container: drive lines and signal chain.

This container, not the individual drives, owns the signal transforms.

Classes

ControlEquipment(lines, *[, signal_chain])

Ordered drive lines plus a sequence of signal-chain transforms.

CrosstalkMatrix(labels, beta, theta, delay)

Dense crosstalk transform and matrix view in control-line order.

class quchip.control.equipment.CrosstalkMatrix(labels, beta, theta, delay)[source]

Bases: SignalTransform

Dense crosstalk transform and matrix view in control-line order.

Variables:
  • labels (tuple[str, ...]) – Drive labels in wiring order (the order in which drives appear in ControlEquipment.lines). Row / column i corresponds to labels[i].

  • beta (Any) – [n, n] amplitude matrix. beta[i, j] is the leakage amplitude from source labels[j] onto victim labels[i] (column = source, row = victim). Diagonal entries are self-coupling, 1.0 by convention.

  • theta (Any) – [n, n] phase matrix (radians), same indexing as beta.

  • delay (Any) – [n, n] delay matrix (ns), same indexing as beta.

Notes

Every off-diagonal edge reads the same input signal map, so reciprocal entries form one linear mixing stage and do not recursively leak each other’s output. Matrix entries keep end-to-end JAX traceability.

labels: tuple[str, ...] = Setting(default=unbound, serialize=True, kw_only=True)
beta: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit=None, symbol=None, noise=False, kw_only=False, required=True)
theta: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit=None, symbol=None, noise=False, kw_only=False, required=True)
delay: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit=None, symbol=None, noise=False, kw_only=False, required=True)
validate()[source]

Check that all crosstalk matrices match the declared line order.

apply(signals)[source]

Apply all directed leakage edges to one shared input snapshot.

Parameters:

signals (SignalMap) – Signals keyed by (line, source_index).

referenced_lines()[source]

Return drive labels referenced by this transform.

without_line(line)[source]

Return a copy with line removed, or None below two lines.

Parameters:

line (str) – Drive label to remove.

edges()[source]

Return the directed-edge view used by topology and visualization.

class quchip.control.equipment.ControlEquipment(lines, *, signal_chain=None)[source]

Bases: object

Ordered drive lines plus a sequence of signal-chain transforms.

The equipment pipes complete analytic signals through signal_chain before destination drives author Hamiltonian terms.

Parameters:
  • lines (list of BaseDrive) – Drive lines in wiring order.

  • signal_chain (list of SignalTransform, optional) – Sequential transforms applied after scheduling.

property lines: list[BaseDrive]

Ordered drive lines (defensive copy).

property signal_chain: list[SignalTransform]

Signal-chain transforms (defensive copy).

apply_signal_chain(signals)[source]

Apply every signal-chain transform to signals, in order.

Each transform receives the output of the previous one, so transforms compose sequentially and the order of signal_chain affects the result. For example, a Delay applied before a Gain sees the undelayed signal.

Parameters:

signals (SignalMap) – {(line_label, source_index): AnalyticSignal} map. source_index distinguishes scheduled pulses through mixing.

Returns:

Transformed signal map, which can contain keys absent from signals. For example, a Crosstalk transform adds an entry under the victim drive’s label for every source entry it leaks from.

Return type:

SignalMap

property crosstalks: list[Crosstalk]

Directed crosstalk edges represented by the signal chain.

crosstalk_matrix()[source]

Return a dense matrix view of the Crosstalk transforms.

The matrix uses wiring order (self.lines) as the stable axis ordering. Column index = source drive, row index = victim drive. Diagonal entries are beta=1, theta=0, delay=0 by convention (self-coupling). Off-diagonal entries aggregate every Crosstalk transform in the signal chain. Lines with no corresponding transform contribute zeros.

Non-Crosstalk transforms (Gain, Delay) are ignored here, because this is strictly a view of the crosstalk edges.

Returns:

labels (wiring order), beta, theta, delay as [n, n] arrays. Arrays use jax.numpy when any stored entry is a JAX tracer or array, otherwise numpy.

Return type:

CrosstalkMatrix

set_crosstalk_matrix(beta, theta=None, delay=None, *, labels=None)[source]

Rehydrate the crosstalk edges from dense matrices.

Removes every crosstalk transform currently in the signal chain and replaces them with one CrosstalkMatrix. Other signal-chain transforms (Gain, Delay, and user-defined subclasses) stay in their order.

Parameters:
  • beta (Any) – [n, n] amplitude matrix. beta[i, j] is emitted as the leakage amplitude from source labels[j] onto victim labels[i]. Diagonal entries are ignored (self-coupling belongs to the drive itself, not to a crosstalk edge).

  • theta (Any, optional) – [n, n] phase matrix (radians). Defaults to zeros.

  • delay (Any, optional) – [n, n] delay matrix (ns). Defaults to zeros.

  • labels (tuple[str, ...] | list[str] | None, optional) – Axis ordering. Defaults to wiring order (self.lines). Must match beta.shape[0].

Notes

Traced JAX entries flow unchanged into CrosstalkMatrix and therefore into the signal-program IR without concretization.

copy(device_map, coupling_map=None)[source]

Return a structural copy with drive lines rebound to target maps.

Parameters:
  • device_map (dict[str, object]) – Device labels to copied devices.

  • coupling_map (Coupling-target lines rebind via) – Coupling labels to copied couplings.

  • coupling_map

  • coupling (keyed by)

  • device_map. (label; device-target lines rebind via)

to_dict()[source]

Serialize into a JSON-safe dictionary.

classmethod from_dict(d, dev_map, coupling_map=None)[source]

Reconstruct from to_dict() output and target maps.

Parameters:
  • d (dict) – Serialized equipment dictionary.

  • dev_map (dict[str, object]) – Device labels to target objects.

  • coupling_map (dict[str, object], optional) – Coupling labels to target objects.

  • first (Each line's target_label is resolved against dev_map)

:param : :param then coupling_map — device and coupling labels are disjoint by: :param Chip construction: :param so at most one map holds the label.: