-
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 U and Phase gate #4765
Merged
Merged
Add U and Phase gate #4765
Conversation
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
Cryoris
commented
Jul 28, 2020
kdk
reviewed
Jul 30, 2020
kdk
reviewed
Jul 31, 2020
Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Cryoris
commented
Aug 3, 2020
kdk
added
the
Changelog: New Feature
Include in the "Added" section of the changelog
label
Aug 3, 2020
kdk
approved these changes
Aug 3, 2020
DomNomNom
pushed a commit
to DomNomNom/tket
that referenced
this pull request
Jan 6, 2022
dlyongemallo
added a commit
to dlyongemallo/pyzx
that referenced
this pull request
Sep 16, 2023
The `p` gate was added as a standard gate to `qelib1.inc` in Qiskit/qiskit#4765.
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
Adds
U/CU
andPhase/CPhase
gates.Details and comments
The phase gate is equivalent to U1, the U gate equivalent to U3. Unlike CU3 which contains 3 parameters, CU has a total of 4 parameters, where the new one is used to account for a possible phase of the controlled-U gate.
The U gate is called
'u'
, the phase gate called'P'
(which is also how they are displayed in plots).U1/U2/U3 are not yet deprecated. Since this will probably touch a lot of code where references to
'u1'
etc. are hardcoded, this will be addressed in a separate issue.Partially addresses #4106, but doesn't close it since U1/U2/U3 are not removed.