Skip to content

Commit

Permalink
Merge pull request #1077 from qiboteam/qm-int
Browse files Browse the repository at this point in the history
Handle integer pulse duration in QM
  • Loading branch information
stavros11 authored Oct 29, 2024
2 parents 3f6d2dd + 77ede74 commit f74c334
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 f74c334

Please sign in to comment.