Skip to content

Commit

Permalink
Include CommutativeAnalysis pass explicitly when doing control flow b…
Browse files Browse the repository at this point in the history
…locks

A new PassManager for CommutativeCancellation is constructed when descending into control flow blocks.
This commit explicitly includes a CommutativeAnalysis pass in this construction rather than relying on
`requires`. This change, while not necessary, is made for consistency with other explicit constructions
of PassManagers containing these passes.
  • Loading branch information
jlapeyre committed Jun 28, 2023
1 parent 6adab11 commit bf7e8e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _handle_control_flow_ops(self, dag):
"""
from qiskit.transpiler import PassManager

pass_manager = PassManager(self.__class__(self.basis))
pass_manager = PassManager(CommutationAnalysis(), self.__class__(self.basis))
for node in dag.op_nodes(ControlFlowOp):
mapped_blocks = []
for block in node.op.blocks:
Expand Down

0 comments on commit bf7e8e1

Please sign in to comment.