Tuesday, 23 February 2016

The maths of qubits


This is part of a project to get people involved with quantum error correction. See here for more info.

If you are reading this, you've probably seen the word 'quantum' before. Probably in a popular science article that called it 'weird', and didn't tell you much else. Or maybe you heard it in Sci-Fi, where scientists treat equations like incantations that just need to be put it in a computer for magic to happen.

In this blog, which is usually about quantum error correction, I have been guilty of this exact same thing. But descriptions like this have serious drawbacks. They make everything seem intangible, beyond the understanding of mere mortals and only to be dealt with by great sages. This is not true at all. I work on quantum stuff, and I'm a bit of an idiot. So now it's time to tell you the truth about quantum!

To do this, we are going to need some maths. But don't be scared! Maths isn't always scary. Puzzles are maths, and they are fun (check out our own quantum game, for example).

I'm not saying that the maths in this post will be fun, but I'll keep it as simple and painless as I can. I'll only use the kind of maths that people learn at school, and I'll bear in mind that you've probably forgotten it all (and probably never understood it in the first place).

The basic maths of quantum mechanics isn’t all that hard. In fact, it can be a lot easier than what we have to deal with in the non-quantum world sometimes. If you have already been taught about vectors and complex numbers, you should probably find it quite straightforward. But for those who don't know about such things, this blog will try to give you some idea of the maths behind qubits.

States and measurements

First, let’s talk about states. We use the word ‘state’ to describe what a bit, or qubit or whatever is doing. Bits are pretty simple because they only have two possible states: 0 and 1. At any time it is either in state 0 or state 1. It cannot be both and it cannot be neither. A qubit is also built around these two basic states. But it can also be one of an infinite number of superposition states, where it is some degree of 0 and some degree of 1 at the same time.

When you measure a bit, you ask it whether it is in state 0 or state 1. You can also ask the same question of qubits. If its state is not 0 or 1, but is instead in a superposition of them, the qubit will randomly choose which one to be. If the superposition is more biased towards 0, you'll most likely get 0 and vice-versa.

It would be nice to get more information out of a qubit. It would be nice to find out exactly which of the infinite number of superposition states it is in. Unfortunately, there is no way to do this. We are limited to simply asking whether it is in one state (like 0) or a completely different state (like 1), and putting up with randomness in the result when it is neither.

Though the two basic states for a qubit are called 0 and 1, these are just labels we have chosen. They could equally be called ‘Yes’ and ‘No’, or ‘Grey’ and ‘Pineapple’, or ‘£’ and ‘%’. They are not really the actual numbers ‘0’ and ‘1’, that we can add and multiply. So it can be confusing when we start putting them into equations. To avoid this confusion, we usually write them down in a slightly strange way. For a qubit in state 0 we write |0>. For one in state 1 we write |1>. Here the | and > aren’t going to actual do anything in any equations. They are just to remind us that the 0 and 1 are names for quantum states and not actual numbers.

This notation has scared many an undergraduate physics student, so let’s avoid it here. Instead let’s use different labels for the qubit states. For the qubit state usually known as 0, let’s instead call it up. For the state usually known as 1, let’s call it down. Now that the names we are using for qubit states no longer look like numbers, we can avoid the weirdness of | and >.

Making up some maths

Now let’s try to describe quantum states with maths. One thing you need to know about maths is that it’s perfectly fine to make the rules up as you go along. This might come as a surprise to you, since you’ve probably been taught it as a set of rigid rules and methods that must be obeyed. But these are just sets of rules that turned out to be useful for something. For quantum mechanics we’ll need some new maths*, so let’s start making it up.

Firstly, it would be useful to have some way of quantifying how similar two states are. We'll call this the overlap. The states up and down are completely different, so these should have an overlap of 0. For states that are 100% the same, let's say that the overlap is 1.

Now we have a new mathematical thing to calculate. We just have to make up the mathematical rules that we can use to calculate it.

For the two states up and down, there are only four possible overlaps to calculate and we know what they should be already.

overlap of up and up = 1
overlap of up and down = 0
overlap of down and up = 0
overlap of down and down = 1

Now we need to work out overlaps for superposition states. There are many different possible superpositions of up and down, which differ by how biased they are towards one or the other. This means we need two numbers, let's call them the upness and downness, that describe how much up and down there is in a superposition

It would also be nice to have a shortened name for the superposition state that we are trying to describe. Let's just call it S. Now we need to write down the fact that S is a superposition of up and down and also what its upness and downness are, in a way that looks mathsy. How about

