# Quantum computing problem [closed]

Suppose that a qubit is in the state $|\varphi\rangle=a|0\rangle+\sqrt{1-a^2}|1\rangle$, where $a\in[-1,1]$.

If we first perform a standard basis measurement on this qubit and then perform a $\{|u\rangle,|u^\perp\rangle\}$-basis measurement, where $$|u\rangle=b|0\rangle+\sqrt{1-b^2}|1\rangle \text{ for some }b\in[-1,1],$$ what is the probability that the outcome of the second measurement is $|u\rangle$, in terms of $a$ and $b$?

Edit: I've found a solution, it should be $ab+\sqrt{(1−a^2)(1-b^2)}$.

-

## closed as off-topic by Nathaniel, Waffle's Crazy Peanut, Chris White, akhmeteli, Qmechanic♦Aug 25 '13 at 13:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Nathaniel, Waffle's Crazy Peanut, Chris White, akhmeteli, Qmechanic
If this question can be reworded to fit the rules in the help center, please edit the question.

Shouldn't there be some squares in your expression? (Otherwise the probability might be negative.) –  Peter Shor Feb 24 '13 at 16:42
Please use LaTeX notation, as the fonts you used may not display correctly for other users. –  Emilio Pisanty Feb 24 '13 at 16:44

$$a^2 b^2 + (1-a^2)(1-b^2).$$
The probability that the result of the first measurement is $|0\rangle$ and the result of the second measurement is $|u\rangle$ is $\langle 0|\phi\rangle ^2\langle u|0 \rangle ^2$, which gives the first term: $a^2b^2$. The second term is the probability that the results are respectively $|1\rangle$ and $u\rangle$, and is derived similarly.