From e653dde57db644270ebf4ab84c184d1a6230ffa1 Mon Sep 17 00:00:00 2001 From: Andrea Pasquale Date: Wed, 8 Jan 2025 10:15:21 +0100 Subject: [PATCH] fix: Prevent execution with initial delay too short --- src/qibocal/protocols/coherence/cpmg.py | 6 ++++++ tests/runcards/protocols.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qibocal/protocols/coherence/cpmg.py b/src/qibocal/protocols/coherence/cpmg.py index a81bb0458..39ab0f148 100644 --- a/src/qibocal/protocols/coherence/cpmg.py +++ b/src/qibocal/protocols/coherence/cpmg.py @@ -47,6 +47,12 @@ def _acquisition( params.delay_between_pulses_end, params.delay_between_pulses_step, ) + for q in targets: + # this is assuming that RX and RX90 have the same duration + assert ( + params.delay_between_pulses_start / 2 / params.n + > platform.natives.single_qubit[q].RX()[0][1].duration + ), f"Initial delay too short for qubit {q}, minimum delay should be {platform.natives.single_qubit[q].RX()[0][1].duration * 2 * params.n}" sweeper = Sweeper( parameter=Parameter.duration, diff --git a/tests/runcards/protocols.yml b/tests/runcards/protocols.yml index ddb5fa968..5fe51e320 100644 --- a/tests/runcards/protocols.yml +++ b/tests/runcards/protocols.yml @@ -480,7 +480,7 @@ actions: - id: CPMG operation: cpmg parameters: - delay_between_pulses_start: 0 + delay_between_pulses_start: 330 delay_between_pulses_end: 400 delay_between_pulses_step: 10 nshots: 10