Ron Cohen

17 באוג׳ 2022

### Motivation break

Well done! After reading the last article, you have got so far, and you already know:

The importance of Quantum Error Correction

Quantum computing basics you need for quantum error correction

What a stabilizer is

The source of errors and their modeling

Repetition Code - a basic encoding that helps us better understand the other encodings.

Coherent errors and their equivalence to non-coherent errors

An intro to Surface Code

At this point, the path of being a quantum error correction **expert can go through many options**:

Research physical qubits with better fault performance

Engineer a system that is implementing surface code

Find surface topologies that can give better performance

Develop quantum algorithm use cases that use fault-tolerant logical qubits instead of assuming ideal physical qubits

Invent decoders that read the surface's syndrome and correct the errors better - in a manner of complexity and performance

Develop simulators that can simulate more extensive surfaces with better complexity

And there is much more... The following article will try to understand those different disciplines better. So before we celebrate, let's dive deep into understanding how surface code is working anyway.

##### Stabilizers - The Building Blocks of Surface Code

Let's jump to the technical part. We saw in the last article that surface code is made of **strings of |1⟩ between the right and left walls.** This time we will understand how s**tabilizers create those strings**. Please note that we are assuming a **quiescent state** - meaning there are** no faults** in the qubits.

##### ZZZZ Stabilizers Job

As you might remember from the explanation about the ZZZZ stabilizer, it tells us the amount of 1 in the four qubits that it measures - **if it is odd or even.** +1 measurement tells us that it is even.

Now think of **strings passing through that cross** shape of the stabilizer. Notice that it will always go through an **even number of vertices**- 2 times in case of one string, 0 times in case of no string, and four times in case of two strings.

Now we understand that once we perform all the ZZZZ stabilizers, one after another, if they all return a +1 result - the resulted case is **a superposition** (don't forget we are in quantum physics) **of strings that are tied between the left and right walls**. Try to draw more strings by yourself using the rule of only even 1 in ZZZZ stabilizers to convince yourself.

Also, try to tell why strings between the top and bottom are illegal, try to draw them, and write in the comments **why they are not possible**.

##### XXXX Stabilizers Job

Let's have a look at the XXXX yellow stabilizers. What are they forcing? What happens if their result is +1? It means that they are forcing eigenstates on the measured qubits. What are the eigenstates of XXXX measurement? We need to find **states that left the same after performing the 4 X operators**. How is that possible? Xs are flipping the qubit. In the __magical world of quantum, everything is possible__.

The XXXX stabilizer will allow a superposition of 2 terms with XXXX between them. For example, GHZ state.

It might also be

Notice that the amplitude of both terms must also be equal

So once all XXXX stabilizers act on the surface, **they force each string to have a twin**, one more term in the superposition that allows the XXXX stabilizer to return a +1 result. If we assume that the surface is in a superposition of some strings -

__What does the twin look like__? first, notice that the qubits (white dots) on the top and bottom rows experience XXXX stabilizer only **one time**, so in the twin, they must have the **X flip of the original** -

And in the other qubits, since they have 2 XXXX stabilizers **from 2 sides**, they must remain **the same as the original** because they flip **twice **-

And the total state, in this case, will be a superposition of all the strings and their XXXX stabilizers twin -

##### The Big Picture

Now when we understand how XXXX stabilizers work, let's ask ourselves - what will be the state of the surface, once we initialize it to |0⟩ in all qubits, and perform all the six XXXX stabilizers one after another?

Each time XXXX act, the world splits into two parts in superposition - one without the XXXX flips, and one with it **(Use the arrows to jump slides)**:

Notice that internal loops are also legal because that touch zero (even) times in the left and right walls. **Notice that the amount of times that the string is surrounding the surface from one side to another, is even**! And so to **all the terms** in the logical |0⟩L state! You can guess how logical |1⟩ will look like... But wait for the next articles.

##### To Conclude

We saw how stabilizers create the strings. ZZZZ stabilizers are in charge of allowing only strings that are connected between the left and right walls, and XXXX stabilizers are in charge of creating an equal superposition of them with their twins. We also understand what the logical |0⟩ state looks like. In the following articles, we will see how **logical |1⟩ is created** and understand **how ZZZZ stabilizers are helping us to correct X errors and XXXX stabilizers to correct Z errors**.

*Stay tuned...*