2.2 Measuring a quantum bit
We now know that any qubit state is of the form . Let’s say you get your hands on a state and you would like to know the value of . Unfortunately, quantum mechanics does not allow you to learn it! This seems like a big problem – what is a quantum computer good for if you cannot get out the answer? Well, not so fast! Recall from Eq. 1.32 that the same was true for probabilistic bits as well – if you measure a probabilistic bit with distribution , you do not learn or . All you get is a single bit of information: with probability and with probability .
The quantum measurement is very similar and is described by what is known as Born rule. If you have a qubit in state and you measure it, you also obtain just a single bit: you get or with probabilities
While the square might seem surprising, note that . Thus, the square is precisely what guarantees that is a valid probability distribution, so the above rule makes sense! After the measurement, the qubit is gone and all you are left with is a single bit containing the measurement outcome you observed. In other words, the measurement process converts a qubit into a regular bit whose value is determined probabilistically by Eq. 2.6:
As you can see from Eqs. 1.32 and 2.7, the measurement rule for probabilistic bits and qubits is very similar. In both cases, the original state is gone and all you are left with is a single bit whose value depends probabilistically on the original state you measured. (In particular, if you measure the state more than once then you will always get the same outcome as the first time – so repeated measurements do not give any additional information about what the original state was.) The only difference is that for qubits you need to square the amplitudes to get the probabilities, as in Eq. 2.6, while for probabilistic bits you get them directly and hence don’t need to square anything. While this may seem like a small difference, it does have significant impact on the allowed states, as the amplitudes of a qubit are allowed to be negative whilst the probabilities of a probabilistic bit are always positive (see Fig. 2.2).
Well, actually there is another, even more subtle difference. Namely, that nobody can predict the outcome of a quantum measurement in advance. This is subtle because it seems that the same should be true also for probabilistic bits. What is the difference? In short, the answer is that probabilistic bits appear random because of our lack of knowledge about their state, while quantum bits are random even if we know all there is to know about their state. For example, imagine that your friend tosses a fair coin and immediately covers it once it lands. You would normally describe the state of such coin as uniformly random, see Eq. 1.29. However, if you were filming the coin with a high-speed camera, you might be able to accurately predict on which side it landed from your footage. In this sense, the randomness of probabilistic bits has to do with our ignorance. For quantum bits, however, randomness arises on a more fundamental level. Whatever prior knowledge we may have, it is in general impossible to perfectly predict the outcome of a quantum measurement. On the flipside, this means that the outcomes of quantum measurements can be used as a good source of randomness!
Homework 2.1 (Generating a random bit quantumly).
Problem: Alice’s donkey robot is running low on power again and needs to find its way to a charging station. Unfortunately, this time Eve’s hacking skills have improved – she has figured out how to hack the donkey’s random number generator and reprogram it so that it generates any sequence of numbers she wants! Luckily, Alice is aware of this since Eve bragged about it on a hacker forum recently. To counteract Eve’s evil plan, Alice decided to install a miniature single-qubit quantum computer inside her donkey robot. Using the inherent unpredictability of quantum measurement outcomes, Alice wants to generate uniformly random bits that Eve cannot guess.
Question: Alice is able to produce any qubit state , and she wants to generate a uniformly random bit by measuring it.
-
1.
When measuring the state , what is the probability to get measurement outcome ? What is the probability for measurement outcome ?
-
2.
Alice wants to find an angle such that both probabilities equal . What should she choose? (There might be more than one option!)
Hack.
When we apply to the state , we obtain the following state:
When we measure this state, then by Eq. 2.6 the probability of measuring is and similarly the probability of measuring is . We want these to be equal, hence:
We can rewrite the right-hand side as follows:
Note that implies that either or , for some integer . So, we find that all solutions can be written in the following form:
Choosing the sign to be “” does not produce meaningful equations, hence we replace the “” with “” and merge the two cases to obtain the following concise form:
This reduces to:
Hence, there are values of that yield a in the interval , precisely: