# Example of using the Hadamard's matrix to determine the superposition

I've came across those notes for Quantum computation from John Watrous. I am having troubles understanding the last example.

We have those two vectors, or if I understood correctly, from now on called superpositions \begin{align} v_0= \begin{pmatrix} \frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} \end{pmatrix}, && v_1= \begin{pmatrix} \frac{1}{\sqrt{2}}\\ -\frac{1}{\sqrt{2}} \end{pmatrix}. \end{align}

And we have the Hadamard's matrix $$H= \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix}.$$

We have a qubit, but we do not know, in which of the two possible superpositions $v_0,v_1$ it is (was). Measuring right away gives us $1/2$ at each coordinate of both $v_0,v_1$, so it does not help. In the example they advice us to first operate $H$ on the superpositions and measure afterwards.

That confuses me. I see, that \begin{align} Hv_0= (1,0)^\top&\\ Hv_1= (0,1)^\top. \end{align}

But I do not see, how this would help me, for example in the case, when \begin{align} z_0= \begin{pmatrix} \frac{1}{2}\\ \frac{\sqrt{3}}{2} \end{pmatrix}, && z_1= \begin{pmatrix} \frac{1}{2}\\ -\frac{\sqrt{3}}{2} \end{pmatrix}. \end{align}

Then \begin{align} Hz_0= \left(\frac{1+\sqrt{3}}{2\sqrt{2}}, \frac{1-\sqrt{3}}{2\sqrt{2}}\right)^\top&\\ Hz_1= \left(\frac{1-\sqrt{3}}{2\sqrt{2}}, \frac{1+\sqrt{3}}{2\sqrt{2}}\right)^\top. \end{align}

I mean, being vague: let's say $v_0,v_1$ are some states in the past, and now, in the present I have the state $0$ (from $(1,0)^\top$), resp. $1$ (from $(0,1)^\top$). And the question is, what was the previous state? Was it $v_0$ or $v_1$. Then I can view applying Hadamard's transformation as some kind of experiment, that had to happen to $v_0$ or $v_1$ (assuming I know, it was in one of those states) because of the outcome. In this analogy for the second example I would have to use different experiment, to determine, in which state it was before - depending on the outcome of the experiment?

Note

To make myself clear, I would like to understand the concept of quantum computation. From mathematical view it seems very easy (only $2\times 2$ matrices), and since I have no physics background, the physics motivation looks bit vague. As you can tell, I am even struggling to put this into words.

The short answer to your question is that, yes, you would have to apply a different transformation in your second example, but that, in that particular example, you would not always be able to determine with which of the two states the system had been in. The reason for the latter is that the two state vectors in the second example are not orthogonal, so no unitary transformation $U$ will transform them to the form $$Uz_0=\begin{pmatrix}1\\ 0\end{pmatrix},\qquad Uz_1=\begin{pmatrix}0\\ 1\end{pmatrix}.$$ For more discussion of this point, see below.

In quantum mechanics, the state of a physical system is described by a state vector (an element of a Hilbert space) whose elements (in a particular basis) are complex numbers called amplitudes. The squared magnitude of the amplitude associated with a given basis vector, which itself corresponds to a given physical state, is the probability of measuring the system to be in that state.

To make your example more concrete, spin-$\frac{1}{2}$ particles such as electrons, protons, and neutrons are, ignoring other degrees of freedom, two-state systems. So a measurement of spin along, say, the $z$-axis can only find one of two values, $\hbar/2$ and $-\hbar/2$, where $\hbar$ is a physical constant. In the basis where $\begin{pmatrix}1\\ 0\end{pmatrix}$ corresponds to positive spin and $\begin{pmatrix}0\\ 1\end{pmatrix}$ to negative spin, the state vector $\begin{pmatrix}\alpha\\ \beta\end{pmatrix}$, with $\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1$, corresponds to a system in which the probability of measuring spin positive along the $z$-axis is $\lvert\alpha\rvert^2$ and the probability of measuring spin negative along the $z$-axis is $\lvert\beta\rvert^2$.

Both $\begin{pmatrix}1/\sqrt{2}\\ 1/\sqrt{2}\end{pmatrix}$ and $\begin{pmatrix}1/\sqrt{2}\\ -1/\sqrt{2}\end{pmatrix}$ correspond to systems in which the probabilities of measuring positive or negative spin along the $z$-axis are each $50\%$. We say that they are superpositions of positive and negative spin states. But the two are physically different. The state vector $\begin{pmatrix}1/\sqrt{2}\\ 1/\sqrt{2}\end{pmatrix}$, in fact, describes a system in which the probability of measuring the spin along the $x$-axis to be positive is $100\%$, while $\begin{pmatrix}1/\sqrt{2}\\ -1/\sqrt{2}\end{pmatrix}$ describes a system in which the probability of measuring the spin along the $x$-axis to be negative is $100\%$. So the Hadamard transform corresponds to a sort of rotation. We see here an example of Heisenberg uncertainty: if you are certain of the spin along the $x$-axis, you have maximal uncertainty of the spin along the $z$-axis. Note that $$\begin{pmatrix}1\\ 0\end{pmatrix}= \frac{1}{\sqrt{2}}\begin{pmatrix}1/\sqrt{2}\\ 1/\sqrt{2}\end{pmatrix}+ \frac{1}{\sqrt{2}}\begin{pmatrix}1/\sqrt{2}\\ -1/\sqrt{2}\end{pmatrix},$$ so the same is true in reverse: a state of positive spin along the $z$-axis is a superposition of states of positive and negative spin along the $x$-axis.

