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

BaseDrive([target, label])

Base class for classical control lines attached to one quantum target.

ChargeDrive([target, label])

Microwave charge drive on a transmon-like device.

CouplingDrive([target, label])

Drive authoring base for a two-endpoint coupling Hamiltonian.

DeviceDrive([target, label])

Drive base for a device-local Hamiltonian contribution.

FluxDrive([target, label])

Real-valued flux drive coupling to \(\hat n\).

ParametricDrive([target, label])

Control line pumping a modulable coupling's strength δ(t) in GHz.

PhaseDrive([target, label])

Microwave phase drive coupling to \(\hat a + \hat a^\dagger\).

class quchip.control.drive.BaseDrive(target=None, *, label=None, **params)[source]

Bases: Registrable

Base 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 example charge_0, flux_0). Subclasses are auto-registered for serialization through the shared Registrable mixin.

Parameters:
  • target (BaseDevice, BaseCoupling, str, or None) – Target accepted by the concrete drive. A DeviceDrive targets a device and a CouplingDrive a coupling. The target can be connected later or resolved by label through Chip.

  • 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
target: Any
label: Any
connect(target)[source]

Attach this device-drive implementation to target.

If the drive was attached before, it is detached from the old device. CouplingDrive overrides this handshake because couplings do not own connected-drive lists.

Parameters:

target (BaseDevice) – Device attached to this control line.

parameter_values()[source]

Return drive-owned bindable values declared by the subclass.

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 device_label: str | None

Label of the connected device, or None if unconnected.

property target_label: str | None

Label of this drive’s target, or None if unconnected.

Device-target drives alias device_label. ParametricDrive resolves its coupling target instead.

dissipation(target, op, p)[source]

Return target-local Lindblad channels contributed by this line.

Parameters:
signal(pulse, target)[source]

Build the complete scheduled analytic signal for one pulse.

Parameters:
  • pulse (object) – Scheduled pulse record.

  • target (object) – Connected drive target.

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; None leaves the copy unconnected.

to_dict()[source]

Serialize into a JSON-safe dictionary.

class quchip.control.drive.DeviceDrive(target=None, *, label=None)[source]

Bases: BaseDrive

Drive 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: BaseDrive

Drive 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.

property device_label: None

Return None because a coupling drive has no device target.

property target_label: str | None

Label of the connected coupling, if any.

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: DeviceDrive

Microwave 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:
physics_notes()[source]

Describe the charge operator and delivered I-quadrature convention.

class quchip.control.drive.PhaseDrive(target=None, *, label=None)[source]

Bases: DeviceDrive

Microwave phase drive coupling to \(\hat a + \hat a^\dagger\).

Same carrier machinery as ChargeDrive but 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:
physics_notes()[source]

Describe the phase operator and delivered I-quadrature convention.

class quchip.control.drive.FluxDrive(target=None, *, label=None)[source]

Bases: DeviceDrive

Real-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:
physics_notes()[source]

Describe the flux operator and delivered I-quadrature convention.

class quchip.control.drive.ParametricDrive(target=None, *, label=None)[source]

Bases: CouplingDrive

Control 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 amplitude A(t). With an explicit carrier, the pump is δ(t) = A(t)·cos(2π·freq·t - phase). If freq is 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 raises TypeError naming 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:
physics_notes()[source]

Describe the edge-pump convention recorded for this drive.