Skip to content

Commit

Permalink
Fix lint failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Nov 2, 2022
1 parent a5c46fa commit 2419ba2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
7 changes: 6 additions & 1 deletion qiskit/transpiler/preset_passmanagers/level0.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ def _choose_layout_condition(property_set):
# TODO: Remove when qiskit-toqm has it's own plugin and we can rely on just the plugin interface
if routing_method == "toqm" and "toqm" not in list_stage_plugins("routing"):
HAS_TOQM.require_now("TOQM-based routing")
from qiskit_toqm import ToqmSwap, ToqmStrategyO0, latencies_from_target
# pylint: disable=import-error
from qiskit_toqm import (
ToqmSwap,
ToqmStrategyO0,
latencies_from_target,
)

if initial_layout:
raise TranspilerError("Initial layouts are not supported with TOQM-based routing.")
Expand Down
7 changes: 6 additions & 1 deletion qiskit/transpiler/preset_passmanagers/level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ def _vf2_match_not_found(property_set):
# TODO: Remove when qiskit-toqm has it's own plugin and we can rely on just the plugin interface
if routing_method == "toqm" and "toqm" not in list_stage_plugins("routing"):
HAS_TOQM.require_now("TOQM-based routing")
from qiskit_toqm import ToqmSwap, ToqmStrategyO1, latencies_from_target
# pylint: disable=import-error
from qiskit_toqm import (
ToqmSwap,
ToqmStrategyO1,
latencies_from_target,
)

if initial_layout:
raise TranspilerError("Initial layouts are not supported with TOQM-based routing.")
Expand Down
7 changes: 6 additions & 1 deletion qiskit/transpiler/preset_passmanagers/level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ def _vf2_match_not_found(property_set):
# TODO: Remove when qiskit-toqm has it's own plugin and we can rely on just the plugin interface
if routing_method == "toqm" and "toqm" not in list_stage_plugins("routing"):
HAS_TOQM.require_now("TOQM-based routing")
from qiskit_toqm import ToqmSwap, ToqmStrategyO2, latencies_from_target
# pylint: disable=import-error
from qiskit_toqm import (
ToqmSwap,
ToqmStrategyO2,
latencies_from_target,
)

if initial_layout:
raise TranspilerError("Initial layouts are not supported with TOQM-based routing.")
Expand Down
7 changes: 6 additions & 1 deletion qiskit/transpiler/preset_passmanagers/level3.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ def _vf2_match_not_found(property_set):
# TODO: Remove when qiskit-toqm has it's own plugin and we can rely on just the plugin interface
if routing_method == "toqm" and "toqm" not in list_stage_plugins("routing"):
HAS_TOQM.require_now("TOQM-based routing")
from qiskit_toqm import ToqmSwap, ToqmStrategyO3, latencies_from_target
# pylint: disable=import-error
from qiskit_toqm import (
ToqmSwap,
ToqmStrategyO3,
latencies_from_target,
)

if initial_layout:
raise TranspilerError("Initial layouts are not supported with TOQM-based routing.")
Expand Down

0 comments on commit 2419ba2

Please sign in to comment.