-
MockDevice — A virtual device for unconstrained prototyping.
-
AnalogDevice — A realistic device for analog sequence execution.
-
DigitalAnalogDevice — A device with digital and analog capabilities.
-
Device — QoolQit Device wrapper around a Pulser BaseDevice.
qoolqit.devices
package
qoolqit.devices
Classes
Functions
-
available_default_devices — Show the default available devices in QooQit.
class
MockDevice
()
Bases : Device
A virtual device for unconstrained prototyping.
Attributes
-
specs : dict[str, float | None] — Return the device specification constrains.
-
energy_ratio : float | None — Return the ratio between the max amplitude and max interaction energy on this device.
class
AnalogDevice
()
Bases : Device
A realistic device for analog sequence execution.
Attributes
-
specs : dict[str, float | None] — Return the device specification constrains.
-
energy_ratio : float | None — Return the ratio between the max amplitude and max interaction energy on this device.
class
DigitalAnalogDevice
()
Bases : Device
A device with digital and analog capabilities.
Attributes
-
specs : dict[str, float | None] — Return the device specification constrains.
-
energy_ratio : float | None — Return the ratio between the max amplitude and max interaction energy on this device.
class
Device
(pulser_device: BaseDevice, default_converter: Optional[UnitConverter] = None)
QoolQit Device wrapper around a Pulser BaseDevice.
Parameters
-
pulser_device : BaseDevice — a
BaseDeviceto build the QoolQit device from. -
default_converter : Optional[UnitConverter] — optional unit converter to handle unit conversion. Defaults to the unit converter that rescales energies by the maximum allowed amplitude by the device.
Examples
From Pulser device:
qoolqit_device = Device(pulser_device=pulser_device)From remote Pulser device:
from pulser_pasqal import PasqalCloudfrom qoolqit import Device
# Fetch the remote device from the connectionconnection = PasqalCloud()pulser_fresnel_device = connection.fetch_available_devices()["FRESNEL"]
# Wrap a Pulser device object into a QoolQit Devicefresnel_device = Device(pulser_device=PulserFresnelDevice)From custom Pulser device:
from dataclasses import replacefrom pulser import AnalogDevicefrom qoolqit import Device
# Converting the pulser Device object in a VirtualDevice objectVirtualAnalog = AnalogDevice.to_virtual()# Replacing desired valuesModdedAnalogDevice = replace( VirtualAnalog, max_radial_distance=100, max_sequence_duration=7000 )
# Wrap a Pulser device object into a QoolQit Devicemod_analog_device = Device(pulser_device=ModdedAnalogDevice)Attributes
-
specs : dict[str, float | None] — Return the device specification constrains.
-
energy_ratio : float | None — Return the ratio between the max amplitude and max interaction energy on this device.
Methods
-
reset_converter — Resets the unit converter to the default one.
-
set_time_unit — Changes the unit converter according to a reference time unit.
-
set_energy_unit — Changes the unit converter according to a reference energy unit.
-
set_distance_unit — Changes the unit converter according to a reference distance unit.
-
info — Show the device short description and constrains.
-
from_connection — Return the specified device from the selected device from a connection.
property
converter
: UnitConverter
method
reset_converter
() → None
Resets the unit converter to the default one.
method
set_time_unit
(time: float) → None
Changes the unit converter according to a reference time unit.
method
set_energy_unit
(energy: float) → None
Changes the unit converter according to a reference energy unit.
method
set_distance_unit
(distance: float) → None
Changes the unit converter according to a reference distance unit.
property
specs
: dict[str, float | None]
Return the device specification constrains.
property
energy_ratio
: float | None
Return the ratio between the max amplitude and max interaction energy on this device.
property
name
: str
method
info
() → None
Show the device short description and constrains.
classmethod
from_connection
(connection: RemoteConnection, name: str) → Device
Return the specified device from the selected device from a connection.
Available devices through the provided connection are can be seen with
the connection.fetch_available_devices() method.
Parameters
-
connection : RemoteConnection — connection object to fetch the available devices.
-
name : str — The name of the desired device.
Example
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")Raises
-
ValueError
available_default_devices () → None
Show the default available devices in QooQit.