TriggerableDeviceCompiler
- class caqtus.device.sequencer.compilation.TriggerableDeviceCompiler(
- device_name: DeviceName,
- sequence_context: SequenceContext,
Bases:
DeviceCompiler,ProtocolDefines the interface for a compiler that can compute the trigger of a device.
The interface defined by this class is used when a sequencer is programmed to output the trigger for a device on one of its channels. To compute the trigger, the sequencer inspects the other device compiler and checks that it is a
TriggerCompiler. If that is the case, the sequencer calls the methodcompute_trigger()of the other device compiler to know what to output.- compute_trigger(
- sequencer_time_step: TimeStep,
- shot_context: ShotContext,
Compute the trigger to be output for the associated device.
The default implementation of this method provides a simple trigger that is high for the first half of the shot and low for the second half.
- Parameters:
sequencer_time_step – The time step of the sequencer that need to output the trigger values, in ns.
shot_context – Contains information about the shot being compiled.
- Returns:
A boolean sequencer instruction containing the values that the trigger channel of the sequencer should take. The length of this instruction must be the number of ticks in the shot for the sequencer time step.