quchip.extensions¶
Installed reference implementations for the public extension surfaces.
- class quchip.extensions.CableLoss(line, loss_db)[source]¶
Bases:
SignalTransformAttenuate one control line by a power loss specified in dB.
- apply(signals)[source]¶
Return the transformed signal map.
- Parameters:
signals (dict[tuple[str, int], AnalyticSignal])
- Return type:
dict[tuple[str, int], AnalyticSignal]
- classmethod from_dict(data)[source]¶
Reconstruct from
to_dict()output.On the registry root, dispatch to the concrete subclass named by
data["type"](forwarding*args/**kwargs). On a concrete subclass, defer to_from_dict_payload(). Concrete subclasses that carry payload override this method directly.
- class quchip.extensions.ChargePhaseDrive(target=None, *, label=None)[source]¶
Bases:
DeviceDriveMap delivered I and Q to charge and phase observables.
- class quchip.extensions.CollectiveDecayCoupling(device_a, device_b, exchange_strength=unbound, *, decay_rate=unbound, label=None)[source]¶
Bases:
CouplingModelExchange coupling with an equal-phase collective decay channel.
- Parameters:
device_a (BaseDevice | str)
device_b (BaseDevice | str)
exchange_strength (Any)
decay_rate (Any)
label (Any)
- exchange_strength: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit='GHz', symbol='g', noise=False, kw_only=False, required=False)¶
- decay_rate: Any = Parameter(default=unbound, positive=False, nonnegative=True, serialize=True, unit='1/ns', symbol='\\gamma_c', noise=True, kw_only=True, required=False)¶
- interaction(a, b, p)[source]¶
Return the full two-body interaction expression.
- Parameters:
a (EndpointOps) – Operator namespaces for the two coupled endpoints. Same-endpoint operators compose with
@; cross-endpoint operators combine with*(tensor product).b (EndpointOps) – Operator namespaces for the two coupled endpoints. Same-endpoint operators compose with
@; cross-endpoint operators combine with*(tensor product).p (Any)
- Returns:
The interaction Hamiltonian expression, in ordinary-frequency units (GHz).
- Return type:
- class quchip.extensions.CosineEnvelope(duration=unbound, amplitude=1.0)[source]¶
Bases:
EnvelopeRaised-cosine pulse with zero endpoints and peak amplitude at mid-pulse.
\[E(t) = \frac{A}{2}\left[1-\cos(2\pi t/\tau)\right]\]- duration: Any = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='ns', symbol=None, noise=False, kw_only=False, required=False)¶
- class quchip.extensions.FrequencyModulatedMode(frequency=unbound, modulation_amplitude=unbound, modulation_frequency=unbound, modulation_phase=0.0, *, levels=10, label=None, T1=None, T2=None, thermal_population=None)[source]¶
Bases:
FockDeviceHarmonic mode with a prescribed sinusoidal frequency variation.
- approximation = 'Single harmonic mode in a fixed Fock basis with an externally prescribed sinusoidal frequency coefficient.'¶
Declared approximation-regime statement surfaced by
physics_notes()— the mechanism that keeps a model’s stated validity range attached to the class rather than buried in a docstring a caller may not read.
- frequency: Scalar = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='GHz', symbol='\\omega_0', noise=False, kw_only=False, required=False)¶
- modulation_amplitude: Scalar = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit='GHz', symbol='\\delta\\omega', noise=False, kw_only=False, required=False)¶
- modulation_frequency: Scalar = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='GHz', symbol='\\nu_m', noise=False, kw_only=False, required=False)¶
- modulation_phase: Scalar = Parameter(default=0.0, positive=False, nonnegative=False, serialize=True, unit='rad', symbol='\\phi_m', noise=False, kw_only=False, required=False)¶
- local_hamiltonian(op, p)[source]¶
Declare this device’s local Hamiltonian in its Fock space.
- Parameters:
- Return type:
- time_terms(op, p)[source]¶
Return local time-dependent Hamiltonian terms beyond the static model.
- Parameters:
- Return type:
- tunable_param_names = ('frequency', 'modulation_amplitude', 'modulation_frequency', 'modulation_phase')¶
Bare parameters this device exposes as differentiable / tunable scalars.
fit_a_dresswalks this tuple to discover what it is allowed to optimize on each device, decoupling the inverse-design surface from any specific device model. Three states, keyed on whether the value is explicitly declared:No explicit declaration anywhere in the
DeviceModellineage — the default is derived: every declaredparameter()field, in declaration order (seeDeviceModel.__init_subclass__).Explicit tuple on the class or an ancestor — exact curation, validated at class-definition time; authoritative and inherited until a subclass explicitly replaces it.
Explicit empty tuple — deliberately freezes the device (and its subclasses, until one replaces it) out of inverse design.
On a plain (non-
DeviceModel)BaseDevicesubclass there is no derivation; the default stays empty unless the subclass declares its own tuple — e.g.Fluxoniumuses("E_C", "E_J", "E_L", "phi_ext").
- class quchip.extensions.LossyChargeDrive(target=None, *, line_loss_rate=unbound, label=None)[source]¶
Bases:
ChargeDriveCharge-control line with an effective target-relaxation rate.
- line_loss_rate: Any = Parameter(default=unbound, positive=False, nonnegative=True, serialize=True, unit='1/ns', symbol=None, noise=True, kw_only=True, required=False)¶
- dissipation(device, op, p)[source]¶
Return target-local Lindblad channels contributed by this line.
- Parameters:
device (BaseDevice)
op (Any)
p (Any)
- Return type:
tuple[CollapseChannel, …]
- class quchip.extensions.LossyKerrCavity(freq=unbound, kerr=unbound, *, levels=30, label=None, T1=None, T2=None, thermal_population=None, two_photon_loss_rate=unbound)[source]¶
Bases:
KerrCavityKerr cavity with an intrinsic two-photon-loss channel.
- class quchip.extensions.ModulatedCapacitive(device_a, device_b, static_strength=unbound, modulation_amplitude=unbound, modulation_frequency=unbound, modulation_phase=0.0, *, label=None)[source]¶
Bases:
CouplingModelCapacitive interaction with a prescribed sinusoidal strength variation.
- Parameters:
device_a (BaseDevice | str)
device_b (BaseDevice | str)
static_strength (Any)
modulation_amplitude (Any)
modulation_frequency (Any)
modulation_phase (Any)
label (Any)
- static_strength: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit='GHz', symbol='g_0', noise=False, kw_only=False, required=False)¶
- modulation_amplitude: Any = Parameter(default=unbound, positive=False, nonnegative=False, serialize=True, unit='GHz', symbol='\\delta g', noise=False, kw_only=False, required=False)¶
- modulation_frequency: Any = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='GHz', symbol='\\nu_m', noise=False, kw_only=False, required=False)¶
- modulation_phase: Any = Parameter(default=0.0, positive=False, nonnegative=False, serialize=True, unit='rad', symbol='\\phi_m', noise=False, kw_only=False, required=False)¶
- interaction(a, b, p)[source]¶
Return the full two-body interaction expression.
- Parameters:
a (EndpointOps) – Operator namespaces for the two coupled endpoints. Same-endpoint operators compose with
@; cross-endpoint operators combine with*(tensor product).b (EndpointOps) – Operator namespaces for the two coupled endpoints. Same-endpoint operators compose with
@; cross-endpoint operators combine with*(tensor product).p (Any)
- Returns:
The interaction Hamiltonian expression, in ordinary-frequency units (GHz).
- Return type:
- time_terms(a, b, p)[source]¶
Return time-dependent interaction terms.
- Parameters:
a (EndpointOps) – Operator namespaces for the two coupled endpoints.
b (EndpointOps) – Operator namespaces for the two coupled endpoints.
p (Any)
- Returns:
Local operators and their scalar time coefficients. The empty tuple denotes a purely static coupling.
- Return type:
- class quchip.extensions.SpinHalf(freq=unbound, *, basis=None, levels=2, label=None, T1=None, T2=None, thermal_population=None)[source]¶
Bases:
DeviceModelTwo-level spin with a user-defined local operator vocabulary.
- computational = True¶
Whether this device represents a computational qubit, as opposed to e.g. a bus resonator or a coupler element.
- approximation = 'Exact two-level spin Hamiltonian in a fixed custom basis.'¶
Declared approximation-regime statement surfaced by
physics_notes()— the mechanism that keeps a model’s stated validity range attached to the class rather than buried in a docstring a caller may not read.
- freq: Scalar = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='GHz', symbol='\\omega', noise=False, kw_only=False, required=False)¶
- validate()[source]¶
Cross-field validation hook, run at the end of construction.
Default is a no-op. Subclasses override to enforce constraints that span multiple declared parameters (e.g.
2 * edge <= duration). Checks must be gated on concrete scalars viaquchip.utils.jax_utils.maybe_concrete_scalar()so traced parameters never force concretization.- Return type:
None
- local_hamiltonian(op, p)[source]¶
Return this device’s local Hamiltonian as a declarative expression.
- Parameters:
op (LocalOps) – Operator namespace for this device’s endpoint, exposing
a,adag,n,Iand the Pauli handles as composablePhysicsExprnodes.p (ParameterNamespace) – Symbolic leaves for the parameters declared on this model.
- Returns:
The local Hamiltonian expression, in ordinary-frequency units (GHz).
- Return type:
- tunable_param_names = ('freq',)¶
Bare parameters this device exposes as differentiable / tunable scalars.
fit_a_dresswalks this tuple to discover what it is allowed to optimize on each device, decoupling the inverse-design surface from any specific device model. Three states, keyed on whether the value is explicitly declared:No explicit declaration anywhere in the
DeviceModellineage — the default is derived: every declaredparameter()field, in declaration order (seeDeviceModel.__init_subclass__).Explicit tuple on the class or an ancestor — exact curation, validated at class-definition time; authoritative and inherited until a subclass explicitly replaces it.
Explicit empty tuple — deliberately freezes the device (and its subclasses, until one replaces it) out of inverse design.
On a plain (non-
DeviceModel)BaseDevicesubclass there is no derivation; the default stays empty unless the subclass declares its own tuple — e.g.Fluxoniumuses("E_C", "E_J", "E_L", "phi_ext").
Modules
Reference coupling models with time dependence and coupling-owned loss. |
|
Reference device models, including device-owned time dependence and loss. |
|
Reference drives with multi-observable coupling and drive-owned loss. |
|
Reference scheduled envelope authored through the declarative surface. |
|
Reference classical signal transform. |
|
Reference device authored on a custom local operator space. |