Usage ===== #. Make atomiq available to the python interpreter (see :ref:`Installation`). #. Include your components database as a dictionary into the ARTIQ devicedb under the `components` key. You can either directly write your components into your `device_db.py` or you load it from a different file by adding the following code to your `device_db.py`: .. code-block:: python from components import components import importlib importlib.reload(components) device_db["components"] = components Now the file `components.py` should reside in the same directory as your `device_db.py` and define a dict `components` that contains the definition of the components. The relaod method from the importlib module makes that updates to your components file are properly detected when the artiq master rescans the device db during run time. .. note :: Changes to the device db (and thus the atomiq components) only become available after the artiq master rescanned the device_db.py. This can be triggered by the user by running :code:`artiq_client -s scan-devices` or through the corresponding option when right-clicking the "explorer" view in the artiq dashboard. #. Inherit your Experiments from :class:`~atomiq.atomiq.AtomiqExperiment` like in the following example .. code-block:: python from artiq.experiment import kernel from atomiq import AtomiqExperiment class ATQExperiment(AtomiqExperiment): components = ["aom_cooler"] @kernel def step(self, point): self.log.info("Testmessage from the core") self.aom_cooler.detune(3e6) self.aom_cooler.set_amplitude(0.3) for _ in range(10): self.aom_cooler.pulse(3*ms) delay(4*ms) This example in more elaborate form can be found :ref:`here ` .. note:: Atomiq does not handle the initialization procedure required by some of the Sinara hardware after power cycling to ensure a fast cycle time. Please refer to our :ref:`init example ` for more information. .. tip:: Atomiq provides a modified dashboard, which presents the arguments of an experiment in a more clearly arranged way and adds several other improvements. It can be started from a :code:`nix develop` environment by running :code:`atomiq_dashboard`.