You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to having the DAGCircuit in rust the sort_key attribute was added
as a cache to speed up the lexicographical topological sort. Prior to
having this attribute the topological sort method would compute the sort
key as a string on the fly which ended up being a large bottleneck in
transpilation (see: #4040 for more details). However, since migrating the
DAGCircuit implementation to Rust this sort_key attribute isn't needed
anymore because we call the rustworkx-core function with a tuple of bit
objects instead of a string. The sort_key atribute was left on in place
for backwards compatibility (it shouldn't have been public, this was a
mistake in #4040) and when we create a python DAGNode object that will
be returned to Python the creation of the sort key is unnecessary
overhead (it takes roughly 1% of profile time to format the sort_key
string during transpilation). Since nothing in DAGCircuit is actually
using it this commit removes it to save the CPU cycles creating the
string on each dag creation.
This attribute is removed in Qiskit 2.0.0 in #13736
0 commit comments