quchip.interop.scqubits.composite¶
Composite import — scqubits HilbertSpace -> quchip Chip.
An scqubits HilbertSpace bundles a list of subsystems and a list of
InteractionTerm couplings between them. import_hilbertspace() imports
each subsystem individually through the shipped device mappings
(quchip.interop.scqubits.devices), preserving order and each subsystem’s
id_str as the device label, then transcribes every InteractionTerm into
a callable-form Coupling whose 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 interaction factors
remain in that same source eigenbasis. This reproduces scqubits’ truncation and
gauge exactly without introducing a second projection path. Importing an
individual supported device still reconstructs the live differentiable quchip
model from its circuit parameters.
Only pairwise InteractionTerm products of two operators are translated.
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 (the same
frozen-snapshot contract EigenbasisDevice
carries). InteractionTermStr string expressions and non-pairwise products
raise NotImplementedError rather than importing a partial model.
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 (order and
id_strpreserved); eachInteractionTermbecomes a callable-formCouplingin the same eigenbasis gauge.- Parameters:
hs (scqubits.HilbertSpace) – The composite system to import.
**opts –
frameandapproximationare forwarded toChip. Device-level options are not forwarded: every subsystem imports at its owntruncated_dimand native noise defaults.
- Raises:
NotImplementedError – A string-expression (
InteractionTermStr) or non-pairwise interaction term is present.- Return type:
- 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, and everyCouplingfactorizes into a scalar strength and two device operators (see_coupling_product_factors()) added as oneInteractionTermper edge. scqubits carries the bare diagonal energies of each subsystem (gauge-invariant) plus these interaction matrices, so the whole composite lives in one consistent gauge — quchip’s — and its dressed spectrum reproduces the chip’s.Couplings are exported in their complete operator form: scqubits interaction terms are bare operator products and apply no approximation strategy of their own. Exporting a chip whose
RWA()strategy filters aCapacitive,TunableCapacitive, or product-formCouplingtherefore fails closed withValueError: silently exporting the full form anyway would reproduce different physics than the chip’s own resolved dynamics.CrossKerris exempt becausen̂_a n̂_bconserves excitation number and survivesRWA()unchanged. Resolve or clone the chip withExactbefore export.Chip-level control equipment and baths have no scqubits counterpart (it models neither drives nor dissipation) and are dropped with a single
UserWarningnaming what was dropped.- Parameters:
chip (Chip) – The composite system to export. Coupling strengths must be concrete — a strength carrying a JAX tracer raises
ValueError.opts (Any)
- Raises:
NotImplementedError – A coupling is neither
Capacitive,TunableCapacitive,CrossKerr, nor a product-formCoupling.ValueError – A coupling strength is a JAX tracer rather than a concrete value, or a Capacitive/TunableCapacitive/product-form Coupling is filtered by
RWA(see above).LookupError – A device has no registered scqubits export mapping.
TypeError – An unexpected keyword option is passed (composite export takes none).
- Return type: