Skip to content

Commit

Permalink
fix test definition and improve code for flipping with rx90 gate
Browse files Browse the repository at this point in the history
  • Loading branch information
ElStabilini committed Dec 6, 2024
1 parent af82fec commit b90f887
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 85 deletions.
128 changes: 64 additions & 64 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 13 additions & 20 deletions src/qibocal/protocols/flipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,27 @@ def flipping_sequence(

if rx90:
sequence |= natives.RX90()

for _ in range(flips):
qd_channel, qd_pulse = natives.RX90()[0]

qd_detuned = update.replace(
qd_pulse, delta_amplitude=qd_pulse.amplitude + delta_amplitude
)

sequence.append((qd_channel, qd_detuned))
sequence.append((qd_channel, qd_detuned))
sequence.append((qd_channel, qd_detuned))
sequence.append((qd_channel, qd_detuned))

sequence |= natives.MZ()

else:
sequence |= natives.R(theta=np.pi / 2)

for _ in range(flips):
for _ in range(flips):

if rx90:
qd_channel, qd_pulse = natives.RX90()[0]
else:
qd_channel, qd_pulse = natives.RX()[0]

qd_detuned = update.replace(
qd_pulse, amplitude=qd_pulse.amplitude + delta_amplitude
)
qd_detuned = update.replace(
qd_pulse, delta_amplitude=qd_pulse.amplitude + delta_amplitude
)
sequence.append((qd_channel, qd_detuned))
sequence.append((qd_channel, qd_detuned))

if rx90:
sequence.append((qd_channel, qd_detuned))
sequence.append((qd_channel, qd_detuned))

sequence |= natives.MZ()
sequence |= natives.MZ()

return sequence

Expand Down
Loading

0 comments on commit b90f887

Please sign in to comment.