quchip.cutoff

Explicit retained-space policies for chips.

An approximation (RWA or Exact) selects Hamiltonian terms. A space policy selects the product energy labels that a calculation keeps. quchip never sets or changes a chip’s space policy. Without a policy, finite_power() and measure() can truncate their own stationary solve of a large excitation-conserving chip, and they warn which truncation they kept.

Functions

active_cutoff(chip)

Return the chip's cutoff when it removes product labels, else None.

require_space(value)

Validate a public space policy.

Classes

ExcitationCutoff(max_total)

Keep the product energy labels whose levels sum to at most max_total.

class quchip.cutoff.ExcitationCutoff(max_total)[source]

Bases: object

Keep the product energy labels whose levels sum to at most max_total.

A label assigns one isolated local energy level n_i to each device, and its total excitation is N = sum_i n_i. The retained space holds every label with N <= max_total. The cutoff counts levels, not energy, so it is not an energy window.

With projector P on the retained space, the model keeps P H(t) P, including every matrix element between retained sectors, and the projected jumps P L P. Counter-rotating terms stay when the chip’s approximation keeps them. A cutoff with max_total >= sum_i (d_i - 1) keeps the full product space and leaves every calculation unchanged.

Parameters:

max_total (int) – Largest retained total excitation, at least 1.

Examples

>>> from quchip import Capacitive, Chip, DuffingTransmon, Exact, ExcitationCutoff, Resonator
>>> q = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=4, label="q")
>>> r = Resonator(freq=7.0, levels=6, label="r")
>>> chip = Chip([q, r], [Capacitive(q, r, g=0.1)], approximation=Exact())
>>> limited = chip.with_space(ExcitationCutoff(max_total=3))
>>> f_q = limited.freq(q)  # dressed 0 -> 1 frequency of the truncated model, GHz
max_total: int
binds(dims)[source]

Return whether the cutoff removes product labels of a space with local dims.

Parameters:

dims (sequence of int) – Retained level count of each device.

to_dict()[source]

Return the stable serialized policy.

static from_dict(data)[source]

Restore a policy from to_dict() output.

Parameters:

data (mapping) – Serialized ExcitationCutoff record.