# Initializing a logical qubits in $|g\rangle$ for an X-cut logical qubit in surface code: understanding question

I am reading surface code theory with this paper. In this paper, it is explained how to initialize a logical qubit in the $$|g_L\rangle$$ state when the qubits has been created through an X-cut.

I thought I understood the procedure, but I realized my understanding is more "naive" than the detailed explanation provided, hence I wanted to see where I am missing a point.

## My current understanding

Let us consider the following logical qubit. We wish to initialize it in the logical ground state. In order to do this, we can first re-stabilise all the surface (we remove the X-cuts) (step 1). Then, we remove the four $$X$$-stabilizers, and the we convert some of the $$Z$$-stabilizers in order to have three rather than four branches as indicated below. We do this in order to be able to freely manipulate the three data qubits in the middle, and in particular to be able to put them in the ground state (step 2). Now that the three data qubits in the middle have been put in the ground state, we "re-stabilize" the surface. This way we create again the logical qubit. Now the point is that as the state $$|ggg\rangle$$ is an eigenstate of $$Z_L$$, and as $$Z_L$$ commutes with all the stabilizers, we know that this "re-stabilization" procedure won't change the eigenstate of $$Z_L$$. Hence we properly initialized the logical qubit: everything is fine! The resulting shape of the array is then a standard X-cut as follow (final step 3) ## My question: what am I missing here?

I feel like I am missing a point. Indeed, in the paper they add a step between my steps 1 and 2. They say in the appendix C on page 43:

A column of four measure-X qubits is turned off, opening a rectangular cut, and the six measure-Z qubits adjacent to the cut are switched to threeterminal stabilizer measurements. In order to maintain error tracking, we perform a Z measurement on the three data qubits 1, 2 and 3 inside the cut (Fig. 14b); this could be done by direct measurement of the data qubits, if the hardware implementation allows this, or by measuring with the idle measure-X qubits in the cut. The combination of the three-terminal measure-Z stabilizers and these three single-qubit Z measurements maintains error detection, as each three-terminal measure-Z result can be multiplied with the corresponding single data qubit Z measurement to compare to the prior four-terminal Z stabilizer measurements.

I don't get why we need to measure those qubits. Why isn't the procedure I described sufficient? Indeed in some sense we don't care if errors are occuring before the initialization as by definition we will reset this logical qubit in the ground state. What am I missing here?

If you use a hole of width of w, and stabilize it for t rounds, the code distance should be $$2w + 2t + O(1)$$. There's $$w$$ errors before the skinny patch is added to get excitations on either side of it, then $$2t$$ measurement errors to hide those excitations while the patch is still one piece, then $$w$$ errors to merge the excitations together (cutting across the Z observable) after the patch splits in two. Plus some $$O(1)$$ slop for turning corners and whatnot.
If you don't do the data qubit measurements, then the initial two excitations on opposite sides of the crossbar can just emerge from individual errors, instead of having to be arduously transported across the width using a chain of errors. That saves $$w$$ errors, reducing the code distance. 