quchip.chip.transformations.coordinate_change

Keep a captured change of coordinates on a rebuilt chip.

Coupling and effective-term reductions rotate the whole product space by a unitary from one isolated interaction. Devices and kept edges keep their authored terms. One EffectiveTerms contribution holds the remaining part of the rotated Hamiltonian, which includes earlier effective terms and carries their channels and notes through the rotation.

Functions

embed_on_labels(backend, labels, dims, ...)

Embed a dense operator on support in the product space ordered by labels.

isolated_hamiltonian(chip, devices, ...[, ...])

Return devices with the selected interaction alone: matrix, local product energies and dims.

labeled_eigenvectors(matrix, dims)

Return the eigenvectors of matrix ordered by the bare product label of largest overlap.

product_energies(bases, labels)

Return the local energies of labels summed over their product basis, in label order.

retain_coordinate_change(chip, *, source, ...)

Rebuild chip and keep in one contribution everything that its authored terms miss.

quchip.chip.transformations.coordinate_change.product_energies(bases, labels)[source]

Return the local energies of labels summed over their product basis, in label order.

quchip.chip.transformations.coordinate_change.isolated_hamiltonian(chip, devices, approximation, *, couplings=(), effective_terms=())[source]

Return devices with the selected interaction alone: matrix, local product energies and dims.

The diagonal holds the local product energies. The selected couplings or effective_terms supply all other elements. Uses chip’s basis and backend.

quchip.chip.transformations.coordinate_change.labeled_eigenvectors(matrix, dims)[source]

Return the eigenvectors of matrix ordered by the bare product label of largest overlap.

quchip.chip.transformations.coordinate_change.embed_on_labels(backend, labels, dims, operator, support)[source]

Embed a dense operator on support in the product space ordered by labels.

quchip.chip.transformations.coordinate_change.retain_coordinate_change(chip, *, source, labels, dims, rotation, retained_h, approximation, devices, couplings, label, notes, removed_owners=())[source]

Rebuild chip and keep in one contribution everything that its authored terms miss.

rotation and retained_h use the source’s local energy product basis in labels order. retained_h is the source Hamiltonian in the rotated coordinates. The rebuilt chip keeps devices and couplings with their authored parameters. retained_h minus their Hamiltonian, assembled at approximation, becomes one EffectiveTerms named label. This contribution absorbs the source’s effective terms, so their channels follow the rotation and their notes come before notes. The channels of removed_owners also follow the rotation. Returns the rebuilt chip and its captured ReductionMap.