Skip to content

Commit

Permalink
fix: Consider only delay in assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Jan 8, 2025
1 parent fb165fc commit 0060809
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/qibocal/protocols/coherence/cpmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ def _acquisition(
)
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
), (
assert params.delay_between_pulses_start / 2 / params.n >= 1, (
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}"
f"minimum delay should be {params.delay_between_pulses_start * 2 * params.n}"
)
sweeper = Sweeper(
parameter=Parameter.duration,
Expand Down
6 changes: 6 additions & 0 deletions src/qibocal/protocols/coherence/spin_echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def _acquisition(
pulses=delays,
)

for q in targets:
# this is assuming that RX and RX90 have the same duration
assert params.delay_between_pulses_start / 2 >= 1, (
f"Initial delay too short for qubit {q}, "
f"minimum delay should be {params.delay_between_pulses_start * 2}"
)
results = platform.execute(
[sequence],
[[sweeper]],
Expand Down
11 changes: 1 addition & 10 deletions tests/runcards/protocols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,20 +463,11 @@ actions:
- id: spin_echo
operation: spin_echo
parameters:
delay_between_pulses_start: 0
delay_between_pulses_end: 5
delay_between_pulses_step: 1
nshots: 10

- id: spin_echo
operation: spin_echo
parameters:
delay_between_pulses_start: 0
delay_between_pulses_start: 10
delay_between_pulses_end: 5
delay_between_pulses_step: 1
nshots: 10


- id: CPMG
operation: cpmg
parameters:
Expand Down

0 comments on commit 0060809

Please sign in to comment.