Error Correction

Lattice Surgery

A method for performing operations between surface-code logical qubits by merging and splitting their code patches.

Definition

Lattice surgery is a technique for performing logical operations on qubits encoded in surface codes. Two code patches are merged into one and then split again, which measures a joint property of the logical qubits and can implement entangling operations such as a logical CNOT, using only local operations on a two-dimensional chip.

In depth

The reason the method is popular is geometry. A surface code lives on a two-dimensional grid with only nearest-neighbour interactions, which suits superconducting chips. Transversal gates between code blocks would need long-range connections that a flat chip does not have. Lattice surgery uses only the same local stabilizer measurements as the memory itself.

Time costs are counted in code cycles. A merge needs about d rounds of syndrome measurement to be reliable, where d is the code distance, so a logical gate takes about d cycles. At d = 7 that is about seven cycles, and with a 1.1 microsecond cycle as reported by Google for its memory experiment, roughly eight microseconds per merge, ignoring other overheads. This is my own back-of-envelope estimate and not a published figure.

Resource estimates for large algorithms are often written in terms of lattice-surgery operations, patches and distillation factories. This is why estimates for factoring an RSA integer give both a qubit count and a runtime, as the paper by Gidney discusses.

Technical Definition

Merging two adjacent surface-code patches along a boundary measures the product of their logical operators, for example Z⊗Z or X⊗X depending on the boundary type. Splitting reverses the process. A sequence of such merges and splits, with classical corrections, implements Clifford operations. Non-Clifford gates require magic states, which are injected and distilled.

Visual Explanation: An Analogy

Think of two separate rooms with a wall between them. Taking down the wall lets people in each room interact as one group, and rebuilding the wall separates them again. What the group learned while joined is a joint fact about both rooms. Lattice surgery is that wall-removal for code patches.

Key facts

ItemDetail
OperationsMerge and split of surface-code patches
MeasuresJoint logical operators such as Z⊗Z or X⊗X
CostAbout d code cycles per merge
NeedsMagic states for non-Clifford gates

Where the idea comes from

Lattice surgery was proposed by Horsman, Fowler, Devitt and Van Meter in 2012 as a way to perform computation with the surface code using only planar nearest-neighbour operations.

Real-World Use Cases

  • Implementing logical CNOT gates between surface-code qubits
  • Planning the layout of fault-tolerant processors
  • Estimating the space and time cost of algorithms such as Shor's

How it differs from related ideas

  • Transversal gates apply the same physical gate to every qubit of a block and need block-to-block connectivity, while lattice surgery uses local measurements.
  • Braiding defects was an earlier approach in the surface code, which lattice surgery largely replaced for practical layouts.

Common Misconceptions

  • Lattice surgery does not physically move qubits. It changes which stabilizers are measured.
  • It does not provide all gates. Non-Clifford gates still need magic states.

Frequently asked questions

What is a merge?

Joining two code patches so that a joint logical operator is measured.

Does it need extra qubits?

Yes, additional qubits in the region between patches.

Which gates need magic states?

Non-Clifford gates such as the T gate.

Related Terms

Learn it in a lesson

← Back to the dictionary