Skip to content

Sqrt(X) and C-Sqrt(X) gates#4638

Merged
ajavadia merged 43 commits into
Qiskit:masterfrom
Cryoris:sx
Aug 5, 2020
Merged

Sqrt(X) and C-Sqrt(X) gates#4638
ajavadia merged 43 commits into
Qiskit:masterfrom
Cryoris:sx

Conversation

@Cryoris
Copy link
Copy Markdown
Collaborator

@Cryoris Cryoris commented Jul 2, 2020

Summary

Add the Sqrt(X) (as SX) and C-Sqrt(X) (as CSX) gates and closes #4637.

Details and comments

Uses the decompositions

sx q0 {rz(-pi/2) q0; h q0; rz(-pi/2) q0;}   # contains global phase
csx q0, q1 {h q1; cu1(pi/2) q0, q1; h q1;}

@Cryoris Cryoris added the Changelog: Added Add an "Added" entry in the GitHub Release changelog. label Jul 2, 2020
@Cryoris Cryoris requested a review from ajavadia July 2, 2020 10:15
@Cryoris Cryoris requested a review from a team as a code owner July 2, 2020 10:15
@kdk kdk added this to the 0.15 milestone Jul 7, 2020
@ajavadia
Copy link
Copy Markdown
Member

In the equivalence library there is an entry for u3 in terms of rx(pi/2) (in u3_qasm_def). Can you create another entry for this but this time with sx?

@Cryoris
Copy link
Copy Markdown
Collaborator Author

Cryoris commented Jul 12, 2020

Should we add a SXdgGate for this? Probably yes since all of the basic single qubit gates have inverses.

@ajavadia
Copy link
Copy Markdown
Member

Yes we should. sx is rx(pi/2) and sxdg is rx(-pi/2).
(This is where v and vdg start to look better :) )

Comment thread qiskit/circuit/library/standard_gates/equivalence_library.py Outdated
Comment thread qiskit/visualization/qcstyle.py Outdated
@Cryoris Cryoris requested review from ajavadia and mtreinish July 29, 2020 12:19
ajavadia
ajavadia previously approved these changes Aug 4, 2020
@ajavadia ajavadia merged commit 5fdd6b9 into Qiskit:master Aug 5, 2020
@Cryoris Cryoris deleted the sx branch January 12, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Added Add an "Added" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sqrt(X) and C-Sqrt(X) gates

4 participants