CommutativeCancellation.run

CommutativeCancellation.run(dag)[source]

Run the CommutativeCancellation pass on dag.

Parameters

dag (DAGCircuit) – the DAG to be optimized.

Returns

the optimized DAG.

Return type

DAGCircuit

Raises

TranspilerError – when the 1-qubit rotation gates are not found