Skip to content

Timing Rules

LabOne Q follows strict rules to determine the timing of pulses and sections in the sample-precise, real-time parts of an experiment. In the following, these rules are presented in an abstract, but unambiguous way. The documentation chapter on Sections and Pulses gives a more descriptive introduction.

In case the requirements for pulse and section timings defined in the DSL cannot be fulfilled, LabOne Q raises an error.

Definitions

Pulse

A pulse describes a waveform. A pulse can either be defined through its functional form (drawn from the pulse library), or as a sequence of samples (a numpy array). Pulses are played on experiment signal lines as part of the experiment definition.

Signals

Experiment Signals provide an abstract line on which pulses can be laid out during the experiment definition.

Logical Signals have a 1-to-1 mapping to Experiment Signals. Each logical signal is linked to physical instrument channels and possesses calibration properties.

Note

The section on Logical Signal Lines explains the signal lines and types in greater detail.

Sections

Sections help the user structure their experiment into logical units with predictable timing relations. Sections can contain either other sections or pulses.

Sections govern the timing and order of the pulses or sub-sections they contain. Sections are said to "use" all experiment signals that they contain either directly or through their sub-sections.

Rules

The following list is a consistent set of rules that determine the timing of pulses played as part of any Experiment in LabOne Q.

  1. Pulses are bound to signals.

  2. Sections may contain pulses or other sections. Sections that are executed in sample-precise real-time may contain either other sections or pulses, but not both.

  3. A section is bound to the signals it contains, as well as to the union of all signals its child sections contain.

  4. Signals that are used in a section A cannot be accessed at the same time in any other section which is not a subsection of section A.

  5. When discretizing time, LabOne Q distinguishes two different timing grids, see also the table below:

    1. The signal timing grid has its time step equal to the sampling period of a particular signal. A signal's sampling period is determined at compile time and depends on the physical output channel the signal is mapped to.

    2. The system timing grid uses the inverse of the greatest common divisor (GCD) of the clock rates of all the sequencers involved in a program. This is sometimes called the commensurate timing grid.

  6. Pulses are aligned to the signal timing grid of the signal lines they are bound to.

  7. Sections are aligned to the signal or system timing grid, depending on their contents with a few exceptions.

    1. If all the signals in a section share the same timing grid, the section is also aligned to this signal timing grid.

    2. Sections are aligned to the system timing grid when:

      • They contain signals with different signal timing grids

      • When they govern parameter sweeps or acquisition loops

      • When they contain an acquisition statement

      • When they emit triggers (see here to learn more)

      • When they contain sub-sections that are aligned to the system timing grid

  8. The length of a section can be

    1. Determined automatically by the length and placement of pulses played on the signals within that section, including subsections.

    2. Specified by the user. Then, the section length specified in the DSL is the minimum length the section must have.

    If required by the rest of the timing rules, the compiler will schedule a gap at the beginning or end of the section depending on the type of alignment that sections (see Rule 12).

  9. Pulses on the same signal are scheduled sequentially, and pulses on separate signals are scheduled in parallel, unless prevented by user-defined constraints on the section level.

  10. Sections are scheduled in parallel if there is no overlap in the signals they use, and unless prevented by user-defined constraints (see here and here).

  11. Sections can be left aligned or right aligned.

    1. The content of left-aligned sections is constructed from left to right, with a start point determined by the timing grid of that section. All elements are scheduled to be played as early as possible, given all constraints. If necessary, the section is extended to the right to bring its end to the relevant timing grid.

    2. The content of right-aligned sections is constructed from right to left, with an endpoint determined by the timing grid of that section. All elements are scheduled to be played as late as possible, given all constraints. If necessary, the section is extended to the left to bring its start to the relevant timing grid.

  12. The alignment of a section applies to all pulses or sections directly contained within the first section, but does not propagate to its sub-sections.

Table 1: Signal and system timing grids for single instruments and instrument combinations.
Instruments Signal Timing Grid [ns] System Timing Grid [ns]
HDAWG 1/2.4 ≃ 0.417 16/2.4 ≃ 6.67
UHFQA 1/1.8 ≃ 0.556 8/1.8 ≃ 4.45
SHF* 1/2 = 0.5 16/2 = 8
HDAWG + UHFQA N/A 1000/GCD\(\left(\frac{2400}{16}, \frac{1800}{8}\right)\) ≃ 13.3
HDAWG + SHF* 1/2 = 0.5 16/2 = 8

Grid Alignment Exceptions

  • All sections containing branching statements (e.g., for active reset) where feedback data is routed globally are aligned to a 200 ns grid.

  • Oscillator phase resets for signals on SHF series of instruments are aligned to a 40 ns grid.