2.3 Simulating quantum bits with Quirky

The laws of quantum computing are quite strange and most of us don’t have a quantum computer to experiment with. Fortunately, Quirky has gained new powers since last week and now allows us to simulate a quantum bit!1010 10 Why do we want to build quantum computers at all if we can simulate them so nicely on existing computers? The reason is that while simulators like Quirky work well when all you have is a handful of of quantum bits, they quickly break down as the number of quantum bits increases. We will see why this is so on Section 4.1.1 in Section 4. To begin, go to:

https://www.quantum-quest.org/quirky

and click on “Quest 2”. Your web browser will look similarly to Fig. 2.3.

Refer to caption

Figure 2.3: Quirky for Quest 2.

The key difference to last week that the ‘wire’ now corresponds to a quantum bit, which is initialized in the state |0\left|0\right\rangle.

[Uncaptioned image]

Just like last week, the toolbox contains operations that we can apply by dragging and dropping them from the toolbox onto the wire:

[Uncaptioned image]

The first box, [Uncaptioned image], allows us to measure a quantum bit. Let us go ahead and build the following simple quantum computation in Quirky:

[Uncaptioned image]

You will notice that upon the single line turned into a double line. In Quirky, single lines refer to quantum bits, and double lines refer to ordinary or ‘classical’ bits. Indeed, we know from Section 2.2 that when we measure a quantum bit we get an outcome that is either zero or one with some probabilities, that is, a probabilistic bit.

To view the probabilities of outcomes, we can use the probability display Prob that we already know from last week. Let’s add it to our computation and see what happens:

[Uncaptioned image]

It looks like that the measurement outcome will be ‘zero’ 100% of the time (hover the box with your mouse to confirm our suspicion). Of course, this is precisely what we expect. When we measure |0\left|0\right\rangle, the outcome will always be ‘zero’ according to the measurement rules in Eq. 2.7.

In the remainder of this chapter we will discuss the other boxes in the toolbox.