Skip to content

Commit

Permalink
Fix an issue that InverseCancellation does not run in classical blo…
Browse files Browse the repository at this point in the history
…cks (Qiskit#13437)
  • Loading branch information
haimeng-zhang committed Nov 18, 2024
1 parent b9d5c9c commit ee76878
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qiskit/transpiler/passes/optimization/inverse_cancellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from qiskit.dagcircuit import DAGCircuit
from qiskit.transpiler.basepasses import TransformationPass
from qiskit.transpiler.exceptions import TranspilerError
from qiskit.transpiler.passes.utils import control_flow

from qiskit._accelerate.inverse_cancellation import inverse_cancellation

Expand Down Expand Up @@ -74,6 +75,7 @@ def __init__(self, gates_to_cancel: List[Union[Gate, Tuple[Gate, Gate]]]):

super().__init__()

@control_flow.trivial_recurse
def run(self, dag: DAGCircuit):
"""Run the InverseCancellation pass on `dag`.
Expand Down

0 comments on commit ee76878

Please sign in to comment.