qiskit
qiskit copied to clipboard
Optimized apply_operation_back for DAGDependencyV2
Summary
Adds an optimized version of apply_operation_back
to DAGDependencyV2
. Requires rustworkx
0.15.0
Details and comments
This PR updates apply_operation_back
in DAGDependencyV2
to use several optimized functions for TopologicalSorter
in the 0.15.0 release of rustworkx
. These include an initial
option to include a list of starting nodes, a check_args
option to eliminate some checks in the sorter, and allowing the done
function to accept an int as well as a list.
In local tests on a random clifford circuit, this reduced the execution time of converting from a circuit to a DAGDependencyV2
from 35 sec to 1.9 sec.
Requires rustworkx 0.15.0.