quchip.control.drive¶
Classical control lines and their quantum Hamiltonian couplings.
A drive builds the complete scheduled analytic signal, then maps its physical I/Q quadratures to target-local quantum operators. Control equipment can change that signal before the Hamiltonian mapping. Projection, frames, approximation, embedding, unit conversion, and backend lowering remain engine responsibilities.
Conventions:
Frequencies are in GHz. Times are in ns.
Operators are returned in the device’s authored local basis, and the engine embeds them into the full chip Hilbert space.
References
Krantz et al., A quantum engineer’s guide to superconducting qubits, APR 6, 021318 (2019) — microwave control of transmons (Sec. IV).
Koch et al., PRA 76, 042319 (2007) — charge vs flux noise and drives in the transmon regime.
Classes
|
Base class for classical control lines attached to one quantum target. |
|
Microwave charge drive on a transmon-like device. |
|
Drive authoring base for a two-endpoint coupling Hamiltonian. |
|
Drive base for a device-local Hamiltonian contribution. |
|
Real-valued flux drive coupling to \(\hat n\). |
|
Control line pumping a modulable coupling's strength δ(t) in GHz. |
|
Microwave phase drive coupling to \(\hat a + \hat a^\dagger\). |
- class quchip.control.drive.BaseDrive(target=None, *, label=None, **params)[source]¶
Bases:
RegistrableBase class for classical control lines attached to one quantum target.
Drives own their local Hamiltonian contribution. Without label, drives are auto-labelled from their
_type_prefix(for examplecharge_0,flux_0). Subclasses are auto-registered for serialization through the sharedRegistrablemixin.- Parameters:
target (BaseDevice, BaseCoupling, str, or None) – Target accepted by the concrete drive. A
DeviceDrivetargets a device and aCouplingDrivea coupling. The target can be connected later or resolved by label throughChip.label (str | None) – Optional explicit label; otherwise auto-generated.
**params (Any) – Numerical parameters declared by the concrete drive class.
Examples
>>> from quchip import DuffingTransmon, ChargeDrive >>> q = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3) >>> drive = ChargeDrive(target=q) >>> drive.device_label == q.label True
- connect(target)[source]¶
Attach this device-drive implementation to target.
If the drive was attached before, it is detached from the old device.
CouplingDriveoverrides this handshake because couplings do not own connected-drive lists.- Parameters:
target (BaseDevice) – Device attached to this control line.
- set_parameter_value(name, value)[source]¶
Apply one drive-owned value on an isolated drive copy.
- Parameters:
name (str) – Declared drive parameter name.
value (Any) – Replacement value in the parameter’s declared units.
- property target_label: str | None¶
Label of this drive’s target, or
Noneif unconnected.Device-target drives alias
device_label.ParametricDriveresolves its coupling target instead.
- dissipation(target, op, p)[source]¶
Return target-local Lindblad channels contributed by this line.
- Parameters:
target (BaseDevice) – Connected target device.
op (LocalOps) – Target-local authored operators.
p (ParameterNamespace) – Bound drive parameters.
- hamiltonian(target, signal)[source]¶
Map a delivered signal to target-local quantum physics.
- Parameters:
target (object) – Connected device or coupling.
signal (AnalyticSignal) – Complete delivered classical signal.
- physics_notes()[source]¶
Return human-readable declarations of this drive’s approximations.
Subclasses append their physical coupling details to the shared target line.
Chip.physics_notes()aggregates these notes.
- copy(*, target=None)[source]¶
Return a shallow copy, optionally rebound to a new target.
- Parameters:
target (BaseDevice or None, default=None) – Replacement target;
Noneleaves the copy unconnected.
- class quchip.control.drive.DeviceDrive(target=None, *, label=None)[source]¶
Bases:
BaseDriveDrive base for a device-local Hamiltonian contribution.
Subclasses must implement
hamiltonian()and accept a compatible device capability such as charge, phase, or flux coupling.- Parameters:
target (BaseDevice or str, optional) – Device object or label. Labels resolve when the drive is connected to a chip.
label (str, optional) – Drive label.
- class quchip.control.drive.CouplingDrive(target=None, *, label=None)[source]¶
Bases:
BaseDriveDrive authoring base for a two-endpoint coupling Hamiltonian.
Subclasses implement
hamiltonian()for the coupling physics they accept. The base class imposes no parametric-interaction requirement.- Parameters:
target (BaseCoupling or str, optional) – Coupling object or label.
label (str, optional) – Drive label.
- connect(target)[source]¶
Attach this line to a coupling without a device-side handshake.
- Parameters:
target (BaseCoupling) – Coupling attached to this control line.
- class quchip.control.drive.ChargeDrive(target=None, *, label=None)[source]¶
Bases:
DeviceDriveMicrowave charge drive on a transmon-like device.
Contributes the standard charge-coupling Hamiltonian
\[H_d(t) = \epsilon(t)\, \hat Q\]with \(\epsilon(t)\) the in-phase quadrature of the complete delivered classical signal. \(\hat Q\) is the device’s
charge_coupling_operator(), which capacitive couplings also use. It is \(i(\hat a - \hat a^\dagger)\) on a Fock device. This is the standard transmon microwave drive (Koch et al., PRA 76, 042319 (2007); Krantz et al., APR 6, 021318 (2019), Eq. 90).Examples
>>> from quchip import DuffingTransmon, ChargeDrive >>> q = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3) >>> drive = ChargeDrive(target=q) >>> drive.target_label == q.label True
- Parameters:
target (BaseDevice or str, optional) – Charge-coupled device or label.
label (str, optional) – Drive label.
- hamiltonian(device, signal)[source]¶
Return the charge-coupling Hamiltonian in the device-local basis.
- Parameters:
device (BaseDevice) – Connected charge-coupled device.
signal (AnalyticSignal) – Delivered classical signal.
- class quchip.control.drive.PhaseDrive(target=None, *, label=None)[source]¶
Bases:
DeviceDriveMicrowave phase drive coupling to \(\hat a + \hat a^\dagger\).
Same carrier machinery as
ChargeDrivebut with an in-phase (rather than quadrature) coupling. It is useful for modeling phase-noise channels or drives whose physical coupling is already referenced to the field quadrature. See Krantz et al. 2019, Sec. IV.A for the two conventions.- Parameters:
target (BaseDevice or str, optional) – Phase-coupled device or label.
label (str, optional) – Drive label.
- hamiltonian(device, signal)[source]¶
Return the phase-coupling Hamiltonian in the device-local basis.
- Parameters:
device (BaseDevice) – Connected phase-coupled device.
signal (AnalyticSignal) – Delivered classical signal.
- class quchip.control.drive.FluxDrive(target=None, *, label=None)[source]¶
Bases:
DeviceDriveReal-valued flux drive coupling to \(\hat n\).
The in-phase quadrature of the delivered signal modulates the device frequency through its flux-coupling operator (Koch et al. 2007, Sec. II; Krantz et al. 2019, Sec. V.A on flux tunability).
Examples
>>> from quchip import DuffingTransmon, FluxDrive >>> q = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3) >>> flux = FluxDrive(target=q) >>> flux.target_label == q.label True
- Parameters:
target (BaseDevice or str, optional) – Flux-coupled device or label.
label (str, optional) – Drive label.
- hamiltonian(device, signal)[source]¶
Return the flux-coupling Hamiltonian in the device-local basis.
- Parameters:
device (BaseDevice) – Connected flux-tunable device.
signal (AnalyticSignal) – Delivered baseband flux signal.
- class quchip.control.drive.ParametricDrive(target=None, *, label=None)[source]¶
Bases:
CouplingDriveControl line pumping a modulable coupling’s strength δ(t) in GHz.
Targets a coupling (object or label string). Labels late-bind through
Chip.connect(). The scheduled envelope is the real amplitudeA(t). With an explicit carrier, the pump isδ(t) = A(t)·cos(2π·freq·t - phase). Iffreqis omitted, the pump is carrier-free andδ(t) = A(t)directly. Approximation belongs to the chip’s selected engine strategy, not to the drive.Accepted couplings implement
parametric_interaction(). A static coupling raisesTypeErrornaming the hook.- Parameters:
target (BaseCoupling | str) – Modulable coupling to pump, given as the coupling object or its label. A string label late-binds to the coupling instance through
Chip.connect().label (str | None) – Optional explicit label; otherwise auto-generated from
"parametric".
- Raises:
TypeError – coupling does not implement
parametric_interaction()(a static coupling), or an unexpected keyword argument is passed.
- connect(coupling)[source]¶
Attach this line after confirming that the coupling is modulable.
- Parameters:
coupling (BaseCoupling) – Coupling that implements
parametric_interaction.
- hamiltonian(coupling, signal)[source]¶
Return the delivered pump times the coupling’s parametric term.
- Parameters:
coupling (BaseCoupling) – Connected modulable coupling.
signal (AnalyticSignal) – Delivered pump signal.