Skip to content

Long pulses - #1492

Draft
jevillegasd wants to merge 4 commits into
qiboteam:mainfrom
jevillegasd:long_pulses
Draft

Long pulses#1492
jevillegasd wants to merge 4 commits into
qiboteam:mainfrom
jevillegasd:long_pulses

Conversation

@jevillegasd

Copy link
Copy Markdown

Add a Long Pulse object to qibolab. This generates rectangular pulses using the awg_offsets instead of the waveform.

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

@lballerio lballerio linked an issue Jun 17, 2026 that may be closed by this pull request
phase_post = [Move(source=minus_phase, destination=Registers.phase_delta.value)]

if duration_sweep:
hold: list[Instruction] = [Wait(duration=duration_sweep[ParamRole.DURATION])]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substract the 4 from the register here.

value_0=int(convert(pulse.amplitude, Parameter.amplitude)), value_1=0
),
Line(
instruction=UpdParam(duration=4),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of fixing this to 4, we can pass here a register, and remove the hold (wait instruction), which will be the duration of the pulkse.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1495 will support the arbitrary long (but fixed) durations. Even #1465 has been extended to mention the arbitrary instruction with long duration sweepers (excluding pulse duration sweepers).

+ hold
+ phase_post
+ [SetAwgOffs(value_0=0, value_1=0)]
# Line(instruction=UpdParam(duration=4))] # This may be neeed if this is the last pulse in the sequence, otherwise it will never turn off the tone.

@alecandido alecandido Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the Qblox documentation is a bit misleading about this point. But eventually clear.

Some classical instructions like set_awg_offs and set_freq change special latched registers in the FPGA. These registers hold or latch the value until a RT instruction (such as upd_param or play) applies them to the parts of the sequencer that deal with signals.
[...]

2. The wait RT instruction does not update latched parameters.

https://docs.qblox.com/en/v2026.04.0/products/architecture/sequencers/sequencer.html#latched-instructions
(emphasis mine)

So, if you want to make sure to end your pulse at the correct time, you need to append an upd_param instruction. Otherwise, it may happen to be the last instruction before reset, and your pulse will last for all the time of the reset itself (if done through relaxation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimized implementation for rectangular pulses

2 participants