Skip to content

Commit

Permalink
chore: use delay instructions instead of pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
jselig-rigetti committed Oct 24, 2023
1 parent 6c4040b commit 6927708
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions forest/benchmarking/qubit_spectroscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from tqdm import tqdm

from pyquil.api import QuantumComputer
from pyquil.gates import RX, RY, RZ, CZ, MEASURE
from pyquil.gates import RX, RY, RZ, CZ
from pyquil.quil import Program
from pyquil.quilbase import Pragma
from pyquil.quilbase import Delay
from pyquil.paulis import PauliTerm

from forest.benchmarking.utils import transform_pauli_moments_to_bit
Expand Down Expand Up @@ -107,7 +107,7 @@ def generate_t1_experiments(qubits: Sequence[int], times: Sequence[float], is_qv
settings = []
for q in qubits:
if not is_qvm:
program += Pragma('DELAY', [q], str(t))
program += Delay(frames=[], qubits=[q], duration=t)
settings.append(ExperimentSetting(minusZ(q), PauliTerm('Z', q)))

expts.append(ObservablesExperiment([settings], program))
Expand Down Expand Up @@ -229,7 +229,7 @@ def generate_t2_star_experiments(qubits: Sequence[int], times: Sequence[float],
settings = []
for q in qubits:
if not is_qvm:
program += Pragma('DELAY', [q], str(t))
program += Delay(frames=[], qubits=[q], duration=t)
program += RZ(2 * pi * t * detuning, q)
settings.append(ExperimentSetting(minusY(q), PauliTerm('Y', q)))

Expand Down Expand Up @@ -273,7 +273,7 @@ def generate_t2_echo_experiments(qubits: Sequence[int], times: Sequence[float],
settings = []
for q in qubits:
if not is_qvm:
half_delay = Pragma('DELAY', [q], str(half_time))
half_delay += Delay(frames=[], qubits=[q], duration=half_time)
# echo
program += [half_delay, RY(pi, q), half_delay]
else:
Expand Down

0 comments on commit 6927708

Please sign in to comment.