# 2. Introducing a Bit of Quantum

*This is the second post in a series on quantum error correction. For other parts, check out the link at the bottom.*

When storing and processing digital information, we use binary. Everything is expressed as strings of 0s and 1s. Though these are simple units of information, there is a whole science built on what they can do and how they can do it. This is the field of information theory.

We can make this field even richer by allowing for quantum mechanical effects. We won’t go into great detail on this complex topic in one short blog post, but we’ll introduce as much as we need to think about the basics of quantum error correction. And for that we can consider just a single bit.

In the non-quantum world, there are only two things that a single bit can be doing: being 0, or being 1. There are also only a few things we can do to it: we can set it to 0, set it to 1, or flip its value. The flip is probably the most interesting of these uninteresting things. It turns a 0 into 1 and vice-versa. With just a single bit, this so-called NOT gate is just about the most complex application that you can create.

Once we bring in quantum mechanics, our bit becomes a quantum bit (usually known as a qubit). Rather than just a simple variable with just two possible values, it becomes a 2-level quantum system. But other than having an obviously fancier name, what else makes a quantum bit different from a normal one?

Before we get on to that, let’s start with how they are the same. If you demand an output from any type of bit, then you’ll get either a 0 or a 1. Regardless whether it is a normal bit or a quantum one, no other value is possible. Also, no matter what fancy effects the quantumness of the qubit might give you, you’ll never be able to store the complete works of Shakespeare on one. The maximum amount of information you can reliably store in a qubit is just a single bit. These constraints show us that the qubit is still fundamentally a type of bit, no matter how quantum it is.

Now let’s move on to how they differ. For a bit, there’s only one way to extract an output: you just look at it. If the bit value is 0, you see a 0. If it is 1, you see a 1. This means that the moment of readout is not a significant event in the life of a bit. It is always just sitting there doing its 0 or 1 thing, whether you are looking at it or not.

For qubits, however, there are multiple ways to extract an output. In fact there is an infinite number! And until we decide on the method we’ll use, even the qubit itself might not know what answer it will give.

Sometimes the method you are using to extract an output lines up nicely with the state your qubit is in. In this case, the output you get will be completely deterministic. Otherwise, there will be some degree of randomness.

We say that this is because of ‘superposition’, a term derived from the linear algebra used to describe qubit states. Before we extract the output, the qubit is said to be in a superposition of the state that would definitely give us the 0 output, and the state that would definitely give us 1. When we extract the output, the qubit is forced to choose one or the other. It does so randomly, with the probabilities depending on the details of the superposition. And once it has chosen, it fully commits to the decision. The superposition is then gone.

This effect means that the moment of readout is indeed a significant event in the life of a qubit. And so we give it a special name: measurement.

The inner life of a qubit is obviously much richer than that of a normal bit. Rather than just a simple 0 or 1, it is set of infinite possible superpositions. Rather than just being stuck with flipping bit values, there are countless subtle ways we can manipulate superposition states.

With this we get a glimpse of the fact that there is more that can be done with qubits than can be done with bits. So now you are probably wondering exactly how to do this? Or why anyone would want to?

But since this is a series of blogs about quantum error correction, we aren’t actually going to explain any of that. For those who are interested, the early sections of the Qiskit textbook are a great start.

## Back to Error Correction

For the purposes of this introduction to quantum error correction, all we need to know is:

- Superpositions are a thing;
- We need them for quantum stuff;
- Measurements can make them go away.

As we saw in Part 1, storing normal information means looking at it often enough to catch the errors as they happen. With quantum information, that is not a good idea. As soon as we look at our qubits, the quantum superposition is gone. So instead of making things better, using the method from part 1 would make them worse. We need to be careful to only measure exactly what is needed to catch the errors, and nothing more. But how to do this?

For that, you’ll need to check out the next part. Once it is posted, you’ll find a link on the Twitter thread below.