Long pulses - #1492
Conversation
| phase_post = [Move(source=minus_phase, destination=Registers.phase_delta.value)] | ||
|
|
||
| if duration_sweep: | ||
| hold: list[Instruction] = [Wait(duration=duration_sweep[ParamRole.DURATION])] |
There was a problem hiding this comment.
Substract the 4 from the register here.
| value_0=int(convert(pulse.amplitude, Parameter.amplitude)), value_1=0 | ||
| ), | ||
| Line( | ||
| instruction=UpdParam(duration=4), |
There was a problem hiding this comment.
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.
| + 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. |
There was a problem hiding this comment.
Btw, the Qblox documentation is a bit misleading about this point. But eventually clear.
Some classical instructions like
set_awg_offsandset_freqchange special latched registers in the FPGA. These registers hold or latch the value until a RT instruction (such asupd_paramorplay) applies them to the parts of the sequencer that deal with signals.
[...]2. The
waitRT 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).
Add a Long Pulse object to qibolab. This generates rectangular pulses using the awg_offsets instead of the waveform.
Checklist: