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_chip(chip, **opts)

Export a quchip Chip to an scqubits HilbertSpace.

import_hilbertspace(hs, **opts)

Import an scqubits HilbertSpace into a quchip Chip.

quchip.interop.scqubits.composite.import_hilbertspace(hs, **opts)[source]

Import an scqubits HilbertSpace into a quchip Chip.

Each subsystem is frozen at its source truncation (order and id_str preserved); each InteractionTerm becomes a callable-form Coupling in the same eigenbasis gauge.

Parameters:
  • hs (scqubits.HilbertSpace) – The composite system to import.

  • **optsframe and approximation are forwarded to Chip. Device-level options are not forwarded: every subsystem imports at its own truncated_dim and native noise defaults.

Raises:

NotImplementedError – A string-expression (InteractionTermStr) or non-pairwise interaction term is present.

Return type:

Chip

quchip.interop.scqubits.composite.export_chip(chip, **opts)[source]

Export a quchip Chip to an scqubits HilbertSpace.

Each device exports through the shipped device mappings (quchip.interop.scqubits.devices) in chip order, and every Coupling factorizes into a scalar strength and two device operators (see _coupling_product_factors()) added as one InteractionTerm per 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 a Capacitive, TunableCapacitive, or product-form Coupling therefore fails closed with ValueError: silently exporting the full form anyway would reproduce different physics than the chip’s own resolved dynamics. CrossKerr is exempt because n̂_a n̂_b conserves excitation number and survives RWA() unchanged. Resolve or clone the chip with Exact before export.

Chip-level control equipment and baths have no scqubits counterpart (it models neither drives nor dissipation) and are dropped with a single UserWarning naming 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:
Return type:

Any