Create explicit C3XGate/C4XGate in MCXGrayCode#5601
Merged
mergify[bot] merged 6 commits intoJan 21, 2021
Conversation
Cryoris
approved these changes
Jan 21, 2021
Collaborator
Cryoris
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix!
mergify Bot
pushed a commit
that referenced
this pull request
Jan 21, 2021
* Make MCX a C3X or C4X if MCXGrayCode and 3 or 4 controls * Update test * Place all explicit in MCXGrayCode Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit 3b59319)
mergify Bot
added a commit
that referenced
this pull request
Jan 25, 2021
* Create explicit C3XGate/C4XGate in MCXGrayCode (#5601) * Make MCX a C3X or C4X if MCXGrayCode and 3 or 4 controls * Update test * Place all explicit in MCXGrayCode Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit 3b59319) * Update releasenotes/notes/mcx_create_explicit_c3x_c4x-d4475c0bb70fae49.yaml Co-authored-by: Edwin Navarro <enavarro@comcast.net> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5447
Details and comments
In the current master, the
MCXGatewill explicitly create aCXGateorCCXGateifnum_ctrl_qubitsis 1 or 2, respectively, for all modes of theMCXGate. If there are no ancillas, thenMCXGrayCodeis used, and in this PR, aC3XGateor aC4XGateare explicitly created ifnum_ctrl_qubitsis 3 or 4, respectively. For example, in this circuit, 2C3XGatesare created.