forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing CouplingMap.__eq__ (Qiskit#9766)
* implementing Coupling.__eq__ * Update qiskit/transpiler/coupling.py Co-authored-by: Matthew Treinish <[email protected]> * adding comments to test, and adding release note * black formatting * updating CouplingMap.__eq__ to check edge list equality instead of isomorphism * updating release notes * updating test doc string * Update test/python/transpiler/test_coupling.py Co-authored-by: Matthew Treinish <[email protected]> * Update test/python/transpiler/test_coupling.py Co-authored-by: Matthew Treinish <[email protected]> * Update test/python/transpiler/test_coupling.py Co-authored-by: Matthew Treinish <[email protected]> * Update test/python/transpiler/test_coupling.py Co-authored-by: Matthew Treinish <[email protected]> --------- Co-authored-by: Matthew Treinish <[email protected]>
- Loading branch information
1 parent
332f4b2
commit 5ce80ab
Showing
3 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
upgrade: | ||
- | | ||
The :meth:`.CouplingMap.__eq__`` method has been updated to check that the edge lists of the | ||
underlying graphs contain the same elements. Under the assumption that the underlying graphs are | ||
connected, this check additionally ensures that the graphs have the same number of nodes with | ||
the same labels. Any code using ``CouplingMap() == CouplingMap()`` to check object equality | ||
should be updated to ``CouplingMap() is CouplingMap()``. |
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