qfabric.manager

experiment_manager

class qfabric.manager.experiment_manager.ExperimentManager(config_path)

Bases: object

Experiment sequence manager.

This is the public interface to control AWG devices.

If controlling individual AWGs is needed, use programmer.

Parameters:

config_path (str) – Path to the config file.

planner

Sequence scheduling object.

Type:

Planner

programmer

AWG programming interface.

Type:

Programmer

schedule(sequences, repeats=1)

Schedules sequences with repeats.

Parameters:
  • sequences (Sequence | list[Sequence]) – A single sequence or a list of sequences.

  • repeats (int) – Number of repeats for sequences. Default 1.

Returns:

List of sequence indices scheduled.

Return type:

list[int]

setup(program_single_sequence_only=False)

Prepares execution of the sequences.

This must be called before calling program_next_sequence. It sends steps in all scheduled sequences to segmenters to produce AWG segments.

Parameters:

program_single_sequence_only (bool) – Whether to only program the next sequence. If True, attempts to program as many sequences as possible to fit in the AWG memory.

property scheduled_sequence_indices: list[int]

Returns: list[int]: List of indices of scheduled sequences.

program_next_sequence()

Programs the AWG memory and segment orders and repeats for the next scheduled sequence.

Returns:

next scheduled sequence object.

Return type:

Sequence

run(wait_for_finish=True)

Runs the next sequence.

Parameters:

wait_for_finish (bool) – Whether to wait for sequence to finish.

wait_until_complete()

Waits for the sequence to finish.

stop()

Stops the sequence.

set_principal_device_trigger(external)

Sets the principal AWG device trigger mode.

Parameters:

external (bool) – If False, software trigger is used.

config

class qfabric.manager.config.SegmenterConfig(**data)

Bases: BaseModel

Config for the Segmenter class.

Additional arguments for custom Segmenter are allowed.

model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class qfabric.manager.config.DeviceConfig(**data)

Bases: BaseModel

Config for the Device class.

Additional arguments for custom Device are allowed.

model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class qfabric.manager.config.AWGConfig(**data)

Bases: BaseModel

Config for a single AWG device.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class qfabric.manager.config.StartStepConfig(**data)

Bases: BaseModel

Config for an optional start step.

The start step is inserted at the begining of each sequence.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class qfabric.manager.config.StopStepConfig(**data)

Bases: BaseModel

Config for an optional stop step.

The stop step is appened at the end of each sequence.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class qfabric.manager.config.HardwareConfig(**data)

Bases: BaseModel

Config for a system of AWGs.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

qfabric.manager.config.load_hardware_config(path)

Loads config file.

Parameters:

path (str) – Path to the config file.

Returns:

Hardware config object.

Return type:

HardwareConfig