Skip to content

Commit

Permalink
fix: Provide empty sequences for inactive channels
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Jan 20, 2025
1 parent bf2d42b commit 2a9e4f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qibolab/_core/instruments/qblox/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def _prepare(
zip(chs, module.sequencers)
):
sequencers[slot][ch] = idx
config.sequencer(sequencer, address, sequences[ch], acquisition)
config.sequencer(
sequencer, address, sequences.get(ch, Sequence.empty()), acquisition
)

return sequencers

Expand Down
6 changes: 6 additions & 0 deletions src/qibolab/_core/instruments/qblox/sequence/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def from_pulses(
),
)

@classmethod
def empty(cls):
return cls(
waveforms={}, weights={}, acquisitions={}, program=Program(elements=[])
)


def _split_channels(sequence: PulseSequence) -> dict[ChannelId, PulseSequence]:
def unwrap(pulse: PulseLike, output: bool) -> PulseLike:
Expand Down

0 comments on commit 2a9e4f5

Please sign in to comment.