Initializing quantum devices
Each Device
in QoolQit wraps a Pulser device and defines the hardware characteristics that the program will be compiled to and later executed on.
from qoolqit import MockDevice, AnalogDevice
# An example of an ideal device
device_ideal = MockDevice()
# An example of a real device
device_real = AnalogDevice()
Each device has a default unit converter. These are the unit values that will be used when converting an adimensional program in the Rydberg analog model to the physical units of Pulser devices for hardware execution.
The converter handles the logic of converting the adimensional QoolQit model to Pulser units. For theoretical details on how this conversion works between the Rydberg analog model and the implementation that Pulser uses you can check the Rydberg analog model page
By default, each device creates a default converter where the energy unit is set as that device's maximum amplitude. If you make no changes to the device's converter, this means that amplitude values in the range \([0, 1]\) will be converted to values in the range \([0, \Omega_\text{max}]\).
For advanced users, customizing the unit conversion factors is possible.
device_real.set_time_unit(50.0)
device_real.set_energy_unit(10.0)
device_real.set_distance_unit(6.0)
Restoring the default unit converter is also possible.