Skip to content

Triggers and Markers

With LabOne Q, you can use the 'Marker Output' channels of the HDAWG, SHFSG, or SHFQC1 to generate trigger output signals. There are two ways to generate trigger output signals on the 'Marker Output' channel of these instruments, which differ mainly in their precision and thus cover different use cases:

  • Output Marker: these are digital marker bits and part of the waveform. Therefore, they are recommended when precise timing is required and/or complicated serial bit patterns need to be played on the Marker front panel output.

  • AWG Trigger: these are translated into sequencer instructions. Therefore, they are independent of the pulses that are played and are recommended when a more flexible and less timing-precise trigger signal is required

For more details on triggers and markers on the hardware level, please refer to the respective instrument manual. The following sections give more details on the two types of trigger output signals and how to use them in the LabOne Q DSL.

Using AWG Triggers

Let's have a look at the concept of AWG triggers. In LabOne Q, AWG triggers are always part of a section and can be enabled by adding a dictionary with the AWG trigger configuration as an argument in the section definition. The section is otherwise constructed as usual.

trigger_section = Section(
    uid = "trigger_section",
    length = 500e-9,
    trigger = {"drive": {"state": 1}},
    )
# add section content here
# e.g. trigger_section.play(signal="drive", pulse=x180)

The dictionary defining the AWG trigger contains the ExperimentSignal lines where the AWG trigger signal will be played. Following the mapping of the ExperimentSignal line to the LogicalSignal line, the AWG trigger will be played on the corresponding physical output of the instrument.

Since the AWG trigger signal is defined on the section level, the length of the AWG trigger signal is defined by the length of the section.

The following table summarizes all possible combinations of signal line type and trigger state.

Table 1: AWG Trigger Properties
Instrument Type of signal line State argument Result
HDAWG iq_signal 0 No trigger signal.
  1 AWG trigger 1 enabled. Plays on first output of IQ signal pair.
  2 AWG trigger 2 enabled. Plays on second output of IQ signal pair.
  3 Both AWG triggers enabled. Plays on both outputs of IQ signal pair.
  rf_signal 0 No trigger signal.
  1 AWG trigger enabled. Plays on marker output channel of the corresponding physical channel.
SHFSG and SHFQC1 iq_signal 0 No trigger signal.
  1 AWG trigger enabled. Plays on marker output channel of the corresponding physical channel.

Using Output Markers

In LabOne Q, output markers are always part of a play instruction in the experiment and can be enabled by adding a dictionary with the marker configuration to the marker argument.

Note

Be careful of markers and triggers mapped to the same logical signal line! Markers cannot appear in sections where a trigger is present if they are mapped to the same line, as they would use the same physical output on the instrument.

exp.play(
    signal = "drive",
    pulse = my_pulse,
    # use other arguments as usual
    # ...
    marker = {"marker1": {"enable": True}, "marker2": {"enable": False}},
    )

In the above example, the marker will be high for the duration of the pulse. However, markers can also be given start and length arguments, which determine where the start of the marker is relative to the beginning of the pulse. If the length is longer than the pulse length, the marker will be clipped to fit within the pulse duration.

exp.play(
    signal="drive",
    pulse=my_pulse,
    marker={"marker1":{"start": 10e-9, "length": 100e-9}}
    )

Markers can also be played without a specified pulse. In this case, the drive signal line won't be available for other pulses to be played until the end of the marker. If pulses and markers are desired simultaneously, then the above combination of a pulse with a marker should be used.

exp.play(
    signal="drive",
    pulse=None,
    marker={"marker1":{"start": 10e-9, "length": 50e-9}}
    )

Since there is only one marker output per analog output, the number of markers that are available in the play instruction depends on the type of the corresponding signal line and the instrument. The following table summarizes the available combinations.

Table 2: Marker Output Properties
Instrument Type of signal line Keys Values
HDAWG iq_signal marker1 and/or marker2 {"enable" : True / False}
  {'start': float, 'length': float}
  rf_signal marker1 {"enable" : True / False}
  {'start': float, 'length': float}
SHFSG and SHFQC1 iq_signal marker1 {"enable" : True / False}
  {'start': float, 'length': float}

  1. Only the Markers associated with the Signal Generator channels of the SHFQC are used in LabOne Q.