Skip to content

Commit

Permalink
Merge branch 'main' into qibo_patch_0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim committed Nov 4, 2024
2 parents b486a8f + f74c334 commit a336f63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
rev: v3.19.0
hooks:
- id: pyupgrade
- repo: https://github.com/hadialqattan/pycln
Expand All @@ -35,7 +35,7 @@ repos:
args:
- --config=pyproject.toml
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.0
rev: 1.19.1
hooks:
- id: blacken-docs
- repo: https://github.com/pycqa/pydocstyle
Expand Down
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 a336f63

Please sign in to comment.