quchip.chip.transformations.elimination_order

Default order of a chain of device eliminations (PHYSICS.md §10.8).

Each step of a chain is a second-order reduction, so the order sets which fourth-order terms the chain keeps and how far the operators of kept devices spread along the captured maps. EliminationOrder chooses each step from the patch structure of the source chip and the current diagonal transition energies. It is a cost-and-accuracy heuristic for dispersive chips and does not bound the error.

Functions

omitted_shifts(target, kept, energies, ...)

Estimate the shift of each kept device that a Schrieffer-Wolff step of target omits.

Classes

EliminationOrder(chip, kept)

Choose each spectator of a chain of eliminations, and follow the patches of the chain.

class quchip.chip.transformations.elimination_order.EliminationOrder(chip, kept)[source]

Bases: object

Choose each spectator of a chain of eliminations, and follow the patches of the chain.

The model starts from the rules of the local patch (PHYSICS.md §10.7) on the source chip. Each step links the survivors of its patch, as the effective terms of the step do, and moves each kept device’s operator support onto the patch survivors. When the step reads a level-dependent interaction, its correction can depend on levels on the diagonal, and the model assumes this dependence (remove()). This conservative rule can make a patch larger than the local route’s, and a larger patch can change later choices. The model reads no reduced chip, so local=True and local=False get the same order.

Parameters:
  • chip (Chip) – The source chip.

  • kept (tuple[str, ...]) – Labels of the devices that the chain keeps.

reachable(spectators)[source]

Return the spectators that share a chain of neighbours with a kept device.

patch(label)[source]

Return the devices that the step of label reads, as eliminate(..., local=True) would.

states(labels)[source]

Return the product dimension of labels in authored coordinates.

supports(label=None)[source]

Return the support of each kept device’s operator, after the step of label when it is given.

choose(read, caller)[source]

Return the next spectator and, when it has to break a wait, a note that says what the chain omits.

A spectator v waits while a spectator neighbour u has a kept neighbour k with |E_v - E_k| < |E_v - E_u| / 2, so that the chain keeps the k-v exchange shift. It also waits while its step would give two spectator neighbours a and b an exchange x_ab + x_av x_vb (1/(E_a - E_v) + 1/(E_b - E_v)) / 2 that is nonzero and at least 0.1 |E'_a - E'_b|, the fold limit. This screens the predicted fold of the pair; it does not make every later fold valid. E'_a = E_a + |x_av|^2 / (E_a - E_v) is the estimated transition of a after the step. v also waits when E_a or E_b equals E_v. The pair does not stop the step when x_ab alone is nonzero and already reaches the limit. read returns the current diagonal transition energies E and the exchange elements x of the labels it receives, in GHz. Among the spectators that do not wait, or all of them when every spectator waits, the rule takes a device with a spectator neighbour first, then the smallest widest kept-device support after the step, the smallest sum of these supports, the smallest patch and chip order.

remove(label)[source]

Record the step of label: link its patch survivors and move the supports that meet the patch.

When a neighbour s of label or label itself has an interaction whose diagonal depends on the level of a device t, the denominators of the s-label processes read that level. The correction on the survivors can then depend on the levels of s and t on its diagonal, so later patches that hold s or t hold every survivor.

quchip.chip.transformations.elimination_order.omitted_shifts(target, kept, energies, elements, position)[source]

Estimate the shift of each kept device that a Schrieffer-Wolff step of target omits.

A device u that stays on the chip and has exchange elements with both target (v) and a kept device k mediates the exchange J = sum_u x_ku x_uv (1/(E_k - E_u) + 1/(E_v - E_u)) / 2 between them. The step folds v against u alone, so the chain omits the leading enhanced fourth-order shift |J|^2 / (E_k - E_v) of k (PHYSICS.md §10.8). energies holds the current diagonal transition energies of every device on the chip and elements the exchange elements of device pairs in chip order, as concrete values in GHz.

The estimate needs dispersive legs and |J / (E_k - E_v)| below the fold limit 0.1. Near resonance, k and v hybridize, and the omitted effect is not a dispersive shift. The elements hold the number-conserving terms only, so without RWA the estimate omits the counter-rotating virtual paths.

Returns {k: (shift, mediators, reason)} for each kept device with a mediator. shift is None, and reason says why, when k and v also exchange directly, when two of the transitions are degenerate, or when the estimate is outside this regime.