In quantum computing, lattice surgery is a method for executing logical gates between two error-corrected qubits. It requires only nearest-neighbor coupling and is thus used in qubits encoded in a surface code or other planar code. Originally defined for surface code quantum error correction, the technique was later extended to other codes such as quantum low density parity check (QLDPC) codes.
Certain approaches to fault-tolerant quantum computing rely on surface codes which encode a single logical qubit in many physical qubits, in a quantum error correction scheme. The dominant method for quantum error correction are topological codes such as color codes and surface codes. However, many such codes only natively encode a single logical qubit.
In the surface code, lattice surgery works by temporarily "merging" two surface-code qubits and then "splitting" them apart. A parity check in the "merged" state measures the joint parity, leaving the data qubits in their superpositon. Managed properly, these operations can execute a logical CNOT gate between two logical qubits.
Lattice surgery has been experimentally demonstrated in trapped ions, superconducting qubits, and neutral atoms.