# Beginners doubt: calculating probability of one qubit based on other in a 2 qubit system

This is going to look like homework because it is from a self-inflected Coursera course. I have already found the answer by trial and error but I want to clear my logic. (Coz I'm not getting sleep otherwise and I can't ask the question in Coursera without revealing too much and ruining the quiz for others.) Instead of doing the long math here I used the online calculator: here’s a link: Once again online calculator to help : Link:

The result comes out as 3/4 but the expected answer is set as 1/2. Can anyone help? I might be missing something very simple.

### Edit

The complete solution:

\begin{aligned}|\phi| = {(1+ \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle +|-\rangle)|0\rangle+{(1- \sqrt{3}i)\over 4\sqrt{2}}(|+\rangle + |-\rangle)|1\rangle \\ + {(1- \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle-|-\rangle)|0\rangle+{(1+ \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle - |-\rangle)|1\rangle\end{aligned}

By dropping the $$|+\rangle$$ combinations we are left with

\begin{aligned}|\phi| = {(1+ \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|0\rangle-{(1- \sqrt{3}i) \over 4\sqrt{2}}\rangle|1\rangle+{(1- \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|0\rangle-{(1+ \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|1\rangle\end{aligned}

This is where I was wrong to not solve it even further.

$$|\phi| = ({(1+ \sqrt{3}i) \over 4\sqrt{2}}-{(1- \sqrt{3}i) \over 4\sqrt{2}})|-\rangle|0\rangle+({(1- \sqrt{3}i) \over 4\sqrt{2}}-{(1+ \sqrt{3}i) \over 4\sqrt{2}})|-\rangle|1\rangle$$

$$|\phi| = {\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle$$

Next, we normalize this.

$$|\phi| = {({\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle) \over \sqrt {{\left|\sqrt{3}i \over 2\sqrt{2}\right|^2}+{\left|\sqrt{3}i \over 2\sqrt{2}\right|^2}}}$$

$$|\phi| = {2\sqrt{3} \over 3} . {\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{2\sqrt{3} \over 3}.{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle)$$

$$|\phi| = {1 \over \sqrt{2}}|-\rangle|0\rangle-{1 \over \sqrt{2}}|-\rangle|1\rangle)$$

Hence the probably of second qubit: $$P(|0\rangle)$$ when the first qubit is $$|-\rangle$$ is :

$$|\phi| = {\left ({1 \over \sqrt{2}}\right )}^2 = \frac{1}{2}$$

• Hey @S4nd33p! While the image format provided works, it's very preferable to use LaTeX in the future! If you have time, I'd recommend updating the question to be formatted in LaTeX. – C. Kang Nov 20 '19 at 6:03
• Thanks for the suggestion, i'll work on it. It does feel a bit stupid not being able to copy-paste the code. In the mean time, ctrl+/- to zoom in/out may help. – S4nd33p Nov 20 '19 at 6:18

## 2 Answers

In the line immediately before Step 2, you have like terms that can be combined. Combine these, then renormalize the vector.

Recognize that your misstep lies in the properties of the amplitude. Generally, for some $$a, b$$ components and $$x, y$$ separation:

$$|a + bi|^2 \neq |x + yi|^2 + |(a - x) + (b - y)i|^2$$

In this case, the like terms aren't combined, so we're combining the probabilities of the individual terms, which doesn't hold.

• Both the answer above helped me to look at my mistake but thanks for pointing out the exact step where I was going wrong. It worked perfect and I will type-out the complete solution in a minute to help anyone else equally hopeless with this like me.(hopefully in latex, if not then as an image - I'm a noob in latex.. sorry).. – S4nd33p Nov 20 '19 at 6:52

There is no long math, and you need not online calculators. When you simply omit $$|+\rangle$$ state of the first qubit after the measurement, the resulting 2-qubit state $$|\Phi\rangle$$ is unnormalized. You just need to factor out the state $$|-\rangle$$ of the first qubit and normalize the remaining state of the second qubit before obtaining the final answer.