Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize UnrollCustomDefinitions pass (Qiskit#10777)
This commit makes some small tweaks to the UnrollCustomDefinitions pass to optimize it's runtime performance. It makes 2 primary changes to improve the efficiency. First, when calling `circuit_to_dag()` the copy_operations flag is set to False. This eliminates an inner deep copy from the conversion which will make the conversion operate more efficiently. The second is previously on every recursive call to run the pass we were previously reconstructing the pass on every execution. Instead this just reuses the existing instance. This will have less measurable of an impact as the pass construction is relatively fast, but it was unecessary work as we already have a pass object that can reused.
- Loading branch information