6
$\begingroup$

Why is the $R_z$ gate sometimes written as:

$$ R_{z}\left(\theta\right)=\begin{pmatrix}1 & 0\\ 0 & e^{i\theta} \end{pmatrix}, $$

while other times it is written as:

$$ R_{z}\left(\theta\right)=\begin{pmatrix}e^{-i\theta/2} & 0\\ 0 & e^{i\theta/2} \end{pmatrix}, $$

and even as:

$$ R_{z}\left(\theta\right)=\begin{pmatrix}e^{-i\theta} & 0\\ 0 & e^{i\theta} \end{pmatrix}? $$

And when we see an algorithm diagram using this gate, does it always work the same regardless of what the $R_z$ representation is ? Do the papers not always say what their standard representation is?

$\endgroup$
  • $\begingroup$ Where did you see the third one? $\endgroup$ – user1271772 Oct 12 '18 at 0:16
  • $\begingroup$ @user1271772 Some random paper I found online after trying to google this. I don't recall. Why? $\endgroup$ – Bella Oct 12 '18 at 0:20
  • 1
    $\begingroup$ Because the third one differs by more than just global phase. I don't think I've seen that representation of $R_z$ before. If you can find it, I would be interested to see. $\endgroup$ – user1271772 Oct 12 '18 at 0:24
  • $\begingroup$ I would assume that paper had defined $R_z(\theta ) = Exp(-i\theta Z)$ instead of $\theta/2$ as is standard in most cases. As long as they were consistent I would assume it doesn't matter. But I agree, for a given $\theta$ the first two are not equal to the third. $\endgroup$ – Dripto Debroy Oct 13 '18 at 16:40
2
$\begingroup$

Two representations of $R_z$ are equivalent if they are the same modulo only a global phase.

$$ \begin{pmatrix}1 & 0\\ 0 & e^{i\theta} \end{pmatrix} = e^{+i\theta/2}\begin{pmatrix}e^{-i\theta/2} & 0\\ 0 & e^{i\theta/2} \end{pmatrix} $$

If you apply this gate to any state $|\psi\rangle$, the only difference in the outcome is a global (constant) phase of $e^{i\theta/2}$. This cannot be detected by any measurement.

For example measurements on the state:

$$ |\psi\rangle = \frac{1}{\sqrt{2}}\left(|0\rangle + |1\rangle \right) $$

will result in $|0\rangle$ with a probability of $\left|\frac{1}{\sqrt{2}}\right|^2 = \frac{1}{2}$, and
will result in $|1\rangle$ with a probability of $\left|\frac{1}{\sqrt{2}}\right|^2 = \frac{1}{2}$.

Now consider the state: $$ |\psi\rangle = \frac{e^{i\theta/2}}{\sqrt{2}}\left(|0\rangle + |1\rangle \right) $$

Measurements will:
result in $|0\rangle$ with a probability of $\left|\frac{e^{i\theta/2}}{\sqrt{2}}\right|^2 = \frac{1}{2}$, and will
result in $|1\rangle$ with a probability of $\left|\frac{e^{i\theta/2}}{\sqrt{2}}\right|^2 = \frac{1}{2}$.

Two gates that are equivalent up to a global phase (one that's the same for all components) are equivalent for the purpose of anything you will be able to detect by measurement.

$\endgroup$
  • 1
    $\begingroup$ Thank you!! I don't know why I sometimes get confused with this simple things. $\endgroup$ – Bella Oct 12 '18 at 0:19
  • $\begingroup$ Well it takes time to get used to these "simple" things, so no one blames you at all! $\endgroup$ – user1271772 Oct 12 '18 at 0:23
3
$\begingroup$

Note that the first two are proportional with a $e^{i \theta /2}$ factor. Even as you tensor with other gates and continue multiplying, this just comes out in front as an unobservable global phase. Distinguishing the last one you can tell by looking at the range of angles they allow. 0 to $2\pi$ etc. If the authors fail to include their conventions , you could find the conventions described in their previous writings. Maybe they forgot in the current paper, but remembered before. Also if they are working with some particular software elsewhere, then it seems likely they are using the same conventions as the software does.

$\endgroup$
2
$\begingroup$

As already explained, the first two are equivalent.

If no convention is given, the first two are being meant - in that case, one needs to rotate by $2\pi$ to get the identity (up to a global phase), which is the natural convention. (Also, it is the evolution generated by the spin-1/2 operator $S_z=\tfrac12\sigma_z$ in time $t=\phi$.)

If $R_z(\phi)$ is defined, any definition is ok - though one deviating from the standard one might not be the wisest choice.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.