# Outcome of Hadamard transformation on a complex state

I would like to calculate the state after a transformation using the Hadamard gate on a complex state. I get stuck mid-calculation, most likely due to not being able to dealing with the global state. Anybody who can tell me what the part on the question mark should be (and/or which other errors I made)?

$$H {|0\rangle + i|1\rangle\over\sqrt 2} \equiv {1\over\sqrt 2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix} {1\over\sqrt 2} \begin{bmatrix} 1 \\ i \end{bmatrix} = {1\over2} \begin{bmatrix}1+i\\1-i\end{bmatrix} = ? = {1\over\sqrt 2} \begin{bmatrix}1\\-i\end{bmatrix} \equiv {|0\rangle - i|1\rangle\over\sqrt 2}$$

Update trying to use @DaftWullie his answer: $$H {|0\rangle + i|1\rangle\over\sqrt 2} \equiv {1\over\sqrt 2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix} {1\over\sqrt 2} \begin{bmatrix} 1 \\ i \end{bmatrix} = {1\over2} \begin{bmatrix}1+i\\1-i\end{bmatrix} \neq {1\over\sqrt 2} \begin{bmatrix}1+i\\1-i\end{bmatrix} = \begin{bmatrix}{1\over\sqrt 2}+{1\over\sqrt 2}i\\{1\over\sqrt 2}-{1\over\sqrt 2}i\end{bmatrix} = \begin{bmatrix}\cos(\pi/4)+i \cdot \sin(\pi/4)\\ (\cos(\pi/4)+i \cdot \sin(\pi/4))\cdot(\cos(\pi/2-i\cdot \sin(\pi/2))\end{bmatrix} = \begin{bmatrix}e^{i\pi/4}\\e^{-i\pi/2}e^{i\pi/4}\end{bmatrix}=\\ e^{i\pi/4}\begin{bmatrix}1\\e^{-i\pi/2}\end{bmatrix}= e^{i}e^{\pi/4}\begin{bmatrix}1\\e^{-i\pi/2}\end{bmatrix}\equiv e^{\pi/4}\begin{bmatrix}1\\e^{-i\pi/2}\end{bmatrix} = {1\over\sqrt 2}\begin{bmatrix}1\\-i\end{bmatrix} \equiv {|0\rangle - i|1\rangle\over\sqrt 2}$$

Here I still get partly stuck, as I was expecting to calculate using $${1\over 2}$$ instead of $${1\over\sqrt 2}$$. I see that this too falls into the category of "multiplies the whole vector has no observable consequence", but I wonder if I can calculate this "cleaner" (or did I simply make a mistake?).

Also, how do I indicate removing the global phase in an equation? Do I use the equivalence symbol? An equal symbol with a footnote above it?

• there is no globally accepted way to denote "equal up to phase". It is sometimes denoted with $\approx$ or $\simeq$, but it might be better to write something like $e^{i\theta}|0\rangle=C|0\rangle$ and specify that $C$ collects irrelevant phase factors – glS Oct 22 '18 at 13:27
• also, in the edit, I do not understand why you just changed $\frac{1}{2}$ into $\frac{1}{\sqrt2}$ – glS Oct 22 '18 at 13:29
• @gis To indicate (with the $\neq$) that I did not yet understand how one changes in the other. Luckily, after DaftWullie his update, it is now clear to me – Thomas Hubregtsen Oct 23 '18 at 11:31

Taking out a common factor, $$?=\frac{e^{i\pi/4}}{\sqrt{2}}\left[\begin{array}{c}1 \\ e^{-i\pi/2}\end{array}\right]$$ Then the equality that comes after the ? is "up to global phases", meaning that any factor $$e^{i\theta}$$ that multiplies the whole vector has no observable consequence.
Following the update... You've made several things worse. Let me emphasise that the things with no obervable consequence are overall multiplicative factors of modulus 1. Lengths are very important and you can't arbitrarily play around with factor of $$\sqrt{2}$$. Let me suggest you think of your sequence thus: $$\frac{1}{2}\left[\begin{array}{c} 1+i \\ 1-i \end{array}\right]=\left[\begin{array}{c} \frac{1+i}{2} \\ \frac{1-i}{2} \end{array}\right]=\left[\begin{array}{c} \frac{e^{i\pi/4}}{\sqrt{2}} \\ \frac{e^{-i\pi/4}}{\sqrt{2}}\end{array}\right]=\left[\begin{array}{c} \frac{e^{i\pi/4}}{\sqrt{2}} \\ \frac{e^{i\pi/4}e^{-i\pi/2}}{\sqrt{2}}\end{array}\right]=e^{i\pi/4}\left[\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{e^{-i\pi/2}}{\sqrt{2}}\end{array}\right]=e^{i\pi/4}\left[\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{-i}{\sqrt{2}}\end{array}\right]$$
I'm not aware for a standadr notation for "up to a global phase". You might chose to write $$\equiv\left[\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{-i}{\sqrt{2}}\end{array}\right]$$, but most people tend to write "up to a global phase".