quchip.devices.qubit

An ideal two-level system with a declared transition frequency.

Classes

Qubit([freq, levels, label, T1, T2, ...])

Ideal two-level device with H/h = freq * |1><1|.

class quchip.devices.qubit.Qubit(freq=unbound, *, levels=2, label=None, T1=None, T2=None, thermal_occupation=None)[source]

Bases: FockDevice

Ideal two-level device with H/h = freq * |1><1|.

Parameters:
  • freq (float) – Positive transition frequency in GHz. Can be a JAX tracer.

  • levels (int, default 2) – Must equal two. Use a transmon model to include higher levels.

  • label (str or None, default None) – Device label. None selects an automatic label.

  • T1 (float or None, default None) – Energy-relaxation time in ns. None disables relaxation.

  • T2 (float or None, default None) – Total coherence time in ns. None disables pure dephasing. If both times are set, T2 <= 2*T1. At zero thermal occupation, the pure-dephasing rate is 1/T2 - 1/(2*T1).

  • thermal_occupation (float or None, default None) – Dimensionless bath occupation. None disables thermal absorption.

Notes

Relaxation and dephasing use the standard device channels. With two levels, n = |1><1| and a = |0><1|. A frame at freq removes the free Hamiltonian. The model contains no leakage levels or circuit parameters.

computational = True

Whether this device represents a computational qubit, as opposed to e.g. a bus resonator or a coupler element.

approximation = 'Ideal two-level system; higher levels and leakage are omitted.'

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.

dressed_fit_target_fields = (('freq', 'freq'),)

(dressed_observable, declared_field) pairs used when this device appears in the desired-chip form of fit_a_dress. Empty means that the model makes no automatic dressed-target claim; circuit-level models can remain fixed until the user supplies explicit constraints.

dressed_fit_param_names = ('freq',)

Bare parameters normally varied to reproduce dressed_fit_target_fields. This remains separate from tunable_param_names: a model may expose parameters for sweeps without claiming that inverse design can identify all of them from its default dressed observables.

freq: Scalar = Parameter(default=unbound, positive=True, nonnegative=False, serialize=True, unit='GHz', symbol='\\omega', noise=False, kw_only=False, required=False)
local_hamiltonian(op, p)[source]

Return the two-level Hamiltonian in GHz.

Parameters:
validate()[source]

Check for exactly two levels at construction and grouped rebinding.

truncation_boundary()[source]

Return no numerical cutoff for an intrinsically two-level system.

tunable_param_names = ('freq',)

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.