# Construction of ${R_n(\theta)}$ using only the Hadamard and ${\pi/8}$ gates

In the "Quantum Computation and Quantum Information 10th Anniversary textbook by Nielsen & Chuang", they claim that Eqn(4.75) is a rotation about the axis along the direction ( $${cos(\pi/8)}$$, $${sin (\pi/8)}$$, $${cos(\pi/8)}$$ ). They then defined an angle $${\theta}$$ such that:

$${cos(\theta/2)}$$ = $$cos^2$$($${\pi/8}$$)

and its also claimed to be an irrational multiple of 2$${\pi}$$.
We know that the rotational matrices about any arbitrary axis takes the form of

$${cos(\theta/2)}$$ $${I}$$ - $${i}$$ ($${n_x}{X}$$ + $${n_y}{Y}$$ + $${n_z}{Z}$$) $${sin(\theta/2)}$$ ,

but Eqn(4.75) gives:

$${cos^2(\pi/8)}$$ $${I}$$ - $${i}$$ [ $${cos(\pi/8)(X+Z)+sin(\pi/8)Y}$$ ] $${sin(\pi/8)}$$

My question is how does this $${\theta}$$ be able to simultaneously satisfy $${sin(\pi/8})$$? Why does $${\theta}$$ be referenced from $${cos^2(\pi/8)}$$ instead of $${sin(\pi/8})$$?

$${\displaystyle R = \cos^2(\pi/8) I_2 -\frac{i}{\sqrt{1+\cos^2(\pi/8)} } \times \quad \times \left [\cos(\pi/8)(X+Z)+ \sin(\pi/8)Y \right ] \sqrt{1+\cos^2(\pi/8)}\sin(\pi/8)}$$
$${\displaystyle e^{ia({\hat {n}}\cdot {\vec {\sigma }})}=I\cos {a}+i({\hat {n}}\cdot {\vec {\sigma }})\sin {a}}$$
• Okay I've not thought about this before. But now there's a constant factor below the $i$. Do we bring in this factor into the Pauli matrices and define $\sigma$ as such? – C.C. Dec 5 '18 at 1:12
• No, the constant factor is just the normalization factor of the unit radius vector $\hat{n} = \frac{[ cos(\pi/8), sin(\pi/8), cos(\pi/8)] }{\sqrt{1+cos^2(\pi/8)}}$. The Pauli vector exponentiation formula is correct only if the vector $\hat{n}$ is a unit vector. Nielsen and Chuang wrote this vector without normalization; they used the vector notation $\vec{n}$ to emphasize this fact and left it for the reader to do the above manipulation. – David Bar Moshe Dec 5 '18 at 8:25