I have a tensor product of a 5 qubit state |h>. From this I want to calculate the probability of the 2nd qubit being in state |1>. Can someone show me how I can do this? I know I can use the Born rule but I am not sure how. For context I am using Python and NumPy.

  • 1
    $\begingroup$ How is the state presented to you? 2^5 amplitudes in the computational basis? As a circuit applied to a starting state? $\endgroup$ – AHusain Jul 10 '19 at 21:58
  • $\begingroup$ @AHusain Presented as a 32 entry long vector tensor product of the 5 qubit states $\endgroup$ – meelszz Jul 10 '19 at 22:26

So probability of the second qubit being in state $|1\rangle$ is the probability of the 5 qubit system being in a state that has $|1\rangle$ as the second qubit.

So among all the 32 states, find the ones that have $|1\rangle$ in the second qubit, which will be half of them, for example $|01100\rangle$ and $|11111\rangle$. Add up the corresponding probabilities, which is the absolute square of the amplitudes presented to you in vector form.

Here's an example for a 3 qubit state:

$$\begin{matrix} 000 \\ 001 \\ 010 \\ 011 \\100 \\ 101 \\ 110 \\ 111 \\ \end{matrix} \begin{bmatrix} 0 \\0.577 \\ 0 \\ 0.577\\ 0\\ 0\\ 0\\ 0.577\\ \end{bmatrix}$$

In the above case, the probability that the second qubit is $|1\rangle$ is probability that it will be in $|010\rangle, |011\rangle, |110\rangle$ or $|111\rangle$, which is $|0.577|^2 + |0.577|^2$ which is 0.666.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.