atomiq ====== .. py:module:: atomiq Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/atomiq/arguments/index /autoapi/atomiq/atomiq/index /autoapi/atomiq/components/index /autoapi/atomiq/frontend/index /autoapi/atomiq/helper/index /autoapi/atomiq/heros/index /autoapi/atomiq/hooks/index /autoapi/atomiq/tools/index Attributes ---------- .. autoapisummary:: atomiq.__version__ atomiq.old_globals Classes ------- .. autoapisummary:: atomiq.AtomiqExperiment atomiq.AtomiqBlock Functions --------- .. autoapisummary:: atomiq.is_experiment Package Contents ---------------- .. py:data:: __version__ :value: '0.1.4' .. py:class:: AtomiqExperiment(managers_or_parent, name=None, arg_provider=None, component_map=None, *args, **kwargs) Bases: :py:obj:`artiq.language.environment.EnvExperiment` Base class for top-level experiments that use the :class:`~artiq.language.environment.HasEnvironment` environment manager. Most experiments should derive from this class. .. py:attribute:: CHUNKSIZE :value: 10 .. py:attribute:: TAGS :value: [] .. py:attribute:: components :value: ['log'] .. py:attribute:: arg_provider .. py:attribute:: _components :value: [] .. py:attribute:: _blocks :value: [] .. py:attribute:: name .. py:attribute:: component_map :value: None .. py:attribute:: clock_at_start .. py:attribute:: identifier .. py:attribute:: step_counter :value: 0 .. py:attribute:: run_id :value: 0 .. py:attribute:: __terminate_asap__ :value: False .. py:method:: _create_atomiq_hero() .. py:method:: _getmro() .. py:method:: _import_from_block(blkdata) This uses monkey patching of the class to make members available to the current experiment :param blkdata: Block data with the keys "class", "map", "alias" .. py:method:: _add_to_hook_handler(obj_list) Add the hooks the objects in obj_list to the experiment hooks such that they are called when processing the hooks. Only if the child object posses a method with the according name of the hook, it will be called. :param obj_list: list of child objects relative to self (e.g. 'modulator.rfsource.switch') for which the hook should be called .. py:method:: _build_blocks() .. py:method:: _build_components() .. py:method:: _build_arguments() .. py:method:: prepare() Prepares components and structure. Called by ARTIQ in the prepare phase, see ARTIQ documentation for more information on experiment phases. .. note:: If you overwrite this method in your experiment, make sure to call `super().prepare()` .. py:method:: _build_core() .. py:method:: _build() .. py:method:: build() Initializes arguements. Called by ARTIQ in the build phase, see ARTIQ documentation for more information on experiment phases. .. note:: If you overwrite this method in your experiment, make sure to call `super().build()` .. py:method:: _prerun_core(reset=False) .. py:method:: _set_identifiers_in_master(identifier, run_id, step_counter) makes an rpc call to set the identifier in the master .. py:method:: chunker(mult_scan, size = 100) Generator to call a kernel with chunks of scan points. .. py:method:: _loop_chunks(chunk_list) Loop over a list of chunks in the host, i.e. iterate over starting kernels holding CHUNKSIZE experiments :param chunks: (list) list of chunks. Each entry is again an iterable with CHUNKSIZE Scanpoint objects inside .. py:method:: _run_init() .. py:method:: run() Run entry point for ARTIQ, see ARTIQ documentation for more information on experiment phases. .. warning:: Do not implement this entry point in your experiment. Use the provided sub-phases (`prerun`, `step`, etc.) More information can be found in the :ref:`phases_chunking` documentation. .. py:method:: _runchunk(points) .. py:method:: terminate() Terminate the running experiment as soon as possible. Normally this means after the current chunk. .. py:method:: prerun() Kernel entry point, run once at the beginning of the run phase of an experiment. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: prerun_host() Host entry point, run once at the beginning of the run phase of an experiment. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: postrun() Kernel entry point, run once at the end of the run phase of an experiment. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: postrun_host() Host entry point, run once at the end of the run phase of an experiment. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: prestep(point) Kernel entry point, run before every step. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: poststep(point) Kernel entry point, run after every step. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: prechunk(points) Kernel entry point, run once at the beginning of a chunk. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: postchunk(points) Kernel entry point, run once at the end of a chunk. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: prechunk_host(points) Host entry point, run once at the beginning of a chunk. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: postchunk_host(points) Host entry point, run once at the end of a chunk. This method can be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:method:: step(point) :abstractmethod: Kernel entry point, for the main experiment sequence code. This method **must** be overloaded by the user. Details can be found in the :ref:`phases_chunking` documentation. .. py:class:: AtomiqBlock(*args, **kwargs) Bases: :py:obj:`AtomiqExperiment` Base class for top-level experiments that use the :class:`~artiq.language.environment.HasEnvironment` environment manager. Most experiments should derive from this class. .. py:attribute:: experiment .. py:method:: _getmro() .. py:function:: is_experiment(o) Checks if a Python object is a top-level experiment class. Monkey patch of the artiq_master function 'artiq.language.environment.is_experiment()' to include Atomiq experiments and blocks in the ignore list .. py:data:: old_globals