Skip to content

Lattice Surgery CNOT

In Entwine, a logical CNOT gate can be implemented through a sequence of lattice surgery operations. This construction uses a Grow–Split followed by a Merge–Shrink between two patches that are positioned diagonally with respect to each other.


Overview

The lattice surgery CNOT works by entangling two logical qubits through shared stabiliser operations. In Entwine, this can be visualised and performed directly on the patch layout:

  1. Control qubit and Target qubit are placed diagonally relative to one another.
  2. A sequence of Grow–Split and Merge–Split operations is applied, effectively generating a temporary auxiliary patch
  3. The result is equivalent to a logical CNOT gate between the two blocks.

The initial configuration for the CNOT is the following, where the top qubit is the control and the bottom one is the target

Grow and Split for CNOT

⚠️ Tip: Remember to enter lattice surgery mode by pressing s before trying to implement the CNOT!


Step 1: Grow–Split

  • Start by selecting one of the patches ( the control qubit) and grow horizontally.

Grow and Split for CNOT

  • After extending, perform a split to produce the intermediate patches needed for the upcoming merge.

Grow and Split for CNOT

This establishes the “bridge” through which the two logical qubits will interact.


Step 2: Merge–Split

  • Once the bridge patch is prepared, perform a merge between the grown control patch and the target patch.

Grow and Split for CNOT

  • After the merge stabilisers are measured, perform a shrink to return to the original configuration

Grow and Split for CNOT

The merge-shrink sequence propagates the entangling information between the two logical qubits, completing the lattice surgery implementation of CNOT.


Notes and Tips

  • Always use a new frame (e) when recording each surgery step in Entwine’s lattice surgery mode.
  • Interleave syndrome measurement frames after each grow, split, or merge to track stabiliser consistency.
  • Diagonal positioning is important — if the blocks are misaligned, the surgery will not generate the correct entanglement.

By chaining a Grow–Split with a Merge–Split, Entwine makes it possible to realise a logical CNOT gate purely through lattice surgery, directly on your patch layout.