Skip to content

Deduplicate pulse waveforms #1382

@alecandido

Description

@alecandido

Note

We need this algorithm for Qblox, but then it can be reused for all drivers.

Most hardware has no built-in support to play specific waveforms, and then it resorts to the individual samples' specification (Qblox is an example).

There are two different paths through which a waveform can become part of the uploaded set: either it is part of the original program/sequence, or it is generated as part of a memory sweep #1384.
All the generated waveforms need to be uniquely indexed.

These two different sets need separate considerations regarding deduplication.

Isolated pulses

Pulses which are explicitly included in the execution can be compared based on their parameters (#1381), and consequently deduplicated, maintaining the mapping from the acquisition identifier (and component, I/Q) to the unique sets of parameters.

These parameters will be later converted to sampled data through function evaluation.

Memory-swept

In this case, there is nothing to deduplicate - by definition, the sweeper will generate different envelopes.
But since indexing all these waveforms is required, together with the others, their generation has to be taken into account for the indexing part.

The best solution is probably to create different "sections", and generate all the index-less waveform for both memory-swept and isolated pulses separately, and only generate the final indices as the last step.

Since contiguity of memory-swept waveforms is strictly required, it is better to place this as the first section, just to avoid the extra step of shifting all the indices by a variable amount.
If zero-pulse deduplication is applied (cf. below), it has to be taken already into account within the section, since it changes the swept step size for the involved sweepers (2*n -> n, because of the elimination of one of the two components), and it will make use of different parameters for the play instruction (only one register).

Isolated within swept

A more intricate (and much less required) deduplication can happen if an isolated pulse happens to be part of a sweep.

E.g. a Rabi duration-like experiment followed by an individual non-swept pulse.

It is not extremely hard to deduplicate also the isolated pulse, if the samples exactly match. But it is quite hard to imagine a scenario when this deduplication would result in a sizable waveform-memory saving.

Zero pulse

This is especially relevant since some pulses will often generate a null quadrature component.

For isolated pulses, this is straightforward, but it requires to be applied to samples to be most effective - since different envelopes may result in a null waveform for a single component.
This will demand a second pass for samples' inspection and indices' attribution (going through something similar to the indexless used in the first iteration of the Qblox driver).

For memory-sweeps, this is only possible if one of the two components is exactly zero for all the values in the sweeps. In which case, even the register for that component could be saved, and just sweep one of the two components.

A single zero-waveform is required, because until the real-time queue is not empty, the control sequencer will generate zero samples if the memory is exhausted ahead of time. Indeed, that is exactly the same mechanics involved in wait instructions.
Consequently, a single waveform is needed, with a single zero sample (even empty - but I just it would not be allowed).

Important

Even in the unlikely case in which both components are made of a single zero-sample - because of some degeneracy - this is not going to violate the scheduled duration in Qblox's Q1ASM, since the duration is embedded in the third parameter of the play instruction, and further zero-samples are generated by the default playback mechanism.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions