1

I'm learning surface code and lattice surgery based on "Surface code quantum computing by lattice surgery" and "Surface codes: Towards practical large-scale quantum computation", and trying to implement a logical S gate using stim

According to Fig. 29 in "Surface codes: Towards practical large-scale quantum computation". A logical S gate is implemented as

The circuit of a logical S gate

Then I tried to implement it using Stim based on lattice surgery step by step.

I assumed a layout after applying the first logical CNOT as below (similar to Fig. 7 in "Surface code quantum computing by lattice surgery")

Layout of logical qubits after the first CNOT

After applying the first H gate on $|Y_L\rangle$, the orientation of the corresponding surface changed and I followed Fig. 9 and Fig. 10 in "Surface code quantum computing by lattice surgery" to rotate it back to its original orientation

Implementation of logical H gate

Then the layout became

Layout of logical qubits after the first H gate

My question is: How could I implement the second logical CNOT between $|\psi_L\rangle$ and $|Y_L\rangle$ given that the position of $|Y_L\rangle$ has changed?

Yilun Zhao
  • 128
  • 6

1 Answers1

3

The short answer is you initialize the region you want to move towards in the basis of the boundary facing that region, then extend the patch over it, stay for awhile, then measure out the part of the patch you want to remove.

You should read "A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery" and "Low overhead quantum computation using lattice surgery", which both cover how to move and rotate patches.

You might also find the TQEC github repository useful. It's an open source project with the goal of turning lattice surgery into circuits, with recorded weekly meetings going over the details.

enter image description here

enter image description here

Craig Gidney
  • 44,299
  • 1
  • 41
  • 116