Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rustworkx 0.15.0 features in DAGCircuit.remove_op_node #12756

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,7 @@ def remove_op_node(self, node):
"node type was wrongly provided."
)

self._multi_graph.remove_node_retain_edges(
node._node_id, use_outgoing=False, condition=lambda edge1, edge2: edge1 == edge2
)
self._multi_graph.remove_node_retain_edges_by_id(node._node_id)
self._decrement_op(node.name)

def remove_ancestors_of(self, node):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
upgrade_misc:
- |
The minimum version of rustworkx required to run this release has been
increased from 0.14.0 to 0.15.0. This is required because Qiskit is now
using new functionality added in the rustworkx 0.15.0 release which
improves performance.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rustworkx>=0.14.0
rustworkx>=0.15.0
numpy>=1.17,<3
scipy>=1.5
sympy>=1.3
Expand Down
Loading