atomiq¶
Submodules¶
Attributes¶
Classes¶
Base class for top-level experiments that use the |
|
Base class for top-level experiments that use the |
Functions¶
Checks if a Python object is a top-level experiment class. |
Package Contents¶
- atomiq.__version__ = '0.1.4'¶
- class atomiq.AtomiqExperiment(managers_or_parent, name=None, arg_provider=None, component_map=None, *args, **kwargs)[source]¶
Bases:
artiq.language.environment.EnvExperimentBase class for top-level experiments that use the
HasEnvironmentenvironment manager.Most experiments should derive from this class.
- CHUNKSIZE = 10¶
- TAGS = []¶
- components = ['log']¶
- arg_provider¶
- _components = []¶
- _blocks = []¶
- name¶
- component_map = None¶
- clock_at_start¶
- identifier¶
- step_counter = 0¶
- run_id = 0¶
- __terminate_asap__ = False¶
- _import_from_block(blkdata)[source]¶
This uses monkey patching of the class to make members available to the current experiment
- Parameters:
blkdata (dict) -- Block data with the keys "class", "map", "alias"
- _add_to_hook_handler(obj_list)[source]¶
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.
- Parameters:
obj_list -- list of child objects relative to self (e.g. 'modulator.rfsource.switch') for which the hook should be called
- prepare()[source]¶
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()
- build()[source]¶
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()
- _set_identifiers_in_master(identifier, run_id, step_counter)[source]¶
makes an rpc call to set the identifier in the master
- chunker(mult_scan, size=100)[source]¶
Generator to call a kernel with chunks of scan points.
- Parameters:
size (artiq.language.types.TInt32)
- Return type:
artiq.language.types.TList
- _loop_chunks(chunk_list)[source]¶
Loop over a list of chunks in the host, i.e. iterate over starting kernels holding CHUNKSIZE experiments
- Parameters:
chunks -- (list) list of chunks. Each entry is again an iterable with CHUNKSIZE Scanpoint objects inside
chunk_list (artiq.language.types.TList)
- run()[source]¶
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 Phases and Chunking documentation.
- terminate()[source]¶
Terminate the running experiment as soon as possible. Normally this means after the current chunk.
- prerun()[source]¶
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 Phases and Chunking documentation.
- prerun_host()[source]¶
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 Phases and Chunking documentation.
- postrun()[source]¶
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 Phases and Chunking documentation.
- postrun_host()[source]¶
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 Phases and Chunking documentation.
- prestep(point)[source]¶
Kernel entry point, run before every step. This method can be overloaded by the user. Details can be found in the Phases and Chunking documentation.
- poststep(point)[source]¶
Kernel entry point, run after every step. This method can be overloaded by the user. Details can be found in the Phases and Chunking documentation.
- prechunk(points)[source]¶
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 Phases and Chunking documentation.
- postchunk(points)[source]¶
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 Phases and Chunking documentation.
- prechunk_host(points)[source]¶
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 Phases and Chunking documentation.
- postchunk_host(points)[source]¶
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 Phases and Chunking documentation.
- abstractmethod step(point)[source]¶
Kernel entry point, for the main experiment sequence code. This method must be overloaded by the user. Details can be found in the Phases and Chunking documentation.
- class atomiq.AtomiqBlock(*args, **kwargs)[source]¶
Bases:
AtomiqExperimentBase class for top-level experiments that use the
HasEnvironmentenvironment manager.Most experiments should derive from this class.
- experiment¶
- atomiq.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
- atomiq.old_globals¶