From 627c31c20b467bb10b833c721c969b73de37bfa0 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:09:57 +0400 Subject: [PATCH] chore: update single shot for new qibolab serialization --- src/qibocal/auto/operation.py | 3 +-- src/qibocal/auto/output.py | 3 +-- src/qibocal/protocols/classification.py | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qibocal/auto/operation.py b/src/qibocal/auto/operation.py index 8b1f602eb..1b2240f7b 100644 --- a/src/qibocal/auto/operation.py +++ b/src/qibocal/auto/operation.py @@ -11,7 +11,7 @@ import numpy.typing as npt from qibolab import AcquisitionType, AveragingMode, ExecutionParameters from qibolab.platform import Platform -from qibolab.qubits import Qubit, QubitId, QubitPair, QubitPairId +from qibolab.qubits import Qubit, QubitId, QubitPairId from qibocal.config import log @@ -23,7 +23,6 @@ """Valid value for a routine and runcard parameter.""" Qubits = dict[QubitId, Qubit] """Convenient way of passing qubit pairs in the routines.""" -QubitsPairs = dict[tuple[QubitId, QubitId], QubitPair] DATAFILE = "data" diff --git a/src/qibocal/auto/output.py b/src/qibocal/auto/output.py index 275c4cfd8..2b8bdf194 100644 --- a/src/qibocal/auto/output.py +++ b/src/qibocal/auto/output.py @@ -8,7 +8,6 @@ from qibo.backends import construct_backend from qibolab import Platform -from qibolab.serialize import dump_platform from ..config import log from ..version import __version__ @@ -213,7 +212,7 @@ def update_platform(platform: Platform, path: Path): platpath = path / UPDATED_PLATFORM platpath.mkdir(parents=True, exist_ok=True) - dump_platform(platform, platpath) + # dump_platform(platform, platpath) def _export_stats(self): """Export task statistics. diff --git a/src/qibocal/protocols/classification.py b/src/qibocal/protocols/classification.py index 900a5ae66..285e84436 100644 --- a/src/qibocal/protocols/classification.py +++ b/src/qibocal/protocols/classification.py @@ -185,8 +185,9 @@ def _acquisition( ro_pulses = {} for q in targets: qubit = platform.qubits[q] - rx_sequence = qubit.native_gates.RX.create_sequence(theta=np.pi, phi=0) - ro_sequence = qubit.native_gates.MZ.create_sequence() + native = platform.parameters.native_gates.single_qubit[qubit.name] + rx_sequence = native.RX.create_sequence(theta=np.pi, phi=0) + ro_sequence = native.MZ.create_sequence() if state == 1: sequence.extend(rx_sequence) sequence.append((qubit.probe.name, Delay(duration=rx_sequence.duration)))