Skip to content

Commit

Permalink
fix: Prevent execution with initial delay too short
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Jan 8, 2025
1 parent 1a8f9f7 commit e653dde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/qibocal/protocols/coherence/cpmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/runcards/protocols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e653dde

Please sign in to comment.