diff --git a/forest/benchmarking/qubit_spectroscopy.py b/forest/benchmarking/qubit_spectroscopy.py index bc94d388..395bcf0e 100644 --- a/forest/benchmarking/qubit_spectroscopy.py +++ b/forest/benchmarking/qubit_spectroscopy.py @@ -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 @@ -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)) @@ -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))) @@ -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: