Skip to content

Commit

Permalink
fix: Only upload sequence and synch active sequencers
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Feb 13, 2025
1 parent 9cfc9b8 commit bc1aa77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/qibolab/_core/instruments/qblox/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _execute(
for slot, seqs in sequencers.items():
for ch, seq in seqs.items():
# wait all sequencers
status = self.cluster.get_sequencer_status(slot, seq, timeout=10)
status = self.cluster.get_sequencer_status(slot, seq, timeout=1)
if status.status is not qblox.SequencerStatuses.OKAY:
raise RuntimeError(status)
sequence = sequences.get(ch)
Expand All @@ -194,7 +194,7 @@ def _execute(
if len(seq_acqs) == 0:
# not an acquisition channel, or unused
continue
self.cluster.get_acquisition_status(slot, seq, timeout=10)
self.cluster.get_acquisition_status(slot, seq, timeout=1)
if acquisition is AcquisitionType.RAW:
for name in seq_acqs:
self.cluster.store_scope_acquisition(slot, seq, name)
Expand Down
18 changes: 11 additions & 7 deletions src/qibolab/_core/instruments/qblox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ def sequencer(
acquisition: AcquisitionType,
):
"""Configure sequencer-wide settings."""
# upload sequence
# - ensure JSON compatibility of the sent dictionary
seq.sequence(json.loads(sequence.model_dump_json()))

# configure the sequencers to synchronize
seq.sync_en(True)

config = configs[channel_id]

# set parameters
Expand Down Expand Up @@ -190,3 +183,14 @@ def sequencer(

# connect to physical address
seq.connect_sequencer(address.local_address)

# avoid sequence operations for inactive sequencers, including synchronization
if sequence.is_empty:
return

# upload sequence
# - ensure JSON compatibility of the sent dictionary
seq.sequence(json.loads(sequence.model_dump_json()))

# configure the sequencers to synchronize
seq.sync_en(True)

0 comments on commit bc1aa77

Please sign in to comment.