Skip to content

Commit

Permalink
fix: pad delays with one clock cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Aug 13, 2024
1 parent 34e2893 commit 206cbe7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qibolab/instruments/qm/program/instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 206cbe7

Please sign in to comment.