SequencerController

class caqtus.device.sequencer.SequencerController(
device_name: DeviceName,
shot_event_dispatcher: ShotEventDispatcher,
)

Bases: DeviceController

Controls a sequencer during a shot.

async run_shot(
sequencer: SequencerProxy,
/,
sequence: TimedInstruction,
*args,
**kwargs,
) None

Runs a shot on the device.

This method must call wait_all_devices_ready() exactly once.

Parameters:
  • device – An asynchronous proxy to the device being controlled.

  • args

    Extra arguments than can be computed before the shot and that are required to run the shot.

    These arguments are at the discretion of the subclass implementation.

  • kwargs

    Extra arguments than can be computed before the shot and that are required to run the shot.

    These arguments are at the discretion of the subclass implementation.

A typical implementation can look like this:

async def run_shot(self, device, instruction):
    await device.program(instruction)
    await self.wait_all_devices_ready()
    await device.trigger()

    data = await device.read_data()
    self.signal_data_acquired("some label", data)

Warning

Implementations of this method must be careful to handle cancellation at a checkpoint in case the shot is aborted.