Skip to content

Commit 29fc5eb

Browse files
committed
obey ACQUISITION_NUMBER limit
1 parent 1aa0c91 commit 29fc5eb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/qibolab/_core/instruments/qblox/cluster.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@
3636
lo_configs,
3737
time_of_flights,
3838
)
39-
from .validate import ACQUISITION_MEMORY, assert_channels_exclusion, validate_sequence
39+
from .validate import (
40+
ACQUISITION_MEMORY,
41+
ACQUISITION_NUMBER,
42+
assert_channels_exclusion,
43+
validate_sequence,
44+
)
4045

4146
__all__ = ["Cluster"]
4247

@@ -118,11 +123,17 @@ def play(
118123

119124
if options.averaging_mode == AveragingMode.SINGLESHOT:
120125
batch_memory = 0
126+
acquisitions = 0
121127
batched_list: list[list[PulseSequence]] = [[]]
122128
for ps in sequences:
129+
# BUG: this assumtion does not hold generally
130+
acquisitions += 1 # assume 1 acquisition per shot
123131
per_shot_memory = get_per_shot_memory(ps, sweepers, options)
124132

125-
if batch_memory + per_shot_memory > ACQUISITION_MEMORY:
133+
if (
134+
batch_memory + per_shot_memory > ACQUISITION_MEMORY
135+
or acquisitions > ACQUISITION_NUMBER
136+
):
126137
batched_list.append([])
127138
batch_memory = 0
128139

0 commit comments

Comments
 (0)