# What is the physical operation behind "moving edges" and "moving corners" in Litinski's game of surface codes paper?

I was reading Litinski's A game of surface codes (https://quantum-journal.org/papers/q-2019-03-05-128/pdf/). In the introduction (page 2), the paper talks about operations like "moving edges" and "moving corners" leading to surface code patches where the X/Z boundaries are of different lengths and of irregular shapes (by irregular I mean that a surface code edge may partly be an "X edge" and partly a "Z edge"). What is the physical intuition behind these operations? As in, how are the stabilizers or data qubits getting modified to accomplish this? Also, why does "expanding a surface code patch" or "moving a corner" take d cycles?

Further, can we "move a corner" to the middle of an edge? Or does it have to move to another corner of the patch? An illustrative example would also help. Say, how can we create the wide qubit (Figure 2 of https://quantum-journal.org/papers/q-2018-05-04-62/pdf/ - Litinski and Oppen's Lattice Surgery with a Twist) from one or more regular surface code qubits (For example, the one shown in Figure 1 of https://quantum-journal.org/papers/q-2018-05-04-62/pdf/)

Thanks!

# Moving Edges

Each edge has a basis (X or Z, shown as dashed or not dashed in the diagrams). When you move an edge, you sweep an area with it. Thus edge motions correspond to adding or removing area tagged with a specific basis.

Area is added by reseting data qubits in that area in the specified basis (|0> for Z, |+> for X).

Area is removed by measuring data qubits in that area in the specified basis.

The stabilizers that you measure don't depend on the movement of the edges. You just look at their current positions, and measure stabilizers compatible with that layout. Along X edges you must have an X boundary, along Z edges you must have a Z boundary, and ideally you would like to be as consistent as possible from round to round with how exactly you cut the boundaries.

# Moving XZ transitions ("corners")

You typically don't have to do anything to the data qubits to move an XZ transition. Just recut the stabilizers for the new layout and measure them. You will need to solve for how to get the maximum number of detectors by comparing the round before and after moving the corner.

In some cases the exact set if data qubits will change when you move an XZ transition. For example, a square stabilizer may because a triangular stabilizer when an XZ transition is moved away from that stabilizer. In these cases you act as if the edge was swept over the data qubit.

can we "move a corner" to the middle of an edge?

Yes. This is why it's more apt to call it an XZ transition rather than a corner.

how can we create the wide qubit Figure 2 of https://quantum-journal.org/papers/q-2018-05-04-62/pdf/

• Start with a normal patch. Suppose it has a Z basis boundary on the right.
• Reset all qubits in the dxd region to the right of the patch into the 0 state.
• Measure the stabilizers shown in the figure, EXCEPT the left side of the top boundary must remain X type for now as it was in the normal configuration. Repeat this measurement d times.
• Begin measuring the stabilizers shown in the figure.

Be sure to define all detectors that you can during the transitions between configurations.

The reason you can't jump straight from one to the other is because the new Z boundary along the top of the patch would pass too close in spacetime to the old right-side Z boundary. This is clear if you draw a spacetime defect diagram of the process:

This is why I almost always stick to the 3d figures. They make these timelike problems a lot clearer, because you see the two same-colored regions get too close, whereas with 2d slices they kind of seem like arbitrary rules about how fast certain things can happen. The 3d figures also have the enormous advantage that you can rotate them to exchange space and time, and get a construction that's different but still topologically correct (e.g. turn gates into gate teleportations).

• Thanks for the answer! A small follow up: 1) How is the distance low when these two boundaries touch? I have a good intuition for distance for a 2-D patch, but with the time dimension added, I don't have a definition or intuition for "distance". 2) From your explanation it seems like all operations where we need to measure new stabilisers require "d" rounds. It does make sense to me, just wanted to confirm if this indeed is the case. If it is, I suppose the "domain wall" logical Hadamard gate would also take "d" rounds to implement since we move the patch a bit and measure new stabilisers? Commented Jul 10 at 16:20