Skip to content

Commit

Permalink
refactor: Rename q1 sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Jan 28, 2025
1 parent 43a6432 commit 07f41d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/qibolab/_core/instruments/qblox/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .identifiers import SequencerMap
from .log import Logger
from .results import AcquiredData, extract, integration_lenghts
from .sequence import Sequence, compile
from .sequence import Q1Sequence, compile

__all__ = ["Cluster"]

Expand Down Expand Up @@ -112,7 +112,7 @@ def play(

def _configure(
self,
sequences: dict[ChannelId, Sequence],
sequences: dict[ChannelId, Q1Sequence],
configs: Configs,
acquisition: AcquisitionType,
) -> SequencerMap:
Expand All @@ -128,7 +128,7 @@ def _configure(
config.sequencer(
sequencer,
address,
sequences.get(ch, Sequence.empty()),
sequences.get(ch, Q1Sequence.empty()),
ch,
self.channels,
configs,
Expand All @@ -140,7 +140,7 @@ def _configure(
def _execute(
self,
sequencers: SequencerMap,
sequences: dict[ChannelId, Sequence],
sequences: dict[ChannelId, Q1Sequence],
duration: float,
acquisition: AcquisitionType,
) -> dict[ChannelId, AcquiredData]:
Expand Down
4 changes: 2 additions & 2 deletions src/qibolab/_core/instruments/qblox/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qibolab._core.pulses.pulse import PulseId

from .identifiers import SequencerId, SequencerMap, SlotId
from .sequence import Sequence, acquisition
from .sequence import Q1Sequence, acquisition

__all__ = []

Expand All @@ -26,7 +26,7 @@ def _fill_empty_lenghts(


def integration_lenghts(
sequences: dict[ChannelId, Sequence],
sequences: dict[ChannelId, Q1Sequence],
sequencers: SequencerMap,
modules: dict[SlotId, Module],
) -> dict[acquisition.MeasureId, int]:
Expand Down
8 changes: 4 additions & 4 deletions src/qibolab/_core/instruments/qblox/sequence/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from .program import program
from .waveforms import Waveforms, waveform_indices, waveforms

__all__ = ["Sequence"]
__all__ = ["Q1Sequence"]


def _weight_len(w: Optional[Weight]) -> Optional[int]:
return len(w.data) if w is not None else None


class Sequence(Model):
class Q1Sequence(Model):
waveforms: Waveforms
weights: Weights
acquisitions: Acquisitions
Expand Down Expand Up @@ -120,8 +120,8 @@ def compile(
sweepers: list[ParallelSweepers],
options: ExecutionParameters,
sampling_rate: float,
) -> dict[ChannelId, Sequence]:
) -> dict[ChannelId, Q1Sequence]:
return {
ch: Sequence.from_pulses(seq, sweepers, options, sampling_rate)
ch: Q1Sequence.from_pulses(seq, sweepers, options, sampling_rate)
for ch, seq in _split_channels(sequence).items()
}

0 comments on commit 07f41d7

Please sign in to comment.