Skip to content

Commit

Permalink
Inline second arg for dense_layout too
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Apr 18, 2023
1 parent b8ef403 commit 34a759e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions qiskit/transpiler/passes/layout/dense_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,9 @@ def run(self, dag):
raise TranspilerError(
"A coupling_map or target with constrained qargs is necessary to run the pass."
)
if self.target is not None:
target = self.target
else:
target = self.coupling_map
layout_components = disjoint_utils.run_pass_over_connected_components(
dag,
target,
self.coupling_map if self.target is None else self.target,
self._inner_run,
)
layout_mapping = {}
Expand Down

0 comments on commit 34a759e

Please sign in to comment.