As far as I know, both Rz and R1 operations in Q# rotate a qubit about the z-axis. In Q# API reference (https://learn.microsoft.com/en-us/qsharp) I found out that the only difference between them is that R1 also applies rotation about the "PauliI" axis, i.e. changes the global phase. In R operation reference (https://learn.microsoft.com/en-us/qsharp/api/qsharp/microsoft.quantum.intrinsic.r) they also say that "When called with pauli = PauliI, this operation applies a global phase. This phase can be significant when used with the Controlled functor". So the question: can you give an example, how can it be significant?
Asked
Active
Viewed 233 times
1 Answers
0
Rz and R1 are indeed different by a global phase of exp(iθ/2). If you use controlled version of the gate on a state (|0⟩ + |1⟩) ⊗ |0⟩ with the first qubit as control, R1 will not modify the state (since it only affects the |1⟩ state), and Rz will transform the state into (|0⟩ + exp(-iθ/2)|1⟩) ⊗ |0⟩. You can use this effect to distinguish those gates.
You can read more about the solution to this competition task in this blog.

Mariia Mykhailova
- 1,987
- 1
- 9
- 18
-
Oh, that was about your Q# Summer contest :) I've already noticed it but anyway, thanks! – old tankist Sep 10 '20 at 13:58