From fee41c79a97ec5afce0c5b82b2b378d472b8be96 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Mon, 26 Aug 2024 12:36:05 +0200 Subject: [PATCH] fix: Prevent even more import removal --- src/qibolab/instruments/qm/components/__init__.py | 2 ++ src/qibolab/instruments/qm/controller.py | 14 +++++++------- src/qibolab/qubits.py | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/qibolab/instruments/qm/components/__init__.py b/src/qibolab/instruments/qm/components/__init__.py index cd2dbfd89..a3e90c16e 100644 --- a/src/qibolab/instruments/qm/components/__init__.py +++ b/src/qibolab/instruments/qm/components/__init__.py @@ -1,4 +1,6 @@ from . import configs + +# TODO: Fix pycln configurations in pre-commit to preserve the following with no comment from .configs import * # noqa __all__ = [] diff --git a/src/qibolab/instruments/qm/controller.py b/src/qibolab/instruments/qm/controller.py index 93dbeed84..86bb63b9f 100644 --- a/src/qibolab/instruments/qm/controller.py +++ b/src/qibolab/instruments/qm/controller.py @@ -1,27 +1,27 @@ -from os import PathLike import shutil import tempfile import warnings from collections import defaultdict from dataclasses import asdict, dataclass +from os import PathLike from pathlib import Path from typing import Optional from pydantic import Field -from qibolab.components.configs import AcquisitionConfig, IqConfig, OscillatorConfig -from qibolab.instruments.qm.components.configs import ( - OpxOutputConfig, - QmAcquisitionConfig, -) from qm import QuantumMachinesManager, SimulationConfig, generate_qua_script from qm.octave import QmOctaveConfig from qm.simulate.credentials import create_credentials from qualang_tools.simulator_tools import create_simulator_controller_connections -from qibolab.components import AcquireChannel, Channel, Config, DcChannel, IqChannel +from qibolab.components import AcquireChannel, Config, DcChannel, IqChannel +from qibolab.components.configs import IqConfig, OscillatorConfig from qibolab.execution_parameters import ExecutionParameters from qibolab.identifier import ChannelId from qibolab.instruments.abstract import Controller +from qibolab.instruments.qm.components.configs import ( + OpxOutputConfig, + QmAcquisitionConfig, +) from qibolab.pulses import Acquisition, Align, Delay, Pulse, Readout from qibolab.sequence import PulseSequence from qibolab.sweeper import ParallelSweepers, Parameter, Sweeper diff --git a/src/qibolab/qubits.py b/src/qibolab/qubits.py index 6f658ff7c..433ad3430 100644 --- a/src/qibolab/qubits.py +++ b/src/qibolab/qubits.py @@ -5,7 +5,7 @@ # TODO: the unused import are there because Qibocal is still importing them from here # since the export scheme will be reviewed, it should be changed at that time, removing # the unused ones from here -from .identifier import ChannelId, TransitionId, QubitId, QubitPairId +from .identifier import ChannelId, QubitId, QubitPairId, TransitionId # noqa from .serialize import Model