Skip to content

Commit

Permalink
Fix broken test and linting problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
deanpoulos committed Oct 22, 2024
1 parent 7f9b6ed commit 15ae400
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 6 additions & 3 deletions qualang_tools/callable_from_qua/_callable_from_qua.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions qualang_tools/wirer/connectivity/wiring_spec.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 6 additions & 6 deletions tests/wirer/test_wirer_channel_reuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15ae400

Please sign in to comment.