Tips & Tricks

Using the Command Table on SHFSG and HDAWG

For signal playback, both QCCS signal generators can either use a traditional playWave() command or the command table through executeTabeEntry().

LabOne Q supports both modes of waveform playback, and allows you to customize your settings to your requirements. You can do so by using the compiler_settings argument when calling the LabOne Q compiler:

compiled_experiment = my_session.compile(experiment, compiler_settings=settings)
my_results = my_session.run(compiled_experiment)

The settings are a Python dictionary of the form

compiler_settings = {"HDAWG_FORCE_COMMAND_TABLE": True, "SHFSG_FORCE_COMMAND_TABLE": True}

with the default settings

Setting Default value

HDAWG_FORCE_COMMAND_TABLE

False

SHFSG_FORCE_COMMAND_TABLE

True

Setting the Compiler’s Minimal Waveform and Zero Lengths

The compiler of LabOne Q is able to merge short pulses into longer waveforms. Longer waveforms tend to require more of the instruments' waveform memory, but their execution needs fewer (play) instructions. In contrast, short waveforms require less of the instruments' waveform memory, but their execution needs more (play) instructions.

Depending on your specific experiment and the instruments used, setting the minimal waveform length and the minimal length of zeros can help you to find a sweet spot for your experiment-setup combination.

As for the command table, you can enforce these settings by specifying the compiler settings as a dictionary of the form

compiler_settings = {"SHFSG_MIN_PLAYWAVE_HINT": 1024, "SHFSG_MIN_PLAYZERO_HINT": 512}

with the following settings available (the default values are specified in qccs/compiler/compiler_settings.py):

Setting Default value

HDAWG_MIN_PLAYWAVE_HINT

128

HDAWG_MIN_PLAYZERO_HINT

128

UHFQA_MIN_PLAYWAVE_HINT

64

UHFQA_MIN_PLAYZERO_HINT

64

SHFQA_MIN_PLAYWAVE_HINT

64

SHFQA_MIN_PLAYZERO_HINT

64

SHFSG_MIN_PLAYWAVE_HINT

64

SHFSG_MIN_PLAYZERO_HINT

64

Setting the minimal waveform and zero lengths to very small numbers, gapless playback might not be guaranteed anymore, because the sequencer does not find the time to process all instructions until the next waveform should be played, or because the waveform cannot be fetched from the memory fast enough. In this case, an exception will be generated.

With the Randomized Benchmarking example notebook, the following results are found with a gate length of 64 ns corresponding to 128 samples.

SHFSG_MIN_PLAYWAVE_HINT # SeqC lines # generated samples

1024

338

108352

512

458

85824

256

427

28992

128

477

9792