diff --git a/src/qibolab/instruments/qm/sweepers.py b/src/qibolab/instruments/qm/sweepers.py index e23b79ebe..3110e1f3d 100644 --- a/src/qibolab/instruments/qm/sweepers.py +++ b/src/qibolab/instruments/qm/sweepers.py @@ -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)