-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Better MCX Decomposition with logarithmic Toffoli Depth #13922
base: main
Are you sure you want to change the base?
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
@patelvyom - thank you very much for your contribution to qiskit. You've made a great start! |
Pull Request Test Coverage Report for Build 13569874316Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the style/norm of a project is a bit of work, so in addition to Shelly's provided links here are some more detailed infos (I didn't have a look at the logic itself yet 🙂).
@ShellyGarion Existing MCX decompositions have test cases defined in Also, I believe all style and linter-related errors have been fixed. |
Could you please add a new test file of the synthesis methods called Unfortunately, it seems that our mcx synthesis tests are somewhat hidden inside the circuit library tests (which we should refactor in the future). See for example these tests:
|
I've added the required tests. I couldn't add tests for checking depth for the 2 ancilla cases because the constant factors in O(log(n)) fluctuate a lot across |
Summary
Implement four new multi-controlled-x synthesis functions:
synth_mcx_1_clean_kg24
,synth_mcx_1_dirty_kg24
,synth_mcx_2_clean_kg24
,synth_mcx_2_dirty_kg24
as discussed in #13913.Details and comments
Once implementations are confirmed, these should be added to the HLS transpiler synthesis plugin.