# My calculation for Givens rotation in a quantum state

I am following a tutorial in Given rotations. Suppose I have the quantum state $$|100\rangle$$ and would like to use two Givens $$G$$ with angle $$\theta, \phi$$ rotation to transform it into a superposition of $$\alpha|100\rangle+\beta|010\rangle+\gamma|001\rangle$$. I denote $$\cos(\frac\cdot 2), \sin(\frac\cdot 2)$$ as $$c(\cdot), s(\cdot)$$

Consider $$G(1,4,\phi)$$ which maps $$|100\rangle$$ to $$|001\rangle$$ $$G(1,4,\phi)=\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & c(\phi) & 0 & 0 & -s(\phi)& 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0& 0 & 0\\ 0 & s(\phi)& 0 & 0 & c(\phi) & 0& 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1& 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0& 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0& 0 & 1 \end{bmatrix}$$ and $$G(2,4,\theta)$$ which maps $$|100\rangle$$ to $$|010\rangle$$ $$G(2,4,\theta)=\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & c(\theta)& 0 & -s(\theta)& 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0& 0 & 0\\ 0 & 0 & s(\theta)& 0 & c(\theta)& 0& 0 &0\\ 0 & 0 & 0 & 0 & 0 & 1& 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0& 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0& 0 & 1 \end{bmatrix}$$

$$G(2,4,\phi)G(1,2,\theta)$$ is the mapping that I needs, $$G:=G(2,4,\phi)G(1,4,\theta)=\begin{bmatrix} 1&0&0&0&0&0&0&0\\ 0&c(\phi)&0&0&-s(\phi)&0&0&0\\ 0&-s(θ)s(\phi)&c(θ)&0&-cθs(\phi)&0&0&0\\ 0&0&0&1&0&0&0&0\\ 0&c(θ)s(\phi)&s(θ)&0&c(θ)c(\phi)&0&0&0\\ 0&0&0&0&0&1&0&0\\ 0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&1\end{bmatrix}$$

Now $$G|100\rangle=-s(\phi)|001\rangle-s(\phi) c(\theta)|010\rangle +c(\theta) c(\phi) |100\rangle$$. However the supposed solution is $$c(\theta)s(\phi)|001\rangle - s(\theta)|010\rangle + c(\theta)c(\phi)|100\rangle$$. I don't understand how the 1st and 2nd coefficient is that way

• First you set up $G(1,4,\phi)$ and $G(2,4,\theta)$, but then you use $G(2,4,\phi)$ and $G(1,2,\theta)$ – is that on purpose? Anyway, I suspect you'll get the desired answer if you swap the factors in the product. Commented Feb 7 at 19:51