# State injection in a surface code

I am reading this paper on lattice surgery by Dominic Horsman et al, and am struggling to understand a simple method they put forward in their Figure 8(a)(b)(c) to inject an arbitrary state into a planar surface.

The protocol they put forward is very simple: initialize all physical qubits to $$|0\rangle$$ except for one distance-3 line of qubits. For that line of qubits, initialize each one of them to the arbitrary state to be injected $$|\psi\rangle=\alpha|0\rangle + \beta|1\rangle$$. And then this surface is "stabilized" (I imagine this means 1 round of concurrent measurements of all X- and Z-type stabilizers), yielding a distance-3 logical qubit in that arbitrary logical state $$|\psi\rangle_\text{L}=\alpha|000\rangle + \beta|111\rangle$$.

I know that in surface code we operate on quiescent states, like described in Fowler's review paper. Am I correct that this simple state injection is viable, because $$|0\rangle$$ transversal initialization and $$|1\rangle$$ transversal initialization gives the two orthogonal logical state $$|0\rangle_L$$ and $$|1\rangle_L$$ after the code is stabilized, and so a superposition initialization of a line of qubit works as intended?

Could anyone help me understand why such a simple initialization of qubit does the job? Thanks.

To put it in other words: you define the logical operators $$Z_L$$ and $$X_L$$ as a string of Pauli $$Z$$ and $$X$$ in the usual way for surface code (i.e., a row from left to right or a ladder from up to bottom, respectively).
Now, notice that you don't start with all three qubits in the desired state, but rather only one of them is initialize in $$\alpha|0\rangle + \beta|1\rangle$$, whereas the other two are initialized in $$|0\rangle$$. Then, you perform a CNOT gate, resulting in the state $$\alpha|000\rangle + \beta|111\rangle$$.
You now want to show that it is actually equivalent to $$\alpha|0_L\rangle + \beta|1_L\rangle$$. Indeed, after you measure all the stabilizers, any row of $$ZZZ$$ from left to right will act only on one of these qubits (say, the top one), such that it transforms $$\alpha|000\rangle + \beta|111\rangle \to \alpha|000\rangle - \beta|111\rangle = \alpha|0_L\rangle - \beta|1_L\rangle$$, which is exactly how $$Z_L$$ should act. Similarly, any ladder of $$XXX$$ will act on all three qubits, such that it transforms $$\alpha|000\rangle + \beta|111\rangle \to \alpha|111\rangle + \beta|000\rangle = \alpha|1_L\rangle + \beta|0_L\rangle$$.