-
MockDevice — An ideal device without constraints.
-
AnalogDevice — A realistic device with constraints mimicking a real QPU.
-
TestAnalogDevice — A realistic device with constraints mimicking a real QPU.
-
Device — Abstract base class for a Device in QoolQit.
-
UnitConverter — A dataclass representing a unit converter in the Rydberg-Analog model.
qoolqit.devices
package
qoolqit.devices
Classes
class
MockDevice
()
Bases : Device
An ideal device without constraints.
class
AnalogDevice
()
Bases : Device
A realistic device with constraints mimicking a real QPU.
class
TestAnalogDevice
()
Bases : Device
A realistic device with constraints mimicking a real QPU.
enum
AvailableDevices
()
class
Device
()
Bases : ABC
Abstract base class for a Device in QoolQit.
The device in QoolQit holds a Pulser device, and all the logic is based on that.
Defining a new device for usage in QoolQit should be done by inheriting from this base
class and overriding the _device private property with the corresponding Pulser 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.
property
specs
: dict
property
name
: str
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.
dataclass
UnitConverter
(C6: float = field(repr=False), time: float, energy: float, distance: float)
A dataclass representing a unit converter in the Rydberg-Analog model.
Includes three inter-dependent factors for TIME, ENERGY and DISTANCE conversion, also depending on the interaction coeffiecient C6. The converter checks the following invariants, based on the units used by Pulser:
Conversion invariants
- TIME * ENERGY = 1000 ( <=> TIME = 1000 / ENERGY )
- DISTANCE^6 * ENERGY = C6 ( <=> ENERGY = C6 / (DISTANCE ^ 6) )
Attributes
-
C6 : float — Time conversion factor.
-
time : float — Energy conversion factor.
-
energy : float — Distance conversion factor.
-
factors : tuple[float, ...] — Return the current conversion factors set.
Methods
-
validate_factors — Returns True if the conversion invariants are respected.
-
from_time — Instantiate from a reference C6 value and a reference time unit.
-
from_energy — Instantiate from a reference C6 value and a reference energy unit.
-
from_distance — Instantiate from a reference C6 value and a reference distance unit.
-
factors_from_time — Get factors from a different reference time than the one set.
-
factors_from_energy — Get factors from a different reference energy than the one set.
-
factors_from_distance — Get factors from a different reference distance than the one set.
method
validate_factors
(time: float, energy: float, distance: float) → bool
Returns True if the conversion invariants are respected.
classmethod
from_time
(C6: float, time: float) → UnitConverter
Instantiate from a reference C6 value and a reference time unit.
classmethod
from_energy
(C6: float, energy: float) → UnitConverter
Instantiate from a reference C6 value and a reference energy unit.
classmethod
from_distance
(C6: float, distance: float) → UnitConverter
Instantiate from a reference C6 value and a reference distance unit.
property
factors
: tuple[float, ...]
Return the current conversion factors set.
method
factors_from_time
(time: float) → tuple[float, ...]
Get factors from a different reference time than the one set.
method
factors_from_energy
(energy: float) → tuple[float, ...]
Get factors from a different reference energy than the one set.
method
factors_from_distance
(distance: float) → tuple[float, ...]
Get factors from a different reference distance than the one set.