# Hadamard gate - resulting state

For a single qubit Hadamard gate, the representing matrix is $$\frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\1&-1\end{bmatrix}$$ And if you apply this to the state $|0\rangle$ you get $$\frac{|0\rangle+|1\rangle}{\sqrt{2}} \, .$$ This state can be rewritten as $$\frac{\begin{bmatrix}0\\1\end{bmatrix}+\begin{bmatrix}1\\0\end{bmatrix}}{\sqrt{2}} \quad \text{or} \quad \frac{\begin{bmatrix}1\\1\end{bmatrix}}{\sqrt{2}} \quad \text{or} \quad \frac{1}{\sqrt{2}} \begin{bmatrix}1\\1\end{bmatrix} \quad \text{or} \quad \begin{bmatrix}\frac{1}{\sqrt2}\\\frac{1}{\sqrt2}\end{bmatrix}$$ right?

If so, using this, let's say you have the superposition $\alpha |0\rangle + \beta |1\rangle$. Can you then plug it in and get $\begin{bmatrix}\frac{\beta}{\sqrt2}\\\frac{\alpha}{\sqrt2}\end{bmatrix}$? So if you started with a qubit represented by the vector $\begin{bmatrix}0.5\\0.75\end{bmatrix} \, ,$ say, then you'd end up with $\begin{bmatrix}\frac{0.5}{\sqrt2}\\\frac{0.75}{\sqrt2}\end{bmatrix} \, ,$ right?

Edit: So, overall, I'd say I'm having trouble figuring out exactly why you'd write it as $\frac{|0\rangle+|1\rangle}{\sqrt{2}}$ when you could write it as $\begin{bmatrix}\frac{\beta}{\sqrt2}\\\frac{\alpha}{\sqrt2}\end{bmatrix}$, which strikes me as easier to do calculations with (though again, that's just me).

• There are a few problems with this post. First, and most importantly, it asks too many separate questions. The first question, about whether those four ways of representing the state are correct, is a single, focused, well defined question and should exist as its own post. Second, the next question, about multiplying the $x$ coordinate by $\beta$ is hard to understand. I think OP is asking how to compute the result of a Hadamard acting on an arbitrary initial state, but the wording about multiplying the "$x$ coordinate" doesn't make sense to me. – DanielSank Oct 4 '16 at 2:44
• @DanielSank, I edited the question to make it clearer. – heather Oct 4 '16 at 17:03
• Have you tried doing the calculation by yourself?. If you have $\hat{H} \vert 0 \rangle = \frac{1}{\sqrt{2}} (\vert 0 \rangle + \vert 1 \rangle)$, $\hat{H} \vert 1 \rangle = \frac{1}{\sqrt{2}} (\vert 0 \rangle - \vert 1 \rangle)$ its direct to see that $\hat{H} (\alpha \vert 0 \rangle + \beta \vert 1 \rangle = \frac{1}{\sqrt{2}}( \vert 0 \rangle (\alpha + \beta) + \vert 1 \rangle (\alpha - \beta))$ – Jasimud Oct 4 '16 at 17:13
• @Jasimud, I did try to do it (that is what I gave, what I did) but I'm not sure if it is right. I am also not too great at ket/bra notation and the math behind it, which is why I'm asking. – heather Oct 4 '16 at 17:17
• @heather, while I may or may not disagree with this, "check my work" questions are considered off-topic. Is there a particular conceptual issue you're having trouble with? By the way, since $H$ is a linear transformation, it is true by definition that $H(\alpha |0\rangle + \beta |1 \rangle) = \alpha H |0 \rangle + \beta H |1 \rangle$. – DanielSank Oct 4 '16 at 17:20

$\hat{H} = \frac{1}{\sqrt{2}} \begin{bmatrix}1&1\\1&-1\end{bmatrix}$

It's (maybe) more easily understood as:

$\hat{H} = \frac{1}{\sqrt{2}} (\lvert 0 \rangle \langle 0 \lvert + \lvert 0 \rangle \langle 1 \lvert + \lvert 1 \rangle \langle 0 \lvert - \lvert 1 \rangle \langle 1 \lvert)$

So it's straight forward to obtain the result:

$\hat{H} \lvert 1 \rangle = \frac{1}{\sqrt{2}} (\lvert 0 \rangle \langle 0 \lvert + \lvert 0 \rangle \langle 1 \lvert + \lvert 1 \rangle \langle 0 \lvert - \lvert 1 \rangle \langle 1 \lvert) \lvert 1 \rangle = \frac{1}{\sqrt{2}} (\lvert 0 \rangle - \lvert 1 \rangle$)

Where we used that $\langle 0 \lvert 1 \rangle = 0$. In the same fashion you could calculate the result of $\hat{H}(\alpha \lvert 0 \rangle + \beta \lvert 1 \rangle)$ where you obtain:

$\hat{H}(\alpha \lvert 0 \rangle + \beta \lvert 1 \rangle) = \frac{1}{\sqrt{2}}(\lvert 0 \rangle (\alpha + \beta) + \lvert 1 \rangle (\alpha - \beta))$

If you are willing to use the representation of the kets, your state will be:

$\alpha \lvert 0 \rangle + \beta \lvert 1 \rangle = \alpha\begin{bmatrix}1\\0\end{bmatrix} + \beta \begin{bmatrix}0\\1\end{bmatrix} = \begin{bmatrix}\alpha \\ \beta \end{bmatrix}$

And then it's only a matrix multiplication