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
|
Convert a scqubits object into the matching quchip device. |
|
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 theModelMappingregistry. Keyword options (levels,label, noise parameters) are forwarded to the mapping’simport_model.- Raises:
ImportError – scqubits is not installed.
LookupError – No
ModelMappingis registered fortype(obj).
- Parameters:
- Return type:
- 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 (insidejit/grad) raisesValueError.A
Chipexports to an scqubitsHilbertSpace(devices as subsystems, couplings as interaction terms); seeexport_chip().- Raises:
ImportError – scqubits is not installed.
LookupError – No
ModelMappingexports this device type to scqubits.ValueError – A device parameter is a JAX tracer rather than a concrete value.
- Parameters:
- Return type:
Modules