forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deepcopies from DAGCircuit.__eq__ (Qiskit#4992)
The __eq__ method of the dagcircuit class was previously deep copying the retworkx PyDAG objects for both self and other to force a reindexing of the node indices in the graphs to acvoid a bug in retworkx (see Qiskit/rustworkx#27 for more details). In the next retworkx a workaround for that bug was introduced which removes the need for doing the deepcopy calls. This commit does that and removes the deep copies which should improve the performance of run __eq__ o dagcircuit objects.
- Loading branch information
Showing
3 changed files
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters