Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
1ucian0 committed Feb 6, 2024
1 parent 39ec549 commit 56dda0e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def _pre_runhook(self, dag: DAGCircuit) -> None:

physical_index = dag.qubits.index(qubit)
if (
self._qubits
and physical_index not in self._qubits
or qubit in self._idle_qubits
self._qubits
and physical_index not in self._qubits
or qubit in self._idle_qubits
):
continue

Expand Down
1 change: 1 addition & 0 deletions qiskit_ibm_runtime/transpiler/passes/scheduling/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from qiskit.transpiler.exceptions import TranspilerError
from qiskit.providers import Backend, BackendV1


def block_order_op_nodes(dag: DAGCircuit) -> Generator[DAGOpNode, None, None]:
"""Yield nodes such that they are sorted into groups of blocks that minimize synchronization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,6 @@ def test_disjoint_coupling_map(self):
self.assertNotEqual(delay_dict[3], delay_dict[4])
self.assertEqual(delay_dict[0], delay_dict[2])


def test_no_unused_qubits(self):
"""Test DD with if_test circuit that unused qubits are untouched and
not scheduled. Unused qubits may also have missing durations when
Expand Down Expand Up @@ -1081,4 +1080,4 @@ def test_no_unused_qubits(self):
qc_dd = pm.run(qc)
dont_use = qc_dd.qubits[-2:]
for op in qc_dd.data:
self.assertNotIn(dont_use, op.qubits)
self.assertNotIn(dont_use, op.qubits)
5 changes: 1 addition & 4 deletions test/unit/transpiler/passes/scheduling/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def test_patch_measure(self):
self.assertEqual(short_odd_durations.get("measure", (0,)), 1224)
self.assertEqual(short_odd_durations.get("reset", (0,)), 1224)


def test_durations_from_backend_v1(self):
"""Test loading and patching durations from a V1 Backend"""

Expand All @@ -74,9 +73,7 @@ def test_durations_from_backend_v2(self):
def test_durations_from_target(self):
"""Test loading and patching durations from a target"""

durations = DynamicCircuitInstructionDurations.from_target(
FakeKolkataV2().target
)
durations = DynamicCircuitInstructionDurations.from_target(FakeKolkataV2().target)

self.assertEqual(durations.get("x", (0,)), 160)
self.assertEqual(durations.get("measure", (0,)), 3200)
Expand Down

0 comments on commit 56dda0e

Please sign in to comment.