From 206cbe7bb777eb0b13efa0efbe0197e26440b86c Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:36:05 +0400 Subject: [PATCH] fix: pad delays with one clock cycle --- src/qibolab/instruments/qm/program/instructions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qibolab/instruments/qm/program/instructions.py b/src/qibolab/instruments/qm/program/instructions.py index 6e89285c5..60602aa66 100644 --- a/src/qibolab/instruments/qm/program/instructions.py +++ b/src/qibolab/instruments/qm/program/instructions.py @@ -18,17 +18,17 @@ def _delay(pulse: Delay, element: str, parameters: Parameters): # TODO: How to play delays on multiple elements? if parameters.duration is None: - duration = int(pulse.duration) // 4 + 1 + duration = int(pulse.duration) // 4 else: duration = parameters.duration - qua.wait(duration, element) + qua.wait(duration + 1, element) def _play_multiple_waveforms(element: str, parameters: Parameters): """Sweeping pulse duration using distinctly uploaded waveforms.""" - with qua.switch_(parameters.duration): + with qua.switch_(parameters.duration, unsafe=True): for value, sweep_op in parameters.pulses: - with qua.case_(value): + with qua.case_(value // 4): qua.play(sweep_op, element)