## Thursday, 7 July 2016

### 14 - Qudit Codes

Normal computers are based on bits: things that can be either 0 or 1. But why stop at 1? Why not 4? or 17? Why isn't 42 the answer?

Well, a computer needs to do a lot of basic little pieces of maths with the bits. Since each bit can only be two things, those pieces of maths can never be too hard. We found some weird rocks1 that can do it for us, and computers are basically just a big pile of them.

If we used fancier bits that go beyond 1, let's call them dits, then they would do fancier basic bits of maths. That might be nice for designing nice and efficient programmes, but it might also be too complicated to actually build. We would need even fancier rocks. So we settled for bits, in the end.

With quantum computers, we don't yet know whether it would be best to use qubits, or some sort of fancier qudits. For the rest of this post, let's think specifically about qudits that can be one of 10 possible things. So instead of just 0 and 1, as we'd have for qubits, these qudits can be 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9. There's nothing special about 10, except that it's a nice number. Everyone loves 10.

Whether you use qubits or qudits, you need to do quantum error correction. For qubits, we have thought of errors in terms of bit flips and unwanted measurements. Qudits also suffer from the latter, but what is the qudit version of a bit flip? It will just be something that swaps the numbers around. You could have something cylic, like turning 0 to 1, 1 to 2, and so on until 9 turns back to 0. You could also have something pretty random, like turning 0 to 5, 1 to 7, and so on. What happens exactly will depend on how you actually build the thing. But we won't need to worry about that.

We can build a code for qudits in exactly the same way as before. We just replace all the qubits with qudits. We also have to change the rules for the squares a bit. Before, when we added up all the numbers around a square, we wanted it to be an even number: a multiple of 2. But now we are moving beyond bits and their slavish devotion to the number 2. Instead we have qudits that are obsessed with 10. So the new rule is that the numbers around each square should add up to a multiple of 10.

One example of how these rules can all be happy is for all qudits to be 0. But, just like for the qubits, we can also have loops of things that aren't 0. Here's an example on the toric code.

Here the numbers in the loop have to switch between 8 and 2 to make sure that each square has a multiple of 10. It could also be done with 9 and 1, or 7 and 3, or some other things. You know how adding works

Qudits also let us do weird things that aren't quite as simple as loops. For example.

We could think of this as a little loop of 9s and 1s and a big loop of 8s and 2s that got stuck together. Or we could think of it differently. But let's think about different things for a bit.

Rules for the blue squares

There are also rules on the blue squares, but we won't think about them too much. As for the qubit codes, the rules on the blue squares are exactly the same as those on the white ones, except for a few differences. The differences are that a bunch of superposition stuff is involved, and they detect unwanted measurements rather than bit flip type stuff.

The anyons that emerge on the blue squares act in exactly the same way as those on the white ones. But when the once on blue squares dance with ones on white squares, anyonic magic happens.

Perhaps we'll look into the maths of qudits one day, and do the blue squares in more detail. But until then, let's just stick to the white ones.

Anyons

It's actually better to split the big white squares into two families. We'll colour one of them grey. The grey squares are chosen such that every grey square only shares qudits with white squares, and every white square only shares qudits with grey ones.

Anyons live on the white and grey squares when the rules are broken. But there's more than just one way to break the rules now. The way we label the rule breakers is going to be different for the white and grey squares. Let's start with the white. For these we will look at the sum of numbers around a square, and then see how much higher it is than a multiple of 10. So if we get 1, 11, 21 or 31, that is 1 higher than a multiple of 10. This gives an anyon of type 1. For 2, 12, 22 or 32 we'd have an anyon of type 2. We also have anyons of types from 3 to 9. But there's no anyon of type 10, because 10 higher than a multiple of 10 is a multiple of 10 itself.

For grey squares, we look at how much lower the sum is than a multiple of 10. So a sum of 9, 19 or 29 would give us an anyon of type 1 here, and so on.

Though this might seem an odd way to do things, it makes the anyons behave nicer. Whenever an error pops up and creates a pair of anyons, they will always add up to a multiple of 10. The maths behind this is just adding and stuff, so I'll leave it as an exercise to the reader.

In the example above, it's fairly obvious that the 6 and 4 anyons are each others antiparticles. The same is true for any pair that adds up to 10. So only type 5 anyons are their own antiparticle in this particular anyonic universe.

The anyons in this qudit code can also do decay process: one anyon can break into two or more. For example, let's another error nearby.

Here the 4 decays into a couple of 2s. It could also have decayed into a 3 and a 1 with a different error. Or even into an 8 and a 6. As long as the end result adds up to the original 4, ignoring any multiples of 10, then it is possible.

When trying to correct errors, we use the fact that errors create little clumps of anyons that add up to a multiple of 10. That's the whole point of this project, which let's you get involved in helping us correct the errors by playing a game. To learn more, check out this post

This series on the science behind the game is now over. But don't worry. As players contribute to science through the game, there will be plenty more to fill this blog with.

Footnotes

1. By which I mean transistors, Which are a bit more complicated than just wierd rocks.

2. An electronic computer was once built using the three posssibilities +1, 0 and -1, rather than just 0 and 1. It didn't make it very far, but it did have some nice properties. See here.