quchip.interop.scqubits

scqubits interoperability — from_scqubits / to_scqubits dispatch.

Importing this subpackage registers the shipped scqubits device mappings (see quchip.interop.scqubits.devices) with the library-agnostic quchip.interop.base registry. The two public functions dispatch through that registry after checking that scqubits is installed.

Functions

from_scqubits(obj, **opts)

Convert a scqubits object into the matching quchip device.

to_scqubits(device_or_chip, **opts)

Convert a quchip device into the matching scqubits object.

quchip.interop.scqubits.from_scqubits(obj, **opts)[source]

Convert a scqubits object into the matching quchip device.

Dispatches on type(obj) through the ModelMapping registry. Keyword options (levels, label, noise parameters) are forwarded to the mapping’s import_model.

Raises:
Parameters:
Return type:

Any

quchip.interop.scqubits.to_scqubits(device_or_chip, **opts)[source]

Convert a quchip device into the matching scqubits object.

Dispatches on type(device_or_chip) through the export registry for the "scqubits" library. Parameters must be concrete: a device carrying JAX tracers (inside jit/grad) raises ValueError.

A Chip exports to an scqubits HilbertSpace (devices as subsystems, couplings as interaction terms); see export_chip().

Raises:
  • ImportError – scqubits is not installed.

  • LookupError – No ModelMapping exports this device type to scqubits.

  • ValueError – A device parameter is a JAX tracer rather than a concrete value.

Parameters:
  • device_or_chip (Any)

  • opts (Any)

Return type:

Any

Modules

composite

Composite import — scqubits HilbertSpace -> quchip Chip.

devices

Shipped scqubits <-> quchip device mappings.