-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unroll 3-or-moreQ pass #1614
Unroll 3-or-moreQ pass #1614
Conversation
This should not be just 3 qubit gates. We should have a pass that unrolls to 1 and 2 qubit gates. Why can't we call the unroll pass before swappers |
The |
Then you can set it by the basis you want. If you are breaking up a cox you need to know what. For the mapper it will not mapper which gate basis you choose as long as it is single and two qubit. |
|
It seems like what this pass should do is to unroll recursively down to a 1Q and 2Q basis. Decomposing just 3Q gates is limiting because what if the circuit has a 4Q or 5Q composite gate? |
I see your point there! It will no be testable until we don't have better support for custom gates. I can modify it to consider that and be read. Do you think the name |
After talking with @ajavadia and @jaygambetta, I see their point. The pass should be renamed to |
I renamed the pass and I change it to consider 3-or-moreQ gates, not just 3. Ready for review. |
Thanks. This looks good. I updated the pass name to match the title of this PR, as I think that makes more sense. Good to merge. |
* Decompose3Q initial commit * pass and test * style and lint * dag comparison fails in py3.5 * change name, and ge * change pass name, some docstrings
The current swappers do not work with 3Q gates. Therefore, it makes sense to decompose those gates before. This pass decomposes 3q gates recursively.