qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Optimized apply_operation_back for DAGDependencyV2

Open enavarro51 opened this issue 10 months ago • 4 comments

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.

enavarro51 avatar Apr 16 '24 21:04 enavarro51