quchip.approximations

Explicit strategies for reducing an authored Hamiltonian.

Functions

require_approximation(value)

Validate a public approximation value without Boolean coercion.

Classes

Approximation()

Immutable engine strategy applied after the engine assembles the authored physics.

Exact()

Keep every term in the authored finite-dimensional Hamiltonian.

RWA([keep_bands])

First-order structural rotating-wave selection.

class quchip.approximations.Approximation[source]

Bases: ABC

Immutable engine strategy applied after the engine assembles the authored physics.

filters_terms: bool = False
keeps_operator_band(weights)[source]

Return whether a structural operator band survives reduction.

Parameters:

weights (tuple[int, ...]) – Energy-basis weight column - row per endpoint. Annihilation has weight +1 and creation has weight -1.

conserves_excitation_number()[source]

Return whether every retained band conserves the total energy-level index.

Elimination uses this structural guarantee to keep its exact reduction and captured coordinate maps in total-excitation sectors.

to_dict()[source]

Return the stable serialized strategy tag.

static from_dict(data)[source]

Restore one explicit strategy and reject retired schemas.

Parameters:

data (mapping) – Serialized Exact or RWA record.

class quchip.approximations.Exact[source]

Bases: Approximation

Keep every term in the authored finite-dimensional Hamiltonian.

class quchip.approximations.RWA(keep_bands=None)[source]

Bases: Approximation

First-order structural rotating-wave selection.

The default keeps bands whose energy-level index weights sum to zero. This counts levels, not energy. Uneven spectra can have near-resonant transitions in discarded bands. Compare with Exact() or supply keep_bands, which replaces the default selection.

Parameters:

keep_bands (iterable of tuple[int, ...] or None, default None) – Operator-band weights to keep. None keeps only bands whose weights sum to zero. Tuples follow the operator support order. Each tuple must be non-empty and integral, with its negated tuple also present. This adjoint closure preserves Hermiticity.

References

Cohen-Tannoudji, Dupont-Roc & Grynberg, Atom-Photon Interactions (Wiley, 1992), Ch. IV.

keep_bands: frozenset[tuple[int, ...]] | None
filters_terms: bool = True
keeps_operator_band(weights)[source]

Return whether this RWA policy keeps weights.

Parameters:

weights (tuple[int, ...]) – Energy-basis weight column - row per endpoint. Annihilation has weight +1 and creation has weight -1.

conserves_excitation_number()[source]

Return whether every retained band has zero total weight.