9

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?

Sanchayan Dutta
  • 17,945
  • 8
  • 50
  • 112
Bella
  • 93
  • 2

3 Answers3

4

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.

3

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.

AHusain
  • 3,723
  • 2
  • 11
  • 18
2

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.

Norbert Schuch
  • 8,142
  • 1
  • 19
  • 30