quchip.control.equipment¶
Control-equipment container: drive lines and signal chain.
This container, not the individual drives, owns the signal transforms.
Classes
|
Ordered drive lines plus a sequence of signal-chain transforms. |
|
Dense crosstalk transform and matrix view in control-line order. |
- class quchip.control.equipment.CrosstalkMatrix(labels, beta, theta, delay)[source]¶
Bases:
SignalTransformDense 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 / columnicorresponds tolabels[i].beta (Any) –
[n, n]amplitude matrix.beta[i, j]is the leakage amplitude from sourcelabels[j]onto victimlabels[i](column = source, row = victim). Diagonal entries are self-coupling,1.0by convention.theta (Any) –
[n, n]phase matrix (radians), same indexing asbeta.delay (Any) –
[n, n]delay matrix (ns), same indexing asbeta.
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.
- 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)¶
- apply(signals)[source]¶
Apply all directed leakage edges to one shared input snapshot.
- Parameters:
signals (SignalMap) – Signals keyed by
(line, source_index).
- class quchip.control.equipment.ControlEquipment(lines, *, signal_chain=None)[source]¶
Bases:
objectOrdered drive lines plus a sequence of signal-chain transforms.
The equipment pipes complete analytic signals through
signal_chainbefore destination drives author Hamiltonian terms.- Parameters:
signal_chain (list of SignalTransform, optional) – Sequential transforms applied after scheduling.
- 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_chainaffects the result. For example, aDelayapplied before aGainsees the undelayed signal.- Parameters:
signals (SignalMap) –
{(line_label, source_index): AnalyticSignal}map.source_indexdistinguishes scheduled pulses through mixing.- Returns:
Transformed signal map, which can contain keys absent from signals. For example, a
Crosstalktransform adds an entry under the victim drive’s label for every source entry it leaks from.- Return type:
SignalMap
- crosstalk_matrix()[source]¶
Return a dense matrix view of the
Crosstalktransforms.The matrix uses wiring order (
self.lines) as the stable axis ordering. Column index = source drive, row index = victim drive. Diagonal entries arebeta=1,theta=0,delay=0by convention (self-coupling). Off-diagonal entries aggregate everyCrosstalktransform in the signal chain. Lines with no corresponding transform contribute zeros.Non-
Crosstalktransforms (Gain,Delay) are ignored here, because this is strictly a view of the crosstalk edges.- Returns:
labels(wiring order),beta,theta,delayas[n, n]arrays. Arrays usejax.numpywhen any stored entry is a JAX tracer or array, otherwisenumpy.- Return type:
- 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 sourcelabels[j]onto victimlabels[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 matchbeta.shape[0].
Notes
Traced JAX entries flow unchanged into
CrosstalkMatrixand 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.