Double Buffering#
Added in version 2026.07.0: See the release notes for details.
Note
Double Buffering currently can only be used with control sequencers on the QCM, QCM-RF and QRC modules
Overview#
Double buffering (also known as preloading) is a technique designed to minimize the dead time between sequential experiment runs. It allows you to upload and assemble a new sequence in the instrument’s memory while the sequencer is still actively running the previous sequence.
When to use Double Buffering#
In standard operation, the instrument must stop to compile and upload a new sequence. This causes an idle period (dead time) between runs. If your compilation and upload time are significant relative to your experiment execution time, this idle period can drastically reduce your throughput.
Double buffering is particularly useful for:
Long-running parameter sweeps.
Experiments where sequence preparation is computationally intensive.
High-throughput setups where every millisecond of overhead matters.
Using Double Buffering#
To enable this, you must set the immediate_asm_install parameter to False in your update_sequences call. This
tells the instrument to compile and store the program in the background without stopping the sequencer.
Implementation#
The typical workflow for double buffering follows these steps:
Perform an initial upload of the first sequence to prime the sequencer.
Arm and Start the currently loaded sequence.
Preload the next sequence in the background (with
immediate_asm_install=False) while the hardware is still running the current sequence.Wait for the current sequence to finish.
Go to step 2 for subsequent runs.
Example#
# 1. Initial upload of the first sequence
cluster.update_sequences(sequences=sequence_A, erase_existing=True)
# 2. Arm and Start the sequence
cluster.arm_sequencers(sequencers=seq_targets)
cluster.start_sequencers(sequencers=seq_targets)
# 3. Preload the next sequence (Sequence B)
# immediate_asm_install=False allows this to run in the background
cluster.update_sequences(sequences=sequence_B, immediate_asm_install=False, erase_existing=True)
# 4. Wait for Sequence A to finish
cluster.wait_for_sequencers(sequencers=seq_targets, timeout=10)
The next time you call arm_sequencers and start_sequencers for Sequence B, the installation will be nearly
instantaneous because it has already been preloaded into the background buffer.