quchip.chip.coupling_base¶
Coupling base class and registry.
Classes
|
Abstract base for a two-body coupling between :class:`BaseDevice`s. |
- class quchip.chip.coupling_base.BaseCoupling(device_a, device_b, *, label=None)[source]¶
Bases:
StateVersioned,Registrable,ABCAbstract base for a two-body coupling between :class:`BaseDevice`s.
Subclasses own their local interaction Hamiltonian
H_intonH_a ⊗ H_b. The engine embeds this local form into the full chip tensor space, and couplings never use the engine directly.Subclasses register automatically through the shared
Registrablemixin, without a manual registration step. Import the module that defines the subclass so that the registration runs.- Parameters:
device_a (BaseDevice or str) – The two coupled devices. Label strings are late-bound: the coupling keeps the string, and
Chipresolves it to the matching device instance at construction time. Until then, the coupling cannot build an interaction Hamiltonian.device_b (BaseDevice or str) – The two coupled devices. Label strings are late-bound: the coupling keeps the string, and
Chipresolves it to the matching device instance at construction time. Until then, the coupling cannot build an interaction Hamiltonian.label (str, optional) – Human-readable label. If omitted, quchip derives it from
_type_prefix(e.g."cap_0"forCapacitive).
Notes
All coupling parameters (
g, any tunable envelope, and others) must be JAX-traceable, so sweeps and gradient-based optimization work without forced concretization.- default_fit_observable: ClassVar[str] = 'coupling_strength'¶
Observable represented by this coupling’s declared scalar when the enclosing chip is passed to
fit_a_dressas a dressed specification. Concrete coupling models override this when their inverse-design quantity is a dressed interaction observable.
- copy(device_map)[source]¶
Copy authored values and rebind endpoints.
- Parameters:
device_map (dict[str, BaseDevice]) – Destination devices keyed by label.
- set_parameter_value(name, value)[source]¶
Apply one local parameter value on an isolated coupling copy.
- Parameters:
name (str) – Local parameter name.
value (Any) – Replacement value in the parameter’s declared units.
- property coupling_strength_name: str¶
Display name of the scalar
coupling_strengthparameter.The default is
"g", the conventional coupling-strength symbol and the attribute name onCoupling.CouplingModeloverrides it with the name of its first declared parameter field. A subclass with a different primary-scalar convention overrides it directly.
- set_coupling_strength(value)[source]¶
Write the primary scalar named by
coupling_strength_name.Examples are
g,g_0, andchi. Override this method if the writable attribute has a different name.- Parameters:
value (Any) – Coupling strength in GHz.
- default_dressed_target()[source]¶
Return this edge’s component-owned inverse-design constraint.
The method reads the value directly from the declared coupling scalar and does not evaluate a chip-level observable.
- abstractmethod interaction_hamiltonian()[source]¶
Return the full
H_inton the localH_a ⊗ H_bsubspace.Couplings author one complete interaction, and the selected engine approximation determines which resolved bands are retained.
- dropped_terms()[source]¶
Return advisory records for terms that this coupling’s own model removes.
The assembly reports RWA band drops generically. This hook is for other approximations that a coupling applies in
interaction_hamiltonian(). By default, no terms are dropped.