quchip.interop.eigenbasis

A frozen energy-basis device for third-party models without a native quchip model.

Classes

EigenbasisDevice(energies, *[, ...])

Represent a frozen source spectrum and its energy-basis operators.

class quchip.interop.eigenbasis.EigenbasisDevice(energies, *, charge_operator=None, phase_operator=None, levels=None, label=None, source_type=None, collapse_model='fermi_golden', coupling_channel=None, collapse_rate_threshold=1e-08, **noise)[source]

Bases: BaseDevice

Represent a frozen source spectrum and its energy-basis operators.

You cannot differentiate through this snapshot with respect to the source circuit parameters.

Parameters:
  • energies (array_like, shape (n,)) – Energy-ordered levels in GHz, with n >= 2. The device subtracts the first energy from every level.

  • charge_operator (array_like, shape (n, n), or None) – Operators in the same source eigenbasis. None makes that drive channel unavailable. Capacitive couplings also use charge_operator, so they require it. The supplied matrix elements keep the source’s conventions.

  • phase_operator (array_like, shape (n, n), or None) – Operators in the same source eigenbasis. None makes that drive channel unavailable. Capacitive couplings also use charge_operator, so they require it. The supplied matrix elements keep the source’s conventions.

  • levels (int or None, default None) – Number of kept energy levels. None keeps all supplied levels.

  • label (str or None, default None) – Device label. Defaults to a generated eigenbasis_<index>.

  • source_type (str or None, default None) – Provenance label, such as "scqubits.ZeroPi".

  • collapse_model ({"fermi_golden", "ladder"}, default "fermi_golden") – Relaxation from transition matrix elements or from an ideal ladder operator.

  • coupling_channel ({"charge", "flux"} or None, default None) – Operator for matrix-element relaxation. "flux" uses phase_operator. Required when T1 is set with "fermi_golden".

  • collapse_rate_threshold (float, default 1e-8) – Nonnegative cutoff on normalized downward-transition strengths.

  • **noise (scalar or None) – T1 and T2 in ns, and dimensionless thermal_occupation. None omits the related channel. See BaseDevice for the noise constraints.

References

Blais et al., Rev. Mod. Phys. 93, 025005 (2021), https://doi.org/10.1103/RevModPhys.93.025005, for energy-basis operators and coupling to dissipative environments.

tunable_param_names: ClassVar[tuple[str, ...]] = ()

Parameters eligible for inverse design. DeviceModel derives these from declared fields unless the class or an ancestor supplies a tuple. Explicit tuples remain authoritative when inherited; an empty tuple excludes the device from inverse design. Plain BaseDevice subclasses default to an empty tuple without derivation.

dissipation(op, p)[source]

Return the relaxation and dephasing channels for the stored spectrum.

Parameters:
  • op (LocalOps) – Local operator namespace, unused because the stored matrices define the basis.

  • p (parameter namespace) – Bound noise parameters for this calculation.

Returns:

Channels that collapse_model and the active noise parameters select.

Return type:

tuple of CollapseChannel

See also

EigenbasisDevice

Dissipation choices and physics reference.

unresolved_hamiltonian()[source]

Return the frozen source spectrum as the authored Hamiltonian.

property freq: Any

Return the stored zero-to-one transition in GHz.

eigenenergies()[source]

Return the stored ground-shifted energy table.

eigenvectors()[source]

Return the identity map because the authored basis is energy ordered.

charge_coupling_operator()[source]

Return the supplied charge-like operator in the authored basis.

phase_coupling_operator()[source]

Return the supplied phase-like operator in the authored basis.

physics_notes()[source]

Return human-readable declarations of this device’s approximations.

Each entry names a non-obvious assumption, approximation, or truncation of this device. Examples include “Hilbert truncation: 3 levels”, a model regime (Duffing), or a noise-channel selection (charge- vs flux-coupled T1).

The baseline entry is a truncation note, because every BaseDevice has some form of Hilbert-space truncation. A pure-dephasing note is added when T2 is set, because the number-operator dephasing model has non-obvious assumptions. Subclasses call super().physics_notes() and append their own model-specific notes.

to_dict()[source]

Return a JSON-safe serialization. Subclasses extend it with their own parameters.

classmethod from_dict(data)[source]

Restore a frozen device declaration.

Parameters:

data (dict) – Output of to_dict(), including the energies and optional operator matrices encoded as separate real and imaginary nested lists.

Returns:

Restored device with the noise and reference-frequency metadata.

Return type:

EigenbasisDevice