Skip to content
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 34 commits into from
Aug 4, 2020
Merged

Add U and Phase gate #4765

merged 34 commits into from
Aug 4, 2020

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Jul 21, 2020

Summary

Adds U/CU and Phase/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.

@Cryoris Cryoris requested a review from a team as a code owner July 21, 2020 09:18
@Cryoris Cryoris added this to the 0.15 milestone Jul 21, 2020
qiskit/circuit/library/standard_gates/p.py Outdated Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Outdated Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Outdated Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Outdated Show resolved Hide resolved
qiskit/qasm/libs/qelib1.inc Outdated Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Outdated Show resolved Hide resolved
qiskit/circuit/library/standard_gates/u.py Outdated Show resolved Hide resolved
@kdk kdk added the Changelog: New Feature Include in the "Added" section of the changelog label Aug 3, 2020
@kdk kdk added the automerge label Aug 3, 2020
@mergify mergify bot merged commit 8e5639a into Qiskit:master Aug 4, 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
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants