It is stated in the Qiskit tutorial section 2.4 that if you apply a rotation around the z-axis of π/4 and subsequently a rotation around the x-axis of π/4, the end result is an angle around some axis which is an irrational multiple of π. I have tried to calculate this angle, or deduce why this angle is an irrational multiple of π, but I don't know where to start. How do you prove that this angle is an irrational multiple of π?

Let's make the gate Rz(π/4) Rx(π/4). Since this is a single-qubit gate, we can think of it as a rotation around the Bloch sphere. That means that it is a rotation around some axis by some angle. We don't need to think about the axis too much here, but it clearly won't be simply x, y or z. More important is the angle. The crucial property of the angle for this rotation is that it is an irrational multiple of π. You can prove this yourself with a bunch of math.

Note: the question is explicitly not about the subsequent part that an irrational multiple can lead to any angle, that I do understand.


3 Answers 3


Section 3 in the paper "On Universal and Fault-Tolerant Quantum Computing" by Boykin et al contains the detailed proof of this fact.

The proof goes as follows:

  1. $\exp(-i\frac{\pi}{8}Z)\exp(-i\frac{\pi}{8}X)$ is a rotation of the Bloch sphere with an angle, say, $2\pi\lambda$.
  2. And since $\exp(-i\frac{\pi}{8}Z)\exp(-i\frac{\pi}{8}X) = \cos^2\frac{\pi}{8}I - i[\cos\frac{\pi}{8}(X+Z)+\sin\frac{\pi}{8}Y]\sin\frac{\pi}{8}$, We have $\cos(\lambda\pi)=\cos^2\frac{\pi}{8}$
  3. The number $e^{i2\pi\lambda}$ is a root of the irreducible monic polynomial $x^4 + x^3 +\frac{1}{4}x^2 + x + 1$. Not all coefficients of this polynomial are integers and hence it is not cyclotomic.
  4. Thus $\lambda$ is an irrational number (theorem B.1 in the mentioned paper)
  • $\begingroup$ Wow! I thought I was missing something super obvious, but it's actually more complex than I had thought upfront. Thanks for the link and the summary! :-) $\endgroup$ Mar 10, 2022 at 13:25
  • 1
    $\begingroup$ It turns out you can skip some steps by using Napier's rule for right spherical triangles $\endgroup$ Mar 10, 2022 at 15:06
  • 1
    $\begingroup$ This is not important but I would be grateful if someone could enlighten me. I know nothing about quantum computing but got here from the hot network questions because I am interested in irrationality. Using linear algebra tecniques I calculated the angle $\alpha$ of rotation, but did not get $\cos^2\frac\pi8$, rather: $$\cos\alpha=\frac1{\sqrt2}-\frac14\ ,\quad \cos^2\frac\pi8=\frac1{2\sqrt2}+\frac12\ .$$ However this result does lead to $$\cos\frac\alpha2=\cos^2\frac\pi8\ .$$ I am wondering if maybe a rotation in quantum computing means something different from a rotation in $\mathbb R^3$? $\endgroup$
    – David
    Mar 13, 2022 at 2:41
  • $\begingroup$ Fixed. Thank you @David. $\endgroup$ Mar 13, 2022 at 6:05
  • $\begingroup$ @David This is due to the beautiful representation of single-qubit pure states onto the Bloch sphere, and single-qubit unitary operations as rotations of that sphere: en.wikipedia.org/wiki/Bloch_sphere#Rotations . The factor of 2 discrepancy is due to the fact that SU(2) and SO(3) are not isomorphic, but rather the former is a double-cover of the latter. $\endgroup$
    – Matt
    Mar 13, 2022 at 18:14

Without going into the mathematical rigour of the correct answer above, we can directly address the intuition for why one should expect the rotation angle to be an irrational multiple of $\pi$.

We start by noticing that $z$ axis and the $x$ axis are orthogonal to each other. If we take our intuition from Euclidean geometry, what happens when we first travel by $\pi/4$ along the $z$ axis and then by $\pi/4$ along the $x$ axis? These two paths form two sides of an isosceles right triangle, so the distance between the final point and the original point will be $\sqrt{2}\times \pi/4$. The Pythagoreans proved that the square root of $2$ is irrational by considering squares with side lengths $1$ and looking at the length of the diagonal, so it is this millenia-old intuition that prepares us for the final rotation angle to be an irrational multiple of $\pi$.

When we apply this intuition to the sphere, lengths should in some sense become even more irrational because of the extra curvature, but we have to remember that the intuition will break down for rotations by $\pi/2$ because these give us an equilateral triangle on the sphere with three right angles (other special angles could also give us trouble).

The full glory of this intuition comes into play with Napier's rule for right spherical triangles, which says that the three side lengths obey $$\cos a\cos b=\cos c$$ when the right angle is at the corner between sides $a$ and $b$. We are looking at iscosceles right triangles [with $a=b=\pi/8$ because we have to worry about factors of $2$ between the definition of the "rotation angle" and the actual angle rotated due to Pauli matrices' commutation relations having an extra factor of $2$ relative to SU(2)], so we are solving for the final angle $c$ in $$c=\arccos[\cos^2(a)],$$ which is generally irrational. To make contact with our Euclidean intuition, we look at what happens when the sphere is large and we don't travel very far on it. Then $a$ and $c$ are small, so we have $$(1+\frac{a^2}{2})^2\approx (1+\frac{c^2}{2}) \quad\Rightarrow \quad 1+a^2\approx 1+\frac{c^2}{2}\quad\Rightarrow \quad \sqrt{2}a\approx c.$$

  • $\begingroup$ I would be interested to know more about this "extra factor of 2" - it sounds as if that might resolve the question I posted as a comment to Egretta Thula's answer. If there is a simple answer that would be great. But it's not really important so please don't spend lots of time answering. $\endgroup$
    – David
    Mar 13, 2022 at 2:57
  • $\begingroup$ @David it's a matter of definition: when you write a rotation by angle $\theta$ using Pauli matrices, you need to write it as $\exp(i \theta \sigma_X/2)$; when you write it using standard Lie algebra operators for SU(2) (like spin or angular momentum) you write it as $\exp(i\theta S_x)$ or $\exp(i\theta J_x)$. The discrepancy is because of the commutators $[\sigma_x,\sigma_y]=2i\sigma_z$ versus the regular SU(2) $[J_x,J_y]=i J_z$ - either way the vector $(J_x,J_y,J_z)$ or $(\sigma_x,\sigma_y,\sigma_z)$ should rotate by angle $\theta$ about the $x$ axis in my example. $\endgroup$ Mar 13, 2022 at 20:05
  • $\begingroup$ @David I like to be consistent and always use SU(2) operators but tutorials like Qiskit define their rotations using Pauli operators, so you have to beware the factors of 2 or just verify what the actual rotation angle is by acting on some easy operator like $\sigma_z$ or easy state like one at the pole of the Bloch sphere. $\endgroup$ Mar 13, 2022 at 20:07
  • $\begingroup$ Thanks @Quantum Mechanic! That's all helpful and interesting. I just did the calculation by standard linear algebra in $\mathbb R^3$ with $2\cos\alpha+1={}$trace of the rotation. $\endgroup$
    – David
    Mar 13, 2022 at 22:16
  • $\begingroup$ @David very good. I should add a point in favour of Paulis: you can always directly compute the matrix exponential, so this is often the easiest method for computing properties of SU(2) (2D is the easiest irreducible representation in which to work in my opinion), you just have to make sure you keep track of the factors of 2 $\endgroup$ Mar 14, 2022 at 13:53

if you apply a rotation around the z-axis of π/4 and subsequently a rotation around the x-axis of π/4, the end result is an angle around some axis which is an irrational multiple of π. I have tried to calculate this angle, or deduce why this angle is an irrational multiple of π, but I don't know where to start.

Egretta's answer covers it, but I'll add a purely geometric answer in terms of eigenvalues/vectors.

Given any rotation matrix $r\in\text{SO(3)}$, $r$ will have 3 eigenvalues (not necessarily distinct) but one of them will always be 1. Call the corresponding eigenvector $\bf{v}_0$. Q: What is the geometric interpretation of $\bf{v}_0$? A: It is the axis of rotation. It is the unique real vector (up to a scalar factor) that a rotation leaves unchanged.

In the specific case of $r=R_z(\pi/4)R_x(\pi/4)$ Mathematica can calculate the eigensystem directly. Pressing the "Exact form" button on that link shows that the 3 eigenvalues are:

$$1 \quad\text{and}\quad \frac{1}{4}\left(2\sqrt{2}-1\pm i\sqrt{7+4\sqrt{2}}\right)$$

Since the eigenvalues $\lambda$ have a magnitude of $|\lambda|=1$ they can be written in the form $\lambda=e^{i\theta}$ for real $\theta\in\mathbb{R}$ and the 2 complex eigenvalues provide the angle of rotation; it is in fact $\theta$. It can be directly computed, and can be seen to be an irrational number itself, but the question is whether or not it is an irrational multiple of $\pi$.

To answer this, we calculate the minimal monic polynomial $p(x)\in\mathbb{Q}[x]$ where all coefficients are rational numbers. This can be performed algebraically on paper by starting with

$$x = \frac{1}{4}\left(2\sqrt{2}-1+i\sqrt{7+4\sqrt{2}}\right)$$

then first isolating $i$ to one side of the equation, squaring both sides to make all terms real, then isolating specific irrational factors (like $\sqrt{2}$) to one side, squaring that, until all terms are rational. You then end up with

$$4 x^4 + 4 x^3 + x^2 + 4x + 4 = 0.$$

It then follows that the minimal monic rational polynomial w/ $\lambda$ as a root is

$$p(x) = x^4 + x^3 + \frac{1}{4}x^2 + x + 1.$$

This is not cyclotomic, since all cyclotomic polynomials have integer coefficients. The cyclotomic/rational number theorem given in the paper Egretta cited then proves that $\theta$ is not a rational multiple of $\pi$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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