quchip.interop.scqubits.composite¶
Composite import from scqubits HilbertSpace to quchip Chip.
An scqubits HilbertSpace bundles subsystems and the InteractionTerm
couplings between them. import_hilbertspace() imports each subsystem
through the shipped device mappings (quchip.interop.scqubits.devices),
keeping the order and using each subsystem’s id_str as the device label. It
then transcribes every InteractionTerm into a callable-form
Coupling. The coupling’s operator matrices are
the term’s subsystem operators, expressed in the gauge of the imported device
they act on.
An imported HilbertSpace is a frozen snapshot of the source’s truncated
subsystem model. Each subsystem becomes an
EigenbasisDevice, and the interaction
factors stay in that same source eigenbasis. This reproduces the scqubits
truncation and gauge exactly, without a second projection path. Importing an
individual supported device still reconstructs the live differentiable quchip
model from its circuit parameters.
The import translates only pairwise InteractionTerm products of two
operators. Each term’s operator matrices are a frozen snapshot at the source
parameter point, so the coupling is not differentiable with respect to the
source circuit parameters. EigenbasisDevice
carries the same frozen-snapshot contract. InteractionTermStr string
expressions and non-pairwise products raise NotImplementedError, and
the import does not make a partial model. The import converts subsystem
energies and interaction strengths from the current scqubits unit,
scqubits.get_units(), to GHz, and the export converts them back.
Functions
|
Export a quchip |
|
Import an scqubits |
- quchip.interop.scqubits.composite.import_hilbertspace(hs, **opts)[source]¶
Import an scqubits
HilbertSpaceinto a quchipChip.Each subsystem is frozen at its source truncation, keeping its order and
id_str. EachInteractionTermbecomes a callable-formCouplingin the same eigenbasis gauge.- Parameters:
hs (scqubits.HilbertSpace) – Composite system to import.
**opts (Any) –
frameandapproximationare forwarded toChip, but device-level options are not. Every subsystem imports at its owntruncated_dimand native noise defaults.
- Raises:
NotImplementedError – A string-expression (
InteractionTermStr) or non-pairwise interaction term is present.
- quchip.interop.scqubits.composite.export_chip(chip, **opts)[source]¶
Export a quchip
Chipto an scqubitsHilbertSpace.Each device exports through the shipped device mappings (
quchip.interop.scqubits.devices) in chip order. EveryCouplingfactorizes into a scalar strength and two device operators. The export adds these as oneInteractionTermper edge. scqubits carries each subsystem’s bare diagonal energies (gauge-invariant) and these interaction matrices. The full composite is therefore in one consistent gauge, quchip’s, and its dressed spectrum reproduces the chip’s.The export uses the complete operator form of each coupling. scqubits interaction terms are bare operator products with no approximation strategy of their own. So if a chip’s
RWA()strategy filters aCapacitive,TunableCapacitive, or product-formCoupling, the export fails closed withValueError. Silently exporting the full form would reproduce different physics than the chip’s resolved dynamics.CrossKerris exempt becausen̂_a n̂_bconserves the excitation number and stays unchanged underRWA(). Resolve or clone the chip withExactbefore export.Chip-level control equipment and baths have no scqubits counterpart, because scqubits models neither drives nor dissipation. The export drops them with one
UserWarningthat names the dropped items.- Parameters:
chip (Chip) – The composite system to export. Coupling strengths must be concrete, and a strength carrying a JAX tracer raises
ValueError.**opts (Any) – Any supplied key raises
TypeError.
- Raises:
NotImplementedError – The chip has a PortNetwork, retained effective terms, or intrinsic time-dependent Hamiltonians, or a coupling is not a
Capacitive,TunableCapacitive,CrossKerr, or product-formCoupling.ValueError – A coupling strength is a JAX tracer rather than a concrete value, or
RWAfilters a Capacitive/TunableCapacitive/product-form Coupling (see above).LookupError – A device has no registered scqubits export mapping.
TypeError – You pass an unexpected keyword option (composite export accepts none).