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 authored physics is assembled.

Exact()

Retain 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 authored physics is assembled.

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

Return whether a structural operator band survives reduction.

Parameters:

weights (tuple[int, ...])

Return type:

bool

to_dict()[source]

Return the stable serialized strategy tag.

Return type:

dict[str, Any]

static from_dict(data)[source]

Restore one explicit strategy and reject retired schemas.

Parameters:

data (Any)

Return type:

Approximation

class quchip.approximations.Exact[source]

Bases: Approximation

Retain every term in the authored finite-dimensional Hamiltonian.

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

Bases: Approximation

First-order structural rotating-wave selection.

keep_bands replaces, rather than extends, total-excitation conservation.

Parameters:

keep_bands (frozenset[tuple[int, ...]] | None)

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

Return whether a structural operator band survives reduction.

Parameters:

weights (tuple[int, ...])

Return type:

bool