Why is there a SdgGate before the measurement in the QPD decomposition of CZ gate? #735
Jintao YU (yjt98765)
started this conversation in
General
Replies: 2 comments
|
The figure you show is for the RZZGate and similar, code for which is at qiskit-addon-cutting/qiskit_addon_cutting/qpd/decompositions.py Lines 336 to 368 in be575fa The CRZGate is obtained by sandwiching a RZZGate with certain gate(s) (left as an exercise for the reader), which is why |
0 replies
|
Jim Garrison (@garrison) Thank you for the quick reply! In case someone is still confused, I will show the exercise answer as two SdgGate! This can be confirmed by the following code: import numpy as np
from qiskit import QuantumCircuit
from qiskit.quantum_info import Operator
circuit = QuantumCircuit(2)
circuit.sdg([0, 1])
circuit.rzz(np.pi / 2, 0, 1)
circuitOp = Operator.from_circuit(circuit)
print(circuitOp)The printed result is which is CZ with a global phase. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The source code
qiskit-addon-cutting/qiskit_addon_cutting/qpd/decompositions.py
Lines 447 to 464 in be575fa
corresponds to the following figure in the original paper
I do not understand the SdgGate in Line 451, which is used in four map cases.
I know that$e^{i\pi Z/2}=iZ$ and $(I\pm Z)/2$ is Z-basis measurement. Does the $S^\dagger$ gate relate to the coefficient $i$ ?
All reactions