quchip.engine.sectors¶
Excitation sectors and cutoff classes of a chip’s static model.
A product energy label gives each device one isolated local energy level, and
its total excitation is N. When a chip’s static model conserves N, its
Hamiltonian is block diagonal in the product energy basis, one block per
N. Under an ExcitationCutoff, the retained static
model P H P is block diagonal in classes: sets of totals in [0, K] that
the static terms’ changes of N connect. SectorModel builds each
block from each term’s local operator on its own support. Two product states
couple only when they agree outside that support, so no operator on the full
product space is formed. Dressed queries diagonalize only the blocks that
their labels occupy. The weak-probe VNA route reads its vacuum and
one-excitation blocks the same way.
Functions
|
Return the Hamiltonian of cascaded port pairs as local terms on joint supports. |
Classes
|
Labeled eigenpairs of one sector or cutoff class. |
|
Static lab-frame model of a chip, built one block of totals at a time. |
|
Product energy states whose levels sum to one of a set of totals. |
- quchip.engine.sectors.generated_products(ports, pairs, dims)[source]¶
Return the Hamiltonian of cascaded port pairs as local terms on joint supports.
Each pair contributes
(L_down^dagger c L_up - h.c.) / 2i, in the units of the port couplings’ product. The product is formed on the joint support of the two ports, so every intermediate level of those devices is kept. Gathering a term onto any set of product labels therefore givesP H_gen Pexactly. A support whose elements are all below the round-off threshold of their products contributes no term.
- class quchip.engine.sectors.SectorSpace(dims, totals, levels)[source]¶
Bases:
objectProduct energy states whose levels sum to one of a set of totals.
- Variables:
dims (tuple[int, ...]) – Level count of each device, in chip order.
totals (tuple[int, ...]) – Total energy-level indices of the states, in increasing order.
levels (numpy.ndarray) – Levels with shape
(size, len(dims)), one state per row, ordered by total and then in C order.
- class quchip.engine.sectors.SectorEigensystem(space, eigenvalues, eigenvectors, labeling)[source]¶
Bases:
objectLabeled eigenpairs of one sector or cutoff class.
- Variables:
space (SectorSpace) – Product states of the block.
eigenvalues (array_like) – Ascending eigenvalues in GHz.
eigenvectors (array_like) – Eigenvectors as columns in the block’s product energy basis. Each column has a real, nonnegative amplitude on its assigned label, as
gauge_phases()sets.labeling (Labeling) – Assignment of each bare label in
spaceto one eigenvector.
- space: SectorSpace¶
- class quchip.engine.sectors.SectorModel(chip, *, resolution=None, advisories=None, approximation=None)[source]¶
Bases:
objectStatic lab-frame model of a chip, built one block of totals at a time.
Without a cutoff, the chip’s static model must conserve the total energy-level index, as
conservesstates, and each block is one sector. Under an activeExcitationCutoff, the model isP H Pon the labels withN <= K, and each block is one class ofexcitation_classes(). A block holds the device energies, each coupling band that the chip’s approximation keeps, each retained term, and the Hamiltonian that cascaded ports generate.- Parameters:
chip (Chip) – Chip whose static model is built.
resolution (optional) – Resolved local bases to reuse instead of resolving the devices again.
advisories (list of str, optional) – List that receives approximation advisories instead of warnings.
approximation (Approximation, optional) – Approximation that selects the static terms.
Noneuses the chip’s.
- property traced: bool¶
Return whether the device energies, static terms or port couplings hold JAX tracers.
- property contributions: tuple[tuple[Any, ...], ...]¶
Collapse contributions of the chip, with retained coordinate maps applied.
- class_of(total)[source]¶
Return the totals of the block that holds
total.- Parameters:
total (int) – Total energy-level index.
- local_operator(operator, support)[source]¶
Return an operator on
supportas a matrix in that support’s product energy basis.- Parameters:
operator (PhysicsExpr or backend operator) – Operator in the authored coordinates of
support.support (tuple[int, ...]) – Device indices in the operator’s tensor order. An empty support denotes an operator on the whole chip.
- channel_operator(operator, rate, support, phase=None)[source]¶
Return a channel coupling
exp(i phase) sqrt(rate) Ain its support’s energy basis.- Parameters:
operator (PhysicsExpr or backend operator) – Channel operator
Aonsupport.rate (scalar or PhysicsExpr) – Channel rate.
support (tuple[int, ...]) – Device indices of
A. An empty support denotes the whole chip.phase (scalar or None, default=None) – Port phase in radians.
- block(operator, support, row_totals, column_totals)[source]¶
Return the block of an operator from one set of totals to another.
- Parameters:
operator (array_like) – Matrix on
supportin its product energy basis.support (tuple[int, ...]) – Device indices in the matrix’s tensor order. An empty support denotes the whole chip.
row_totals (int or sequence of int) – Total energy-level indices of the rows and of the columns.
column_totals (int or sequence of int) – Total energy-level indices of the rows and of the columns.
- eigensystem(total)[source]¶
Diagonalize the block that holds
totaland assign its bare labels.Each block is diagonalized once per model, and a result that holds tracers is reused only inside its trace. A concrete block is diagonalized on the host, and a traced block uses one
eigh.- Parameters:
total (int) – Total energy-level index in the block.
- embed(totals, vector)[source]¶
Return a vector of one block as a product-space vector in solver coordinates.
- labeled_subspace(labels)[source]¶
Return the eigenpairs of the blocks that
labelsoccupy and the labels’ positions.The returned eigenvalues and block-diagonal eigenvector matrix hold the occupied blocks in increasing total. The list gives each label’s row, and the array gives the column of its assigned eigenvector.