qoolqit.devices
devices
Modules:
-
device– -
unit_converter–
Classes:
-
AnalogDevice–A realistic device for analog sequence execution.
-
AnalogDeviceWithDMM–A realistic device with DMM for analog sequence execution.
-
Device–QoolQit Device wrapper around a Pulser BaseDevice.
-
DigitalAnalogDevice–A device with digital and analog capabilities.
-
MockDevice–A virtual device for unconstrained prototyping.
Functions:
-
available_default_devices–Show the default available devices in QooQit.
AnalogDevice()
A realistic device for analog sequence execution.
Methods:
-
from_connection–Return the specified device from the selected device from a connection.
-
info–Show the device short description and constraints.
-
reset_converter–Resets the unit converter to the default one.
-
set_distance_unit–Changes the unit converter according to a reference distance unit.
-
set_energy_unit–Changes the unit converter according to a reference energy unit.
Attributes:
-
specs(dict[str, float | None]) –Return the device specification constraints.
Source code in qoolqit/devices/device.py
specs: dict[str, float | None]
property
Return the device specification constraints.
from_connection(connection: RemoteConnection, name: str) -> Device
classmethod
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:
-
(connectionRemoteConnection) –connection object to fetch the available devices.
-
(namestr) –The name of the desired device.
Returns:
-
Device(Device) –The requested device.
Raises:
-
ValueError–If the requested device is not available through the provided connection.
Example:
from pulser_pasqal import PasqalCloud
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")
Source code in qoolqit/devices/device.py
info() -> None
reset_converter() -> None
set_distance_unit(distance: float) -> None
Changes the unit converter according to a reference distance unit.
set_energy_unit(energy: float) -> None
Changes the unit converter according to a reference energy unit.
AnalogDeviceWithDMM()
A realistic device with DMM for analog sequence execution.
Methods:
-
from_connection–Return the specified device from the selected device from a connection.
-
info–Show the device short description and constraints.
-
reset_converter–Resets the unit converter to the default one.
-
set_distance_unit–Changes the unit converter according to a reference distance unit.
-
set_energy_unit–Changes the unit converter according to a reference energy unit.
Attributes:
-
specs(dict[str, float | None]) –Return the device specification constraints.
Source code in qoolqit/devices/device.py
specs: dict[str, float | None]
property
Return the device specification constraints.
from_connection(connection: RemoteConnection, name: str) -> Device
classmethod
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:
-
(connectionRemoteConnection) –connection object to fetch the available devices.
-
(namestr) –The name of the desired device.
Returns:
-
Device(Device) –The requested device.
Raises:
-
ValueError–If the requested device is not available through the provided connection.
Example:
from pulser_pasqal import PasqalCloud
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")
Source code in qoolqit/devices/device.py
info() -> None
reset_converter() -> None
set_distance_unit(distance: float) -> None
Changes the unit converter according to a reference distance unit.
set_energy_unit(energy: float) -> None
Changes the unit converter according to a reference energy unit.
Device(pulser_device: BaseDevice, default_converter: Optional[UnitConverter] = None)
QoolQit Device wrapper around a Pulser BaseDevice.
Parameters:
-
(pulser_deviceBaseDevice) –a
BaseDeviceto build the QoolQit device from. -
(default_converterOptional[UnitConverter], default:None) –optional unit converter to handle unit conversion.
Examples:
From Pulser device:
From remote Pulser device:
from pulser_pasqal import PasqalCloud
from qoolqit import Device
# Fetch the remote device from the connection
connection = PasqalCloud()
pulser_fresnel_device = connection.fetch_available_devices()["FRESNEL"]
# Wrap a Pulser device object into a QoolQit Device
fresnel_device = Device(pulser_device=PulserFresnelDevice)
From custom Pulser device:
from dataclasses import replace
from pulser import AnalogDevice
from qoolqit import Device
# Converting the pulser Device object in a VirtualDevice object
VirtualAnalog = AnalogDevice.to_virtual()
# Replacing desired values
ModdedAnalogDevice = replace(
VirtualAnalog,
max_radial_distance=100,
max_sequence_duration=7000
)
# Wrap a Pulser device object into a QoolQit Device
mod_analog_device = Device(pulser_device=ModdedAnalogDevice)
- API reference
Methods:
-
from_connection–Return the specified device from the selected device from a connection.
-
info–Show the device short description and constraints.
-
reset_converter–Resets the unit converter to the default one.
-
set_distance_unit–Changes the unit converter according to a reference distance unit.
-
set_energy_unit–Changes the unit converter according to a reference energy unit.
Attributes:
-
specs(dict[str, float | None]) –Return the device specification constraints.
Source code in qoolqit/devices/device.py
specs: dict[str, float | None]
property
Return the device specification constraints.
from_connection(connection: RemoteConnection, name: str) -> Device
classmethod
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:
-
(connectionRemoteConnection) –connection object to fetch the available devices.
-
(namestr) –The name of the desired device.
Returns:
-
Device(Device) –The requested device.
Raises:
-
ValueError–If the requested device is not available through the provided connection.
Example:
from pulser_pasqal import PasqalCloud
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")
Source code in qoolqit/devices/device.py
info() -> None
reset_converter() -> None
set_distance_unit(distance: float) -> None
Changes the unit converter according to a reference distance unit.
set_energy_unit(energy: float) -> None
Changes the unit converter according to a reference energy unit.
DigitalAnalogDevice()
A device with digital and analog capabilities.
Methods:
-
from_connection–Return the specified device from the selected device from a connection.
-
info–Show the device short description and constraints.
-
reset_converter–Resets the unit converter to the default one.
-
set_distance_unit–Changes the unit converter according to a reference distance unit.
-
set_energy_unit–Changes the unit converter according to a reference energy unit.
Attributes:
-
specs(dict[str, float | None]) –Return the device specification constraints.
Source code in qoolqit/devices/device.py
specs: dict[str, float | None]
property
Return the device specification constraints.
from_connection(connection: RemoteConnection, name: str) -> Device
classmethod
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:
-
(connectionRemoteConnection) –connection object to fetch the available devices.
-
(namestr) –The name of the desired device.
Returns:
-
Device(Device) –The requested device.
Raises:
-
ValueError–If the requested device is not available through the provided connection.
Example:
from pulser_pasqal import PasqalCloud
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")
Source code in qoolqit/devices/device.py
info() -> None
reset_converter() -> None
set_distance_unit(distance: float) -> None
Changes the unit converter according to a reference distance unit.
set_energy_unit(energy: float) -> None
Changes the unit converter according to a reference energy unit.
MockDevice()
A virtual device for unconstrained prototyping.
Methods:
-
from_connection–Return the specified device from the selected device from a connection.
-
info–Show the device short description and constraints.
-
reset_converter–Resets the unit converter to the default one.
-
set_distance_unit–Changes the unit converter according to a reference distance unit.
-
set_energy_unit–Changes the unit converter according to a reference energy unit.
Attributes:
-
specs(dict[str, float | None]) –Return the device specification constraints.
Source code in qoolqit/devices/device.py
specs: dict[str, float | None]
property
Return the device specification constraints.
from_connection(connection: RemoteConnection, name: str) -> Device
classmethod
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:
-
(connectionRemoteConnection) –connection object to fetch the available devices.
-
(namestr) –The name of the desired device.
Returns:
-
Device(Device) –The requested device.
Raises:
-
ValueError–If the requested device is not available through the provided connection.
Example:
from pulser_pasqal import PasqalCloud
fresnel_device = Device.from_connection(connection=PasqalCloud(), name="FRESNEL")
Source code in qoolqit/devices/device.py
info() -> None
reset_converter() -> None
set_distance_unit(distance: float) -> None
Changes the unit converter according to a reference distance unit.
set_energy_unit(energy: float) -> None
Changes the unit converter according to a reference energy unit.