forked from Qiskit/rustworkx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pickle/deepcopy not preserve original edge indices (Qiskit#589)
* fix issue Qiskit#585 that pickling graph & digraph do not preserve original edge index * fix clippy lints - collapsible_else_if * Simplify logic in __setstate__ * Add release note * Fix lint --------- Co-authored-by: Matthew Treinish <[email protected]>
- Loading branch information
1 parent
9fddde0
commit 4c9d26e
Showing
5 changed files
with
418 additions
and
128 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
releasenotes/notes/fix-edge-indices-pickle-83fddf149441fa9f.yaml
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,10 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue when using ``copy.deepcopy()`` on :class:`~.PyDiGraph` and | ||
:class:`~.PyGraph` objects when there were removed edges from the graph | ||
object. Previously, if there were any holes in the edge indices caused by | ||
the removal the output copy of the graph object would incorrectly have | ||
flatten the indices. This has been corrected so that the edge indices are | ||
recreated exactly after a ``deepcopy()``. | ||
Fixed `#585 <https://github.com/Qiskit/rustworkx/issues/585>`__ |
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
Oops, something went wrong.