# How to measure one of the qubits in a two-qubit register?

How do I measure the first qubit of an entangled vector, say
$$\begin{pmatrix} 1 \\ -1 \\ 0 \\ 0 \\ \end{pmatrix}$$ is what I get on the end of Deutsch's algorithm. If I get it right, I should now measure the first qubit in this 2-qubit register. How can I do it?

• You can always measure one qubit, whether in register or not does not matter. I don't understand the question. Dec 1 '19 at 13:12
• Are you asking about matrix representing a measurement? Dec 1 '19 at 14:27

To measure, observe that you are simply projecting a quantum state onto some basis set of vectors. First, I will note that this state is not normalized. Let us first define the following quantum state.

$$|\psi_i\rangle = \begin{pmatrix}1\\-1\\0\\0\end{pmatrix}.$$

Then, calculating the corresponding probability yields: $$|\langle \psi_i|\psi_i\rangle|^2 = (1)(1) + (-1)(-1) = 2.$$

So to normalize this state, we will simply divide by $$\sqrt{2}$$. Thus, we obtain the state: $$|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}.$$ We now wish to measure this state in the standard basis, and so we wish to project the state onto the set of basis vectors: $$|00\rangle = \begin{pmatrix}1\\0\\0\\0\end{pmatrix}, |01\rangle = \begin{pmatrix}0\\1\\0\\0\end{pmatrix},|10\rangle = \begin{pmatrix}0\\0\\1\\0\end{pmatrix},|11\rangle = \begin{pmatrix}0\\0\\0\\1\end{pmatrix}$$.

We will now calculate the probability amplitude of the state collapsing to each of those states. That is, we wish to calculate: $$\langle00|\psi\rangle\\=\frac{1}{\sqrt{2}}\begin{pmatrix}1&0&0&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=\frac{1}{\sqrt{2}}.$$

$$\langle01|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&1&0&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=-\frac{1}{\sqrt{2}}.$$

And although it is trivial to see that the amplitudes of the two remaining states will be zero, I will include the calculations for completeness: $$\langle10|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&0&1&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=0.$$

$$\langle11|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&0&0&1\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=0.$$

And so we see that the probability of obtaining the $$|00\rangle$$ and $$|01\rangle$$ states are 0.5 each, and so measurement of the first qubit must yield the $$|0\rangle$$ state. To see what would happen if you measured the second qubit, simply sample the $$|00\rangle$$ and $$|01\rangle$$ states once according to the aforementioned probabilities.

Edit: In response to a comment left on this answer, I have added the following note. If you have the state:

$$|\psi\rangle = \alpha_0|0\rangle + ... + \alpha_N|N\rangle,$$

then the probability amplitude of obtaining a component of the state, $$|\psi_i\rangle$$, is given by $$\langle \psi_i|\psi\rangle$$. Consequently, the probability of measuring a value associated with $$|\psi_i\rangle$$ is given by $$|\langle \psi_i|\psi\rangle|^2$$.

• I feel like I'll have more questions in future, but then I'll just ask them in another thread. Thank you, Arthur, I appreciate it. You have helped me a lot. Dec 1 '19 at 21:39
• it's also not |<phi|phi>|^2, just <phi|phi>, right? Or does phi(i) means values of the vector? It makes sense then. Dec 6 '19 at 14:13