Experiment Manager

In this page, we outline the structure for the components of ExperimentManager.

The ExperimentManager class is the control entry point for users. It manages experiment sequences (Sequence) that are scheduled, converts sequences to AWG data, and programs the data onto AWGs, and executes the sequences.

Config

All AWG-specific information is defined in the config TOML file used to build the ExperimentManager. The config file is parsed and validated by load_hardware_config().

Planner

Planner handles scheduling experiment sequences and preparation for these sequences. It is defined as the planner attribute in ExperimentManager.

It saves a list of sequences that are scheduled, and controls the iteration through each sequence. It talks to the Programmer (see below) to program the AWG memory and segment steps when needed. It also uses segmenters (Segmenter) to convert the functions defined in the sequences to AWG data.

Segmenter

Each AWG instrument has a corresponding Segmenter object, defined as an element of the _segmenters attribute in Planner.

The segmenter converts functions in each Step of the sequence to Segment objects that stores data recognizable by the AWG instrument that it controls.

Programmer

Programmer handles programming of the AWGs. It is defined as the programmer attribute in ExperimentManager.

It uses devices (Device) to communicate with each AWG.

Device

Each AWG instrument has a corresponding Device object, defined as an element of the devices attribute in Programmer.

The device class defines AWG protocol for operations such as load AWG data, set steps and repeats, start, and stop. Typically the device class uses a driver / header class that implements the AWG protocol.

The Device class and the Segmenter class must be designed in tandem to correctly operate the AWG.

Public methods of the ExperimentManager class

schedule()

Calls Planner.schedule(), which adds the sequences to the schedule list.

setup()

Calls Planner.setup(), which generates the Segment objects.

program_next_sequence()

Calls Planner.program_next_sequence(), which programs the AWG memory via Programmer.program_memory_single_device(), and programs the AWG segment steps via Programmer.program_segment_step_single_device().

run()

Calls Programmer.run(). Executes the sequence.

wait_until_complete()

Calls Programmer.wait_until_complete(). Waits for the sequence to complete execution.

set_principal_device_trigger()

Calls Programmer.set_principal_device_trigger(). Sets the trigger state on the principal device.