Skip to content

Commit

Permalink
fix: handle integer duration in QM
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 authored and alecandido committed Oct 28, 2024
1 parent d16f03f commit 77ede74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qibolab/_core/instruments/qm/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ def register_pulses(self, configs: dict[str, Config], sequence: PulseSequence):
acquisitions (dict): Map from measurement instructions to acquisition objects.
"""
for id, pulse in sequence:
if hasattr(pulse, "duration") and not pulse.duration.is_integer():
if hasattr(pulse, "duration") and not (
isinstance(pulse.duration, int) or pulse.duration.is_integer()
):
raise ValueError(
f"Quantum Machines cannot play pulse with duration {pulse.duration}. "
"Only integer duration in ns is supported."
Expand Down

0 comments on commit 77ede74

Please sign in to comment.