Skip to content

Commit

Permalink
fix: Filter inactive sequencers from execution
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Feb 13, 2025
1 parent 294be90 commit 9cfc9b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/qibolab/_core/instruments/qblox/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ def _configure(
for idx, ((ch, address), sequencer) in enumerate(
zip(chs, module.sequencers)
):
sequencers[slot][ch] = idx
seq = sequences.get(ch, Q1Sequence.empty())
# configure all sequencers
config.sequencer(
sequencer,
address,
sequences.get(ch, Q1Sequence.empty()),
seq,
ch,
self.channels,
configs,
acquisition,
)
# only collect active sequencers
if not seq.is_empty:
sequencers[slot][ch] = idx

return sequencers

Expand Down
4 changes: 4 additions & 0 deletions src/qibolab/_core/instruments/qblox/sequence/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def empty(cls):
waveforms={}, weights={}, acquisitions={}, program=Program(elements=[])
)

@property
def is_empty(self) -> bool:
return len(self.program.elements) == 0

@property
def integration_lengths(self) -> dict[MeasureId, Optional[int]]:
"""Determine the integration lengths fixed by weights.
Expand Down

0 comments on commit 9cfc9b8

Please sign in to comment.