From 61c91afd5f6d117e279f4a73eb822ce012263987 Mon Sep 17 00:00:00 2001 From: Andrea Pasquale Date: Wed, 8 Jan 2025 10:19:43 +0100 Subject: [PATCH] fix: Prevent execution with initial delay too short --- src/qibocal/protocols/coherence/cpmg.py | 10 +++++++++- tests/runcards/protocols.yml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/qibocal/protocols/coherence/cpmg.py b/src/qibocal/protocols/coherence/cpmg.py index a81bb0458..8dfb44ad0 100644 --- a/src/qibocal/protocols/coherence/cpmg.py +++ b/src/qibocal/protocols/coherence/cpmg.py @@ -47,7 +47,15 @@ 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}, " + f"minimum delay should be {platform.natives.single_qubit[q].RX()[0][1].duration * 2 * params.n}" + ) sweeper = Sweeper( parameter=Parameter.duration, values=wait_range / 2 / params.n, 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