Skip to content

Commit

Permalink
write_to_waveform_memory to raise ToolkitError
Browse files Browse the repository at this point in the history
  • Loading branch information
markheik committed Apr 17, 2023
1 parent 3fca1ed commit e1b4099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zhinst/toolkit/driver/devices/shfqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from zhinst.toolkit.driver.nodes.readout import Readout
from zhinst.toolkit.driver.nodes.shfqa_scope import SHFScope
from zhinst.toolkit.driver.nodes.spectroscopy import Spectroscopy
from zhinst.toolkit.exceptions import ToolkitError
from zhinst.toolkit.interface import SHFQAChannelMode
from zhinst.toolkit.nodetree import Node, NodeTree
from zhinst.toolkit.nodetree.helper import (
Expand Down Expand Up @@ -74,9 +75,9 @@ def write_to_waveform_memory(
len(pulses.keys()) > 0
and max(pulses.keys()) >= self._max_qubits_per_channel
):
raise RuntimeError(
raise ToolkitError(
f"The device only has {self._max_qubits_per_channel} qubits per channel"
f", but {max(pulses.keys())} where specified"
f", but {max(pulses.keys())} were specified."
)
with create_or_append_set_transaction(self._root):
if clear_existing:
Expand Down

0 comments on commit e1b4099

Please sign in to comment.