Skip to content

Commit

Permalink
fix: alignment when sweeping duration of baked pulses
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Mar 14, 2024
1 parent e288bd2 commit 6496316
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/qibolab/instruments/qm/sweepers.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ def _sweep_duration(sweepers, qubits, qmsequence, relaxation_time):
qmpulse = qmsequence.pulse_to_qmpulse[pulse.serial]
qmpulse.swept_duration = dur
# find all pulses that are connected to ``qmpulse`` and align them
to_process = set(qmpulse.next_)
while to_process:
next_qmpulse = to_process.pop()
to_process |= next_qmpulse.next_
qmpulse.elements_to_align.add(next_qmpulse.element)
next_qmpulse.wait_time -= qmpulse.wait_time + qmpulse.duration // 4
if not isinstance(qmpulse, BakedPulse):
to_process = set(qmpulse.next_)
while to_process:
next_qmpulse = to_process.pop()
to_process |= next_qmpulse.next_
qmpulse.elements_to_align.add(next_qmpulse.element)
next_qmpulse.wait_time -= qmpulse.wait_time + qmpulse.duration // 4

_sweep_recursion(sweepers[1:], qubits, qmsequence, relaxation_time)

0 comments on commit 6496316

Please sign in to comment.