-
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
Add simplify of U3->U1/U2 in OneQubitEulerDecomposer #5554
Conversation
@kdk and @mtreinish. The latest commits fix several issues with Optimize1qGatesDecomposition (O1GD). See #5556. The solution here was to skip over runs with In the current version of this draft, setting The final step in this PR would be to implement Matthew's idea for choosing between O1G and O1GD from #5531. |
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.
Thanks @enavarro51 , this looks good. One comment below. Also, can you add a release note?
…arro51/qiskit-terra into optimize_1q_gates_5468_5531
…arro51/qiskit-terra into optimize_1q_gates_5468_5531
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.
Thanks for the updates @enavarro51 , this is looking good. Few comments below.
qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py
Outdated
Show resolved
Hide resolved
qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py
Outdated
Show resolved
Hide resolved
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.
Thanks @enavarro51 , this is looking good. Two small comments below and then I think this is good to go.
qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py
Outdated
Show resolved
Hide resolved
qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py
Outdated
Show resolved
Hide resolved
…arro51/qiskit-terra into optimize_1q_gates_5468_5531
Summary
Fixes #5468
Fixes #5556
Details and comments
This PR will simplify U3 gates in the OneQubitEulerDecomposer to U1 when theta is 0 and to U2 when theta is pi/2. This will allow the use of Optimize1qGatesDecomposition exclusively or in additional cases over Optimize1qGates. This first draft leaves the optimization as is.
The next phase will be to implement the conditions for optimization as discussed in #5531.