Skip to content

Results are limited to Qoolqit v0.4.0

Product news
You are reading Qoolqit v0.4.0, an older version of this documentation. Go to the latest version (v1.5.0)

qoolqit.devices.device

module
qoolqit.devices.device

Classes

  • Device — QoolQit Device wrapper around a Pulser BaseDevice.

  • MockDevice — A virtual device for unconstrained prototyping.

  • AnalogDevice — A realistic device for analog sequence execution.

  • DigitalAnalogDevice — A device with digital and analog capabilities.

Functions

class
Device (pulser_device: BaseDevice, default_converter: Optional[UnitConverter] = None)

QoolQit Device wrapper around a Pulser BaseDevice.

Parameters

  • pulser_device : BaseDevice — a BaseDevice to 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 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)

Attributes

  • specs : dict[str, float | None] — Return the device specification constraints.

  • 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 constraints.

  • 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 constraints.

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 constraints.

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

class
MockDevice ()

Bases : Device

A virtual device for unconstrained prototyping.

Attributes

  • specs : dict[str, float | None] — Return the device specification constraints.

  • 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 constraints.

  • 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 constraints.

  • energy_ratio : float | None — Return the ratio between the max amplitude and max interaction energy on this device.

available_default_devices () → None

Show the default available devices in QooQit.