quchip.devices.fock

Convenience base for devices authored in a truncated Fock space.

Classes

FockDevice(*[, levels, label])

Device with explicit conventional oscillator coupling operators.

class quchip.devices.fock.FockDevice(*, levels=2, label=None, **params)[source]

Bases: DeviceModel

Device with explicit conventional oscillator coupling operators.

Subclasses still own their Hamiltonian and approximation. This base only declares the standard Fock-space operators used by charge, phase, and frequency-modulating drives.

Parameters:
  • levels (int)

  • label (str | None)

  • params (Any)

abstractmethod local_hamiltonian(op, p)[source]

Declare this device’s local Hamiltonian in its Fock space.

Parameters:
Return type:

PhysicsExpr

charge_coupling_operator()[source]

Return the conventional charge quadrature i(a - a†).

Return type:

PhysicsExpr

phase_coupling_operator()[source]

Return the conventional phase quadrature a + a†.

Return type:

PhysicsExpr

flux_coupling_operator()[source]

Return the number operator used for frequency modulation.

Return type:

PhysicsExpr

tunable_param_names = ()

Bare parameters this device exposes as differentiable / tunable scalars. fit_a_dress walks 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 DeviceModel lineage — the default is derived: every declared parameter() field, in declaration order (see DeviceModel.__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) BaseDevice subclass there is no derivation; the default stays empty unless the subclass declares its own tuple — e.g. Fluxonium uses ("E_C", "E_J", "E_L", "phi_ext").