Skip to content

External Triggering

Operations in QUA can be triggered by an external trigger in the form of a rising voltage received in the OPX trigger port on the back panel. The trigger can be used to control the timing of events in the program from an external source.

Basic Usage

The usage in QUA is via the wait_for_trigger() function. Basic usage of this feature is performed as follows:

wait_for_trigger(element)

For example, if we want to play a pulse on qe1 after a trigger input, we can write:

wait_for_trigger('qe1')
play('qe1_pulse','qe1')

We can also specify a constant pulse to be played while the element is waiting for trigger.

wait_for_trigger('qe1', 'wait_pulse')

The pulse 'wait_pulse' will be played continuously until the arrival of the trigger signal.

Note

The external trigger port is sampled at a frequency of 250 MHz. Therefore, the temporal resolution is 4 ns.

Triggering Multiple Elements

When we want to trigger multiple elements in the same controller, (i.e., same trigger signal), we can simply write multiple wait_for_trigger() commands. For example:

wait_for_trigger('qe1', 'wait_pulse')
wait_for_trigger('qe2', 'wait_pulse')

Alternatively, and in case we don't want to play a wait pulse, we can use the align() command. For example:

wait_for_trigger('qe1')
align('qe1', 'qe2', 'qe3')
play('qe1_pulse','qe1')
play('qe2_pulse','qe2')
play('qe3_pulse','qe3')

In the example above, the three play commends will be executed together after the trigger. Note that any of the three elements can be placed in the wait_for_trigger command.

If we want to pause the entire program until the trigger arrives, we can place an empty align.

wait_for_trigger('qe1')
align()

The program will be paused at this point until the trigger signal arrives.

Trigger in Multiple OPX's

In a system with \(N\) OPX's, there are essentially \(N\) trigger ports that can accommodate \(N\) separate trigger signals. However, each trigger signal can only trigger elements that are configured in the same OPX, i.e., where the elements has it's inputs. If we want a trigger signal to trigger elements in multiple controllers we can either use the align method. Alternatively, a digital output of one OPX can be used to trigger another OPX by directly connecting it to the other's trigger port.

Connectivity in the OPX

QOP Depending on the server version, the external trigger is connected as follows:

The trigger in the OPX+ (Version > QOP200) is connected as follows and can accept up to 3.3V LVTTL.

ext_trigger_OPXp

ext_trigger_OPXp_old

In OPX+ version 2.20 (initial), the external trigger is connected to the right-most AUX2 port. (labeled AUX3, in old back panels) In this version, the maximum allowed voltage is 1.8V and the threshold voltage level is 1.15V

QOP The trigger in the OPX is connected as follows:

OPX1_new

Some OPX back panels are slightly different, the connectivity is as follows:

OPX1_extTrigg

Important

The maximum allowed voltage is 1.8V. The threshold voltage level is 1.15V