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

Allow single node indices in TopologicalSorter.done #1157

Closed
jakelishman opened this issue Apr 5, 2024 · 0 comments · Fixed by #1159
Closed

Allow single node indices in TopologicalSorter.done #1157

jakelishman opened this issue Apr 5, 2024 · 0 comments · Fixed by #1159

Comments

@jakelishman
Copy link
Member

What is the expected enhancement?

Following #1128, another thing that would help performance for TopologicalSorter for the intended use-cases on Qiskit is if it were to allow single indices in its done method. In practice, all the reasons we use the on-line sorter for involve looking at nodes one at a time and making a decision about them, and the overhead of constructing new Python lists and then unwrapping them into Rust vecs is quite expensive.

I'm happy to make a PR, just before I do: would we prefer to have a separate done_single method, or to overload done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant