# If Majorana qubits are analogous to surface codes, why do the diagrams use lines instead of squares?

If you go to some random Majorana paper or talk, you will find a diagram like this one. Note that the diagram is using lines. Making the lines longer should exponentially increase the error suppression:

If you go to some random surface code paper or talk, you will find a diagram like this one. Note that the diagram is using square patches. Increasing the diameter of the patches should exponentially increase the error suppression:

Now, to be frank, I am really not familiar with proposals for Majorana-based qubits. And I very much expect the answer to this question to be "here is the basic fact you missed". But what I do think I understand is Majorana-based qubits are based on particles that are supposed to be analogous to the corners of surface code patches. This implies there should be strong analogies between surface code patches and the layouts of Majorana-based qubits.

What I definitely don't understand about Majorana-based qubits is why this analogy clearly breaks when it comes to the asymptotic scaling of hardware vs error suppression. Because in one context all the diagrams show linear scaling (they draw lines) and in the other context all the diagrams show quadratic scaling (they draw squares). It naively looks to me like, in order to double the code distance (square the error suppression) in these two apparently analogous systems you either:

1. Double the amount of hardware (make the nanowires twice as long).
2. Quadruple the amount of hardware (make the diameter of the surface code patches twice as long, allocating 4x as many physical qubits to the patch).

What are majoranas doing to improve "cost quadruples" to "cost doubles"? Why can't we also do that with surface codes?

The surface code has two types of boundary at which two different kinds of error string can terminate. I'll call these X and Z boundaries.

The surface code also has two types of stabilizer generator. Let us take the interpretation that these detect whether a 'particle' is present on the corresponding plaquette or vertex. We then have two types of elementary 'particle' in the surface code universe: e anyons on the X stabilizers and m anyons on the Z stabilizers. The e anyons can disappear at X boundaries (I think of them as being thrown off the edge of the universe) and the m anyons can disappear (or 'condense' as one might say more technically) at the Z boundaries

There is also a third non-trivial particle in this universe, which we get by simply putting and e and an m together and treating them as a composite. These exchange as fermions, so we'll call them fermions. They condense on a combination of X and Z boundaries, or at a twist.

The classic surface code is a square that alternates between the two types of boundary for its edges (Z boundaries on the two sides and X boundaries top and bottom, for example). Let us instead consider a linear surface code (large length, but $$O(1)$$ width) with only two boundaries: an X boundary on top and a Z boundary below.

This linear surface code has no logical subspace, but we can open one up by adding twists. Three is fine. Four is also good. Either way, the logical operators Paulis can be understood in terms of the fermions. Specifically, each is equivalent to creating a pair of fermions, and then condensing each on a different twist.

Now for the majorana connection. Twists can be described using the same mathematics as majoranas. Condensing a fermion on the jth twist is described by the majorana operator $$\gamma_j$$. The logical Paulis correspond to the pairs $$\gamma_j \gamma_k$$ for two different twists.

So what is the code distance for this proposed encoding? Unfortunately, there is only an $$O(1)$$ cost to apply a single $$\gamma_j$$. This can be done by pulling an e anyon out of one boundary, an m anyon from the other and then condensing the resulting fermion on a twist. Since each twist is close to both boundary types, only an $$O(1)$$ error chain is required for this.

To prevent this, you would need to increase the width of the chain. Once you make this width scale with the code distance, and given that the length must too, you get the quadratic scaling of any surface code approach.

So why do majoranas on nanowires avoid this? Well, perhaps they don't. The single $$\gamma_j$$ error event corresponds to quasiparticle poisoning in nanowires. This is a big potential problem, and an ongoing source of research.

So the main difference is that quasiparticle poisoning is a clear fatal problem in surface codes when one tries to make linear codes. The solution is clear in this case: make square codes. For nanowires, quasiparticle poisoning is a more complex issue without a clear solution yet (as far as I know).

• The ends of the nanowires being like places I can put twists and the middle of the nanowires being like places I can run domain walls to link the twists makes sense to me. But then, as you note, the trouble comes when you have to assign boundaries to the sides of the nanowires. Are they really just glossing over the fact that as soon as you "pick a boundary type" to go around the nanowire, you find that there are short logical error mechanisms present? Feb 22 at 11:04
• In their case the fermions are things like actual electrons tunnelling in. I chose the boundaries to make the surface code case most similar to that. Other boundary choices will lead to other errors that aren't so clearly fermion related. Feb 22 at 11:58
• the analogy between surface code and Majoranas is fascinating. I do want to add my 2 cents here as an experimental condensed matter physicist: In consdensed matter, when it comes to grand theoretical predictions, which mark a territory for experimenatlists to go and search in for exotic effects, the situation is that typically the theory misses some crucial "mundane details" about the real system, and those "mundane details" have a nasty habit of being more relevant to the physics than the exotic effect. Majoranas in nanowires are actually a very good example of this. But there are many others
– Lior
Feb 22 at 17:56
• theorists in condensed matter are at their best when they evolve their theories hand in hand with experimental progress - and then the results are typically pretty great (fractional quantum Hall, BCS etc.)
– Lior
Feb 22 at 17:59

I had the chance to talk to Christina Knapp, who works on Majoranas, and she clarified all of this for me. The following is my understanding of it now.

The lines in the majorana diagrams are not analogous to 'regions of surface code'. Instead, they are analogous to the domain walls between twist defects. Or rather, they are like optional domain walls. It's a place where you can have the normal surface code checkerboard pattern, or you can have stabilizers that stretch across two tiles:

So a four-majorana "tetron", when it's "turned on", is like a logical qubit defined by four twists and two domain walls:

Correspondingly, it would in fact be a problem if you put the ends of disjoint nanowires too close together (modulo details about what they are deposited onto). Because if you put the twist defects at the ends of domain walls too close together, that introduces low distance logical errors.

So even though we are drawing lines, they need a minimum amount of spacing. Which makes them pack like squares, which resolves the asymptotic difference in scaling of size vs error suppression.