I'm currently trying to understand lattice surgeries. As an exercise I'm currently implementing the lattice surgery operations described in Entangling logical qubits with lattice surgery, by Alexander Erhard et al. on a 7 qubits surface code (distance = 2). The same code described in the article.

7 qubits surface code

The operations I'm trying to implement in Qiskit are the following :

CNOT, Teleportation and Hadamard using Lattice Surgery

I'm struggling with the CNOT gate and I feel like I'm missing something obvious. I searched around a lot and found ZX-calculus and a lot of other interesting leads but I cannot understand why my code isn't working...

From my basic understanding a logical CNOT gate can be done using a smooth merge of the target and a temporary logical qubits. Which is done by measuring Z1Z3 of the temporary and Z2Z4 of the target into an ancilla qubit. (target above temporary). I did that using CNOT gates and Hadamard gates :

MZZ measurement

Then I measured X1X2X3X4 of the control using 4 CNOT into another ancilla to perform a smooth split. Finally, I performed a rough merge on the temporary and target by measuring X3 (Temporary) and X1 (Target) into a third ancilla and X4 (Temporary) and X2 (Target) into a fourth ancilla using 2 CNOT each time. I then tried splitting, or not. Either way, my Target logical qubits doesn't end up in $|1\rangle_L$...

I'm using $|0\rangle_L = \frac{1}{\sqrt{2}}(|1010\rangle + |0101\rangle)$ and $|1\rangle_L = \frac{1}{\sqrt{2}}(|1001\rangle + |0110\rangle)$ (same as the article. And initializing the control to $|1\rangle_L$ and the temporary to $|+\rangle_L = (|0101\rangle + |1010\rangle + |1001\rangle + |0110\rangle)$. The target is initialized to $|0\rangle_L$.

Is my understanding correct ? Is my way of doing thing also correct?

I'm really sorry if I'm missing something obvious but I don't understand why at the end of this sequence, the target qubit isn't set to $|1\rangle_L$ ? If I'm lacking basic knowledge on Lattice surgeries, could you please provide me some resources I could look at please?

Thank you in advance.

  • $\begingroup$ Are you able to implement the lattice surgery cnot when it's not encoded into the surface code? It's not really clear where you're stuck. $\endgroup$ May 14 at 22:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.