Skip to content

Commit

Permalink
feat: Adding number of flips to DRAG
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Dec 6, 2024
1 parent d7745ae commit e292ae5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/qibocal/protocols/drag.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class DragTuningParameters(Parameters):
unrolling: bool = False
"""If ``True`` it uses sequence unrolling to deploy multiple sequences in a single instrument call.
Defaults to ``False``."""
nflips: int = 1
"""Repetitions of (Xpi - Xmpi)."""


@dataclass
Expand Down Expand Up @@ -97,11 +99,17 @@ def _acquisition(
)
drag_negative = replace(drag, relative_phase=np.pi)

# TODO: here we can add pairs of this in a for loop
sequence.append((qd_channel, drag))
sequence.append((qd_channel, drag_negative))
for _ in range(params.nflips):
sequence.append((qd_channel, drag))
sequence.append((qd_channel, drag_negative))
sequence.append(
(ro_channel, Delay(duration=drag.duration + drag_negative.duration))
(
ro_channel,
Delay(
duration=params.nflips
* (drag.duration + drag_negative.duration)
),
)
)
sequence.append((ro_channel, ro_pulse))

Expand Down

0 comments on commit e292ae5

Please sign in to comment.