From e292ae5164089b7a7aa9f7367763b7f903d83f88 Mon Sep 17 00:00:00 2001 From: Andrea Date: Fri, 6 Dec 2024 14:46:06 +0400 Subject: [PATCH] feat: Adding number of flips to DRAG --- src/qibocal/protocols/drag.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/qibocal/protocols/drag.py b/src/qibocal/protocols/drag.py index ca22fae30..4afce36b4 100644 --- a/src/qibocal/protocols/drag.py +++ b/src/qibocal/protocols/drag.py @@ -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 @@ -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))