-
Notifications
You must be signed in to change notification settings - Fork 38
⚡️ Improve Performance of getNqubits #959
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
base: main
Are you sure you want to change the base?
Conversation
The CI will throw an error in this test. This is actually a bug not related to this change and must be treated in the parsing. It should not be possible to construct a gate where control and target qubits overlap. |
This is definitely a bug. Or at least a badly written test that has not been detected due to the lack of sanity checks. Would you mind submitting a PR that adds such checks and corrects the test? Changes are probably necessary in the following places:
The |
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
@ystade I think this might need one additional test for the ci to be green |
Description
This PR improves the performance of
getNqubits
by avoiding to constructing a set of qubits viagetUsedQubits
in most cases (except for compound operations).This improvement was suggested here in PR 624 of QMAP.
Checklist: