Skip to content

Commit

Permalink
Address GateDirection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Jan 14, 2025
1 parent 570c1e8 commit c34605d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
6 changes: 1 addition & 5 deletions qiskit/transpiler/preset_passmanagers/level0.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ def level_0_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
)

if (coupling_map and not coupling_map.is_symmetric) or (
target is not None
and (
target.get_non_global_operation_names(strict_direction=True)
or len(target.operation_names) == 0
)
target is not None and target.get_non_global_operation_names(strict_direction=True)
):
pre_opt = common.generate_pre_op_passmanager(target, coupling_map)
pre_opt += translation
Expand Down
6 changes: 1 addition & 5 deletions qiskit/transpiler/preset_passmanagers/level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ def level_1_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
)

if (coupling_map and not coupling_map.is_symmetric) or (
target is not None
and (
target.get_non_global_operation_names(strict_direction=True)
or len(target.operation_names) == 0
)
target is not None and target.get_non_global_operation_names(strict_direction=True)
):
pre_optimization = common.generate_pre_op_passmanager(
target, coupling_map, remove_reset_in_zero=False
Expand Down
6 changes: 1 addition & 5 deletions qiskit/transpiler/preset_passmanagers/level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ def level_2_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
)

if (coupling_map and not coupling_map.is_symmetric) or (
target is not None
and (
target.get_non_global_operation_names(strict_direction=True)
or len(target.operation_names) == 0
)
target is not None and target.get_non_global_operation_names(strict_direction=True)
):
pre_optimization = common.generate_pre_op_passmanager(
target, coupling_map, remove_reset_in_zero=False
Expand Down
6 changes: 1 addition & 5 deletions qiskit/transpiler/preset_passmanagers/level3.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ def level_3_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
"optimization", optimization_method, pass_manager_config, optimization_level=3
)
if (coupling_map and not coupling_map.is_symmetric) or (
target is not None
and (
target.get_non_global_operation_names(strict_direction=True)
or len(target.operation_names) == 0
)
target is not None and target.get_non_global_operation_names(strict_direction=True)
):
pre_optimization = common.generate_pre_op_passmanager(
target, coupling_map, remove_reset_in_zero=False
Expand Down

0 comments on commit c34605d

Please # to comment.