Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid intermediate DAGs in Optimize1qGatesDecomposition (#12176)
This commit removes the use of intermediate DAGCircuit objects and calling substitute_node_with_dag() in the Optimize1qGatesDecomposition pass. Since everything is 1q it's very easy to just directly insert the nodes on the DAG prior to the run and then remove the old nodes. This avoids a lot of extra operations and overhead to create a second dagcircuit for each identified run and then substiting that dag in place of the run.
- Loading branch information