Understanding measurement in quantum mechanics remains a difficult and contentious problem, but the following picture, due to von Neumann, can serve as a starting point.

• As long as no measurement is made, the evolution of the state vector is described by a unitary transformation. Unitarity guarantees that total probability remains $1$. In other words, if the unitary transformation $U$ is applied to the state vector $\begin{pmatrix}\alpha\\ \beta\end{pmatrix}$, with $\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1$, to produce the state vector $\begin{pmatrix}\alpha'\\ \beta'\end{pmatrix}$, then unitarity ensures that $\lvert\alpha'\rvert^2+\lvert\beta'\rvert^2=1$.
• In a measurement, something irreversible happens, and any superposition is lost. Physical observables, that is, possible measurements, correspond to Hermitian (self-adjoint) operators. The measured value will be one of the eigenvalues of the operator. After the measurement, the state vector will be the corresponding eigenvector. The measurement process is not unitary. In your example, spin along the $z$-axis corresponds to the operator $$\frac{\hbar}{2}\begin{pmatrix}1 & 0\\ 0 & -1\end{pmatrix},$$ while spin along the $x$-axis corresponds to the operator $$\frac{\hbar}{2}\begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}.$$ You can confirm that both operators have a pair of eigenvalues $\pm\hbar/2$, and that the eigenvectors are the state vectors appearing in your example. Incidentally, these matrices are Pauli spin matrices; spin along the $y$-axis corresponds to the operator $$\frac{\hbar}{2}\begin{pmatrix}0 & -i\\ i & 0\end{pmatrix}.$$

Returning to your second example, suppose we apply the unitary transformation $$U_0=\begin{pmatrix}\frac{1}{2} & \frac{\sqrt{3}}{2}\\ -\frac{\sqrt{3}}{2} & \frac{1}{2}\end{pmatrix}$$ to the system. Then $$U_0z_0=\begin{pmatrix}1\\ 0\end{pmatrix},\qquad U_0z_1=\begin{pmatrix}-\frac{1}{2}\\ -\frac{\sqrt{3}}{2}\end{pmatrix}.$$ If you now make a measurement and find the system to be in the state corresponding to the second (bottom) element of these vectors, then you know that the system must have been in state $z_1$ since the probability of that result is $0$ for state $z_0$. If we measure the system to be in the state corresponding to the first element, we cannot be certain whether the original state was $z_0$ or $z_1$.

On the other hand, if we apply the unitary transformation $$U_1=\begin{pmatrix}\frac{1}{2} & -\frac{\sqrt{3}}{2}\\ \frac{\sqrt{3}}{2} & \frac{1}{2}\end{pmatrix}$$ to the system then $$U_1z_0=\begin{pmatrix}-\frac{1}{2}\\ \frac{\sqrt{3}}{2}\end{pmatrix},\qquad U_1z_1=\begin{pmatrix}1\\ 0\end{pmatrix}.$$ If you now make a measurement and find the system to be in the state corresponding to the second element of these vectors, then you know that the system must have been in state $z_0$ since the probability of that result is $0$ for state $z_1$. If we measure the system to be in the state corresponding to the first element, we again cannot be certain whether the original state was $z_0$ or $z_1$.

As you noticed, other unitary transformations, such as the Hadamard transform, may leave you uncertain as to the original state, no matter the outcome of the measurement.

• I have corrected an inaccuracy in my first paragraph and added some explanation of this point at the end of the post. It is not the case that you would never be able to determine the original state in your second example, which is what I originally said. – Will Orrick May 26 '15 at 9:39
• Thanks a lot! I can imagine, that putting this answer together was quite a work. I am going through it, but need to say, that this is broad topic for me, so I'll give it few days before I consider really accepting it, but you have +1 straight away! – quapka May 26 '15 at 16:12
• @quapka: no problem. Let me know if you have any questions. Your question was somewhat open-ended, so I'm not sure I hit the right points. – Will Orrick May 27 '15 at 12:22
• Thanks. The problem is, that I am in fact writing about $C^*$-algebras, and calculating irreducible representation, those are constructed from pure states. But those states aren't vectors, a state is in general positive linear functional. But I am kinda lost in the motivation, so I am trying to get my head around those examples from Quantum physics, although I need to do something bit different. – quapka May 27 '15 at 20:31
• @quapka: I've always been fond of the first chapter of Sakurai's Modern Quantum Mechanics for providing the physical motivation for the matrix formulation of quantum mechanics. Not sure whether that would help with what you're trying to do. – Will Orrick May 28 '15 at 14:44