atomiq.atomiq module

class atomiq.atomiq.AtomiqExperiment(managers_or_parent, name=None, arg_provider=None, component_map=None, *args, **kwargs)[source]

Bases: EnvExperiment

CHUNKSIZE = 10
components = ['log']
arg_provider = <atomiq.arguments.arguments.NativeArgumentProvider object>
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()

chunker(mult_scan, size=100)[source]

Generator to call a kernel with chunks of scan points.

Parameters:

size (artiq.compiler.types.TMono('int', OrderedDict([('width', artiq.compiler.types.TValue(32))])))

Return type:

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.

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.

analyze()

Entry point for analyzing the results of the experiment.

This method may be overloaded by the user to implement the analysis phase of the experiment, for example fitting curves.

Splitting this phase from run() enables tweaking the analysis algorithm on pre-existing data, and CPU-bound analyses to be run overlapped with the next experiment in a pipelined manner.

This method must not interact with the hardware.

class atomiq.atomiq.AtomiqBlock(*args, **kwargs)[source]

Bases: AtomiqExperiment

CHUNKSIZE = 10
analyze()

Entry point for analyzing the results of the experiment.

This method may be overloaded by the user to implement the analysis phase of the experiment, for example fitting curves.

Splitting this phase from run() enables tweaking the analysis algorithm on pre-existing data, and CPU-bound analyses to be run overlapped with the next experiment in a pipelined manner.

This method must not interact with the hardware.

arg_provider = <atomiq.arguments.arguments.NativeArgumentProvider object>
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()

chunker(mult_scan, size=100)

Generator to call a kernel with chunks of scan points.

Parameters:

size (artiq.compiler.types.TMono('int', OrderedDict([('width', artiq.compiler.types.TValue(32))])))

Return type:

TList

components = ['log']
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 Phases and Chunking documentation.

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 Phases and Chunking documentation.

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 Phases and Chunking documentation.

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 Phases and Chunking documentation.

poststep(point)

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)

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.

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 Phases and Chunking documentation.

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()

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 Phases and Chunking documentation.

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 Phases and Chunking documentation.

prestep(point)

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.

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 Phases and Chunking documentation.

step(point)

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.

terminate()

Terminate the running experiment as soon as possible. Normally this means after the current chunk.