-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make optimize_1q_gates U and P aware (#5429)
* Make optimize_1q_gates U aware The optimize 1q gates pass currently only operates on u1, u2, u3 (or a subset of that), however the u gate is interchangeable with the u3 gate and the pass can be run if there is a u in the basis just as easily as if it were a u3. This comes up for backends with overcomplete basis sets, like Aer, which can have u and u3 in the same circuit. The optimization pass will not simplify those gates despite it being possible. * Make Optimize1QGates Phase gate aware too Just as U and U3 are interchangeable, U1 and P are also interchangeable. This commit makes the same change to the Optimize1QGates pass done earlier for supporting U for U1 and P so that if will work for a basis where P is used instead of U1. * Fix lint Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f63d2cc
commit 9e6a016
Showing
2 changed files
with
298 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.