-
Notifications
You must be signed in to change notification settings - Fork 982
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
Qasm for pauli X sqrts #4113
Qasm for pauli X sqrts #4113
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
3335135
to
0a0452b
Compare
@googlebot I fixed it. |
closing for now, got to fix the coverage check |
It looks
|
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.
FYI, if we transpile
a circuit withsxdg
to the stabilizer_simulator
backend, it decomposes sxdg
to SHS
. Maybe we should directly output this decomposition for cirq.X ** -0.5
?
In [2]: circ = QuantumCircuit(2)
...: circ.sx(0)
...: circ.sxdg(1)
...: print(circ)
...: simulator = Aer.get_backend('aer_simulator_stabilizer')
...: circ = transpile(circ, simulator)
...: print(circ)
┌────┐
q_0: ─┤ √X ├─
┌┴────┴┐
q_1: ┤ √XDG ├
└──────┘
global phase: -π/4
┌────┐
q_0: ┤ √X ├──────────
├───┬┘┌───┐┌───┐
q_1: ┤ S ├─┤ H ├┤ S ├
└───┘ └───┘└───┘
In the meantime, please make the changes for cirq.ZPowGate
.
@tanujkhattar thanks for your review, good catches! I added the requested changes for the I would propose to revert the changes for |
Sounds good, Please revert the changes to |
01b1a59
to
5fd5c1c
Compare
@tanujkhattar I reverted the changes for |
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.
LGTM
addresses quantumlib#3728 The issue mentions to [check other stabilizer operations like X**-0.5, Y**0.5, Y**-0.5, Z**0.5 too](quantumlib#3728 (comment)). According to the [qiskit docs](https://qiskit.org/documentation/apidoc/circuit_library.html), there exist only `X**0.5` as `xs` and `X**-0.5` as `xsdg`. Both of these conversions have been implemented and tests are passing locally.
addresses #3728
The issue mentions to check other stabilizer operations like X**-0.5, Y0.5, Y-0.5, Z**0.5 too. According to the qiskit docs, there exist only
X**0.5
asxs
andX**-0.5
asxsdg
. Both of these conversions have been implemented and tests are passing locally.