S = (upness of S) × up + (downness of S) × down

This nicely puts all the required information on one line. It even has has an + and some ×'s in to make it look like maths. These look suspiciously like addition and multiplication. But what does it even mean to multiply a state by a number? Or to add two states? These aren't the addition and multiplication that we are used to. I've written them in bold to help us remember that. It will turn out that they will follow similar rules to the normal ones, though. So that's why we use these symbols.

Now, what is the overlap between our superposition state S and the state up? We still haven't made up enough rules to actually calculate this, so we have to choose something. We just introduced the notion of upness, which is how much up there is in S. This seems to be pretty much the same thing as the overlap between S and up, and it wouldn't contradict any of the rules we have already if they were the same thing. So let's just make up the rule that says they are the same thing.

overlap of S and up = upness of S

There's a more complicated way we can write this, that can help us understand a little more about what is going on.

overlap of S and up = (upness of S× (overlap of up and up)
                                         + (downness of S× (overlap of down and up)

Here the overlap of S and up is a sum of two things. The first is the contribution from the up part of S

(upness of S× (overlap of up and up) = (upness of S× 1 = upness of S

This tells us that the up part of S contributes the upness (obviously), and it contributes it fully because the overlap between the up part of S and up is 1.

The second contribution is from the down part of S

(downness of S× (overlap of down and up) = (downness of S× 0 = 0

This tells us that the down part of S would contribute the downness if it contributed anything. But it doesn't actually contribute it because the overlap between the down part of S and up is 0.

We get a similar equation for the overlap of S and down.

overlap of S and down = (upness of S× (overlap of up and down)
                                         + (downness of S× (overlap of down and down)

This time the overlaps of up and down ensure that the downess contributes fully, and the upness doesn't contribute at all.

What about the overlap with something else? If we look at the overlap between S and down, and the overlap for S and up, the only difference is that one has up in and the other has down. So maybe we can just replace that with anything else too. Let's invent a new state and call it T, for no other reason but it coming after S in the alphabet. The overlap of S and T is then

overlap of S and T = (upness of S× (overlap of up and T)
                                         + (downness of S× (overlap of down and T)

In these equations we have × and +, multiplying and adding normal numbers. These are indeed the multiplication and addition that we are used to. From these equations you can maybe see why I used × and + before. Compare the equation for S with the equation for its overlap with T

S = (upness of S) x up + (downness of S) x down


overlap of S and T = (upness of S× (overlap of up and T)
                                         + (downness of S× (overlap of down and T)

These are pretty much the same. The only difference is that each state in the first one has been replaced by the overlap of that state and T in the second. This means that the second one just has normal numbers in. So the weird multiplication and addition in the first one become normal in the second. So, whatever x and + are, they must be some version of multiplication and addition that work with the states of qubits, and just become normal multiplication and addition once we just start calculating with numbers. We won't need to think much more about this, though.

Let's think more about the overlap between S and our new state T. Firstly, just like S we should be able to write T as

T = (upness of T× up + (downness of T× down

Earlier we made a rule that the upness of a state is the same thing as its overlap with up. This rule lets us write the equation for the overlap of S and T in a simpler way.

overlap of S and T = (upness of S× (upness of T) + (downness of S× (downness of T)

This lets us work out the overlap of S and T using their upness and downess, which are just numbers that we know.

Now let's ask a question for which we already know the answer. What is the overlap between S and itself? Using the maths above

overlap of S and S = (upness of S× (upness of S) + (downness of S× (downness of S)
= (upness of S)2 + (downness of S)2

Since we are looking at the overlap between two states that are exactly the same, the answer should come out to be 1. So now we know something about the relationship between the upness and downness for any quantum superposition

upness2 + downness2 = 1

This makes a lot of sense. The more a state is biased towards up, the less it must be biased towards down. For example, a state with an upness of 1 (and so with an upness2 of 1 too) is completely up, and so has no downness. The first concrete fact that our quantum maths has told us isn't weird at all. See, quantum mechanics isn't so strange.

Well, maybe it is a little bit strange. Note that we don't just add upness and downness here. Instead we square them first. One thing we know from school is that negative numbers square to the same value as positive ones. (-1)2 = 1 just like 12 = 1, for example. So maybe this equation is telling us that its okay for the upness and downness to be negative, even though this would be a bit weird, because these numbers only need to be sensible after we've squared them. Let's keep this possibility in mind.

Left and Right

Now we've made up a nice bunch of maths, let's do something with it. Let's consider a specific superposition state, that has the same upness as downness. We can give it a name that also lies between up and down. Let's call it right.

We know that the upness and downness of right are the same, and we know that sum of their squares must be 1. With this we can get a specific number for the upness and downness: They will both be √½. Now we can write down right in our mathsy way

right = √½ × up + √½ × down,

Since we have called this right, it would be nice to know if there is a left to go with it. Is there as state that is as different from right as up is from down? If there is, we must also be able to write it down in our mathsy way

left = (upness of left× up + (downness of left× down

The overlap of left and right will then be, using the equation from before for S and T,

overlap of left and right = (upness of left× (upness of right)
                                               + (downness of left× (downness of right)
                                                    = (upness of left× √½ + (downness of left× √½

If left and right are to be as different as up and down, their overlap needs to be zero. This will happen only if

(downness of left) = - (upness of left)

because then we get

overlap of left and right = (upness of left× √½ - (upness of left× √½ = 0

So one possible choice for left is

left = √½ x up + (-√½) x down

This has an upness of √½, just as right does, but it has a downness of -√½. This is a negative downness, just like the equation earlier hinted might be possible. What does this mean? Does it make any sense? Well it is rather strange. But the equation earlier also told us to only expect the squares of numbers to be completely sensible, and (-√½)2 does give us a nice sensible ½. So let's not worry too much yet.

So far we've been thinking about everything as a superposition of up and down. But now we have left and right, which are two states just as different as up and down. What does a superposition of these look like? Something like

S = (leftness of S× left + (rightness of S× right

As an example, let's start with a state that has the same leftness as rightness. So

S = √½ × left ½ × right

The overlap of this state and left is obviously √½, and the overlap for right is √½ too. What is the overlap for our trusty old friends up and down? Using the same sort of method as before, and calculating the overlaps of both left and right with up, we find

overlap of S and up √½ × (overlap of left and up) √½ × (overlap of right and up)
                    = √½ × √½ + √½ × √½ = ½ + ½ = 1                                

So the upness of this state is 1! Let's check the downness.

overlap of S and down √½ × (overlap of left and down) √½ × (overlap of right and down)
                   √½ × √½ + √½ × (-√½) = ½ - ½ = 0                                 

It has a downness of 0! We already know a state with an upness of 1 and a downess of 0. It's up! This superposition of left and right turns out to be our good old friend up.

up √½ × left √½ × right

We can similarly find a superposition for down, but let's do this differently (for fun!). Let's trust that the weird × and + that we use on states really do have properties like multiplication and addition. Now let's look at the superposition

T = (-√½) × left √½ × right

Since we have equations for left and right as superpositions of up and down, let's stick these in.

T = (-√½) × (√½ × up + (-√½) × down) √½ × (√½ × up + √½ × down)

Doing a bunch of the maths from algebra lessons at school (see, it did come in useful), we can make this into

T = (-√½× (√½) × up + (-√½) × (-√½) × down √½ × √½ × up + √½ × √½ × down
= -½ × up + ½ × down ½ × up + ½ × down                                                    
= (½ – ½) × up + (½ + ½) × down                                                                      
= down                                                                                                               

The up part disappears and the down part gets strengthened. This is exactly the sort of thing that we call an interference effect, and which causes the strange quantumness in the double slit experiment.


All states are created equal

With left and right we have another pair of states that are completely different from each other, just as different as up and down. We saw that left and right are both superpositions of up and down, but up and down can also be thought of superpositions of left and right.

This shows us an important fact about the states of quantum things, like qubits. There are no states that can claim to be the 'proper' states, with everything else just being their superpositions. Any state is as important as any other. Any state can be thought of as a superposition of other states.

This fact often gets obscured when we are talking about quantum computation. We like to think of this as a quantum version of a normal computer, so the stories we tell ourselves have to be full of 0's and 1's. But the qubit states we choose to call 0 and 1 are not really any more special than any other.

This fact also gets obscured by the intuition we get from the real world. For a cat in a box, as in Schrödingers famous thought experiment, the states 'alive' and 'dead' do seem more sensible than all the possible superposition states. This is just because big and complicated objects, like cats, are constantly interacting with other big and complicated things. These interactions, like getting looked at or and having light and the air bashing into you all the time, tend to be easier to describe using some states rather than others. When and how things bash into into you, for example, depends on where you are. So the interaction is much easier to describe using states for which you have a definite position than ones for which you are a superposition of being in different places. But for tiny things like electrons, which haven't had all the quantumness bashed out of them, superpositions of different positions are perfectly fine. And that's what we see in the double slit experiment.

Since left and right are just as important as up and down, it means we can also use them for measurements. When ask a qubit what state its in, we can ask it whether it is up or down, and a qubit in state left will have to randomly decide one or the other. But we could also ask it whether it is left or right, and an up qubit would need to randomly decide. In fact we can do an infinite number of possible measurements, where we ask if it is some state S or another state S'. The only restriction is that S and S' must always be completely different from each other: they must have an overlap of 0.

What did we just calculate?

The maths we just did involved a bunch of numbers, like overlaps and the upness and downess. But what do these numbers actually mean? Do they correspond to something that we can measure in an actual experiment, to check that our maths is actually describing qubits correctly? Fortunately, the answer is yes. And experiments have conclusively shown that we are indeed doing it right.

Basically, if we have a qubit in a state that can be written

S = (upness of S× up (downness of S× down

and we measure whether it is up or down, it will randomly choose to be one or the other. The probability that it chooses up is (upness of S)2. The probability of down is (downess of S)2. This shows us why upness2 + downness2 = 1, as we discovered earlier. We must always get one of the two possible options, up or down. Since it is certain to get one or the other, the probability for this must be 1.

All other overlaps are similarly probabilities. If we have some state S and some other state T, the number
(overlap of S and T)2 

is the probability that you will get the result S if you are asking a qubit in state T if it is S or S'. It is also the probability that you will get the result T if you are asking a qubit in state S if it is T or T'. Here S' is the state that has no overlap with S, and T' is the state with no overlap with T

With this extra information we can start to wonder what it means when an overlap becomes negative. For example, say we have the state
(-1) × up

This has an upness of (-1). The condition upness2 + downness2 = 1 means that its downness must be zero, which is why it has no downness.

How does this new state differ from up? If we measure whether it is up or down, the probability of up is (-1)= 1. So it will definitely come out to be up. If we measure anything else we will also get the same probabilities as if it were just up. The fact that its upness is (-1) rather than 1 has no effect on what we actually see in the real world. So what does a negative upness mean? Not much, it seems. The difference between any state S and the corresponding state (-1) × S is not something we can ever measure. So they are basically the same thing. Only when the difference between positive and negative happens in a superposition, as we saw for left and right, does it matter at all.
As we said before, it is the squares of the overlap that seem to have the job of being sensible. So the best way of measuring how similar two states are is to use the overlap squared, rather than the overlap itself. The overlap squared will give a value of 1 if the states are the same, 0 if they are different and something in between for something in between. It won't ever give a negative value. But the overlap itself retains the freedom be a bit crazy. It can be negative, at that lets it have some quantum fun.

What can we do now?

We now have enough maths to actually show how quantum systems can do things that would otherwise be impossible. But this post has already run on much longer than my usual 1000-1500 word limit. We probably all need to go and lie down for a week. So come back some other times and we'll look at entanglement, and how Bell's inequalities show us that it can do things more awesome than even Einstein could easily believe.


* The maths we need is called linear algebra. It’s not unique to quantum mechanics. You can use it for loads of stuff in your normal everyday life too.

Thursday, 18 February 2016

5 - The story so far

This is part of a project to get people involved with quantum error correction. See here for more info.

In the next set of posts we will be moving on to the promised land: we will start looking at surface codes. These are a way of encoding quantum information that is especially awesome. They are the foundation of many research careers, including mine, and are the basis of the decodoku games.

Before we embark upon this pilgrimage, we must prepare ourselves. We must reflect upon all that we have done thus far, so I will tell you the story again. But this time it will be a bit more abstract, and a lot shorter.

What is error correction?

Sometimes we need to send information. Sometimes we need to save information. But errors are always hiding around the corner, waiting to mess it all up. To deal with them, we use error correction.

The information that we usually send and save is usually quite complicated, like Christmas lists and selfies. So let’s just consider the most simple of all messages, the basic unit from which all can be built, the atom of information: the bit. This is just one of two numbers, ‘0’ and ‘1’.

The simplest type of error that can affect a bit is called a bit flip. This is when some gremlin* comes along and replaces our 0 with a 1, and our 1 with a 0. If the chance of this is 1 in a billion, probably we won’t care too much. But when probability is too high, we need to do something about it.

What we do is encode our information. No longer do we entrust our message to a single bit. Instead we get loads of bits, and get them all to carry our message together. There are lots of ways to do this. Some are more complicated that others. The simplest is just to set them all to the same value. If we want to store a 0, we set all bits to 0. For a 1 we set them all to 1.

Once a few bit flips happen, our encoding will get a bit messed up. It will no longer unambiguously tell us that our message is 0 or 1. With the repetition encoding, for example, we might have our bits disagreeing: some will say 0 and others will say 1. We need to work out who is lying. We need to work out what the original message was. This process is called decoding. For repetition we can just look at the majority opinion. Whichever value there is more of is our original message (most likely).

See here for more info.

Quantum Information

If our bit obeys the laws of quantum mechanics, it doesn’t always just need to be 0 or 1. It can keep its options open and be 0 and 1 at the same time: a quantum superposition. This has to stop once we look at it, and it’ll choose one or the other. Until then, we can prod it in weird quantum ways and use it to do new quantum kinds of computation, communication and cryptography. This kind of bit, a quantum bit, is called a qubit.

Unfortunately, qubits are not immune against bit flips. In fact, they are even more prone to them! Error correction is again required.

Qubits also experience another kind of error, one that doesn’t bother bits at all. This is called dephasing**, and happens when the horrible little gremlins come and look at our qubits. This causes them to become just 0 or 1 when they are supposed to be in a quantum superposition. With the quantum magic gone, our quantum computer becomes useless.

It’s not just the gremlins we need to worry about. It’s us too! If we want to store information for a long time, we need do decoding regularly to find and remove any errors as they happen. For that we need to look at our qubits. But if we end up finding out whether they are 0 or 1, we will have removed the quantum magic. We will have dephased them to the max. Our efforts to get rid of errors will then have caused them!

Because of this, we need a new kind of error correction for qubits. It needs to be able to find and correct bit flips, but without causing dephasing. It also needs to find places where dephasing has happened and sort that out too.

See here and here for more info.

Decoding without looking

As our first step towards fully quantum error correction, let's consider some almost quantum error correction. This will find and correct bit flips without causing any dephasing. Let’s try to do this with the repetition encoding from before, which will use a bunch of qubits. If we want our quantum message to be 0, we set them all to 0. For 1 we set them all to 1. Any superposition of 0 and 1 will be the superposition of them all being 0, and all being 1. In every case, every qubit should agree with every other. Any disagreement is a sign that a bit flip has happened.

To decode, we just look for disagreement. One way to do that is to sit our qubits on a line. We then go along and ask every pair of next-door-neighbours whether they agree or disagree with each other. This tells us nothing about whether they are 0 or 1, so it doesn’t affect the superposition. Instead it tells us everything we need to decode without causing any dephasing. By looking at which qubits agree with each other we can see which ones are in the majority. We can then flip the minority back to their (hopefully) original values so that all agree again. All bit flips are found and unflipped. The errors are corrected.

See here for more info.


Correcting dephasing

Dephasing happens when we, or the gremlins, find our information we aren’t supposed to. It happens when our quantum message, which is supposed to be in a superposition of 0 and 1, is forced to choose whether to be one or the other.

If our quantum message is stored on a single qubit, there will be some probability that a gremlin will come and look at it, making it dephase. If it is repeated across many qubits, there is a lot more places that the gremlins can look at it. They can find out if our message is 0 or 1 by looking at any of the many copies, and so there’s a lot more ways to make it dephase. The repetition encoding, which protects against bit flip errors so well, actually makes dephasing more likely!

To solve this problem, we need better ways to encode our qubits. We need some truly quantum error correction. Let us go on to the promised land and find it!


* There aren’t really fairy folk messing with our bits. Not that we’ve observed, anyway. Errors are caused by our bits interacting with everything around them. Air bashes into them, nearby magnets tell them which way to point and innumerable other messy things happen which might make them do things they shouldn’t. But I like to think about it as naughty gremlims that like nothing better than trying to annoy us.

** In a previous version I used 'decoherence' here. That was a bit misleading, since bit flip noise is also a kind of decoherence. Using 'dephasing' is not entirely without problems either, but it's better.

Wednesday, 10 February 2016

4 - Decoding Without Looking

This is part of a project to get people involved with quantum error correction. See here for more info.

We have some information. We want to store it for a long time without it getting messed up. As we saw here, that’s no problem. We can just write it down many times, and keep checking on the copies. The majority will usually have the correct information. If any disagree, we assume that they got messed up and replace them with something that agrees with the majority.

This is all well and good if our information is the kind of normal information that we deal with in day-to-day life. But what if it’s quantum information? This can have hold multiple different messages at the same time in a weird quantum way. If we try to correct errors in the way described above, we have to look at all the copies to see what message they have. As soon as we do that, it has to choose just one of the multiple messages and the quantumness is lost. Any fancy quantum effects that we were relying on are gone.

To solve this problem we somehow have to find out which of the copies agree with each other, without ever finding out exactly what they say. Then we can poke the ones that disagree until they agree again. This will correct the errors and the majority will win, all while maintaining the quantumness.

How do we measure how different the copies are without getting any information we don’t want? We’ll need to be clever in choosing exactly how we are going to store our information. Writing it down on a piece of paper isn’t going to be our best option. Instead we need something that’ll let us use some fancy physics. Something like magnets!

Let’s say the information that we want to store is something simple: just a ‘yes’ or ‘no’. Rather than writing this down many times, let’s use a bunch of magnets. If we want to store the information ‘yes’, we place all the magnets with their north pole facing north. For ‘no’ we place them with the north pole facing south. We use plain magnets that don’t have anything written on them telling us which way is north or south. We can only find that out if we use a compass. So we won’t be able to easily tell if they say ‘yes’ or ‘no’.

When it’s time for our weekly check up, we can go around all the safe places that we keep our magnets. Let’s suppose we numbered our magnets 1, 2, 3, and so on. We can get the first one and the second and put them side-by-side. If they agree, they will stick together. It doesn’t matter if they are both facing north or south, they will stick just the same. Then you’ll know that they agree, without knowing what information they are storing. Similarly, if they repel each other you’ll immediately know that one says ‘yes’ while the other says ‘no’. You know they are different, but you have no idea which is which. We can then compare the second and the third in the same way, and then the third and the fourth and so on. This will give us all the information we need to decode.

Let’s suppose we used nine magnets. The results we get after a weekly check up might then be something like this

1 - a - 2 - a - 3 - a - 4 - d - 5 - d - 6 - a - 7 - a - 8 - a - 9

Here I’ve put an ‘a’ between magnets that agree, and a ‘d’ when they disagree. In this example, the fifth magnet is found to disagree with both neighbours. Since there are only two options, this means that the fourth and sixth magnets must agree with each other. For example, if the fourth is ‘yes’, the disagreeing fifth must be ‘no’. Since the fifth also disagrees with the sixth, this must be ‘yes’ too.

It is clear to see which magnets are in the majority. 1, 2, 3, 4, 6, 7, 8 and 9 all agree. Only 5 disagrees. The fifth is therefore most likely an error. We rotate it so that it agrees with all the others, and our error is corrected.

A more complicated example would be something like

1 - a - 2 - d - 3 - a - 4 - d - 5 - a - 6 - a -7 - d - 8 - d - 9

Here we can see that 1 and 2 agree with each other, and 3 and 4 agree with each other. But 1 and 2 disagree with 3 and 4. But who is in the majority? Looking at the other results we find that 5, 6, 7 and 9 are on the side of 1 and 2, but only 8 joins the side of 3 and 4. So it seems that 3, 4 and 8 are the ones with errors. They are the ones we should rotate.

Whatever happens, these measurements will always give us enough information to find out who is in the majority. It tells us where the errors are and how to correct them without ever telling us what the majority says. This decoding method is therefore perfectly compatible with the needs of quantum information.

Of course, things aren’t quite so easy. We can’t actually use big lumbering things like magnets to store quantum information. These will interact with nearby magnets, like the Earth’s magnetic field or any compasses in the area, and tell them which way they are pointing. So even if we don’t look at the information they are storing, the nearby magnets will. The quantumness will get ruined anyway.

To solve this we need to do two things. Firstly, use something instead of a magnet that isn’t going to gossip the information so readily. One thing that we often think about is the spin of an electron. Really this is actually a magnet. But it’s a tiny magnet. A really tiny magnet. It doesn’t give up its secrets as easily as the big ones that we stick on fridges. Again we can use physics to get the information we need, about whether neighbouring spins store the same information or not. The process will be a bit different to big magnets, but principle of harnessing their interactions is the same.

The other thing we need to do is build some extra fanciness into our error correction. At the moment, we are just looking at how to correct the kinds of errors that turn ‘yes’ to ‘no’ and vice-versa. It’s an important kind of error to correct, but so is the leakage of information to things that aren’t supposed to know it. We need our error correction to stop that too. We’ll get on to how to do that soon enough. Nexttime, however, it'll be time to meditate on all that we've done so far.