Skip to content

Qblox Pulse Stacking

David Vos requested to merge qblox_stacking_pulses into main

Explanation of changes

stack_pulses is a new compilation node added in qblox_backend before all other node (the next one is compile_long_square_pulses_to_awg_offsets).
stack_pulses calls _construct_pulses_by_port_clock which returns a dict where the pulses are ordered by port clock with PulseInfo.
PulseInfo is a dataclass which has as attributes time, is_end and schedulable_key.
These attributes are needed for the algo linked in the following sentence,
stack_pulses then loops through the port clocks and calls _construct_pulses_by_interval which implements the algorithm found in Split overlapping ranges into all unique ranges.
This returns a list of PulseInterval which is a dataclass and has as members start_time, end_time and pulse_keys.
Thus every PulseInterval describes an interval where the schedulable keys found in pulse_keys are the pulses playing between start_time and end_time.
If there are any overlapping pulses (so if there is any PulseInterval where len(pulse_keys) > 1 the method _stack_pulses_by_interval is called.

 

_stack_pulses_by_interval cycles through the list of PulseInterval and checks if the contained pulse_keys are all square pulses, if so it calls _stack_square_pulses otherwise it calls _stack_arbitrary_pulses.
It also keeps tracks of all processed pulse_keys and is responsible for deleting them from Schedule

 

_stack_square_pulses makes a stacked square pulse by copying the original operation and changing the t0 and duration.
It then loops through the other square pulses and simply sums the amplitudes.
Finally it calls _create_schedulable to make and insert a new schedulable with the stacked square pulse.

_stack_arbitrary_pulses is a bit more complex as it has to get the total waveform of the pulses being processed and calculate the start and end indices of the waveform it needs.
It then sums up all the waveform playing within this interval and makes a SimpleNumericalPulse with the new stacked waveform.
Finally it calls _create_schedulable to make and insert a new schedulable with the SimpleNumericalPulse.

Motivation of changes

Being able to stack pulses is a prerequisite for crosstalk compensation, which will be introduced in a later MR.


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer.
  • New code is covered by unit tests (or N/A).
  • New code is documented and docstrings use numpydoc format (or N/A).
  • New functionality: considered making private instead of extending public API (or N/A).
  • Public API changed: added @deprecated and entry in deprecated code suggestions (or N/A).
  • Newly added/adjusted documentation and docstrings render properly (or N/A).
  • Pipeline fix or dependency update: post in #software-for-developers channel to merge main back in or update local packages (or N/A).
  • Tested on hardware (or N/A).
  • CHANGELOG.md and AUTHORS.md have been updated (or N/A).
  • Update Hardware backends documentation if backend interface change or N/A
  • Check whether performance is significantly affected by looking at the Performance metrics results.
  • Windows tests in CI pipeline pass (manually triggered by maintainers before merging).
    • Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline

For reference, the issues workflow is described in the contribution guidelines.

Edited by David Vos

Merge request reports

Loading