diff --git a/src/qibolab/_core/instruments/qm/controller.py b/src/qibolab/_core/instruments/qm/controller.py index 805196556..ed06c9531 100644 --- a/src/qibolab/_core/instruments/qm/controller.py +++ b/src/qibolab/_core/instruments/qm/controller.py @@ -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."