From 15ae400a90f9e6740be589f1862647ba97742268 Mon Sep 17 00:00:00 2001 From: Dean Poulos Date: Wed, 23 Oct 2024 00:44:16 +1100 Subject: [PATCH] Fix broken test and linting problems. --- .../callable_from_qua/_callable_from_qua.py | 9 ++++++--- qualang_tools/wirer/connectivity/wiring_spec.py | 2 -- tests/wirer/test_wirer_channel_reuse.py | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/qualang_tools/callable_from_qua/_callable_from_qua.py b/qualang_tools/callable_from_qua/_callable_from_qua.py index f524a91d..ec4948f1 100644 --- a/qualang_tools/callable_from_qua/_callable_from_qua.py +++ b/qualang_tools/callable_from_qua/_callable_from_qua.py @@ -79,13 +79,16 @@ def run(self, job: QmJob): class ProgramAddon(ABC): @abstractmethod - def enter_program(self, program: Program): ... # noqa: E704 + def enter_program(self, program: Program): + ... # noqa: E704 @abstractmethod - def exit_program(self, exc_type, exc_val, exc_tb): ... # noqa: E704 + def exit_program(self, exc_type, exc_val, exc_tb): + ... # noqa: E704 @abstractmethod - def execute_program(self, program: Program, quantum_machine: QuantumMachine): ... # noqa: E704 + def execute_program(self, program: Program, quantum_machine: QuantumMachine): + ... # noqa: E704 class QuaCallableEventManager(ProgramAddon): diff --git a/qualang_tools/wirer/connectivity/wiring_spec.py b/qualang_tools/wirer/connectivity/wiring_spec.py index 7d7477de..9fba6335 100644 --- a/qualang_tools/wirer/connectivity/wiring_spec.py +++ b/qualang_tools/wirer/connectivity/wiring_spec.py @@ -1,7 +1,5 @@ from enum import Enum from typing import Union, List -from .channel_spec import ChannelSpec -from .element import Element from typing import TYPE_CHECKING diff --git a/tests/wirer/test_wirer_channel_reuse.py b/tests/wirer/test_wirer_channel_reuse.py index 0c4b2ddc..4d59c01a 100644 --- a/tests/wirer/test_wirer_channel_reuse.py +++ b/tests/wirer/test_wirer_channel_reuse.py @@ -57,23 +57,23 @@ def test_5q_allocation_with_channel_reuse(instruments_2lf_2mw): ) -def test_alternating_blocking_of_used_channels(instruments_1opx_1octave): +def test_alternating_blocking_of_used_channels(instruments_2lf_2mw): connectivity = Connectivity() connectivity.add_qubit_drive_lines(qubits=1) - allocate_wiring(connectivity, instruments_1opx_1octave, block_used_channels=False) + allocate_wiring(connectivity, instruments_2lf_2mw, block_used_channels=False) connectivity.add_qubit_drive_lines(qubits=2) - allocate_wiring(connectivity, instruments_1opx_1octave) + allocate_wiring(connectivity, instruments_2lf_2mw) connectivity.add_qubit_drive_lines(qubits=3) - allocate_wiring(connectivity, instruments_1opx_1octave, block_used_channels=False) + allocate_wiring(connectivity, instruments_2lf_2mw, block_used_channels=False) connectivity.add_qubit_drive_lines(qubits=4) - allocate_wiring(connectivity, instruments_1opx_1octave) + allocate_wiring(connectivity, instruments_2lf_2mw) if visualize_flag: - visualize(connectivity.elements, instruments_1opx_1octave.available_channels) + visualize(connectivity.elements, instruments_2lf_2mw.available_channels) expected_ports = [ 1, # q1 allocated to 1, but channel isn't blocked