1
$\begingroup$

This is an understanding check more than an actual question. Implementing lattice surgery has already been discussed on the forum: How to implement lattice surgery in stim? -- I'm just trying to make sure I understand everything perfectly (including lattice surgery itself).

Initial state with two patches and a column of uninitialized data qubits

The figure above shows the initial condition for two d=3 patches (rotated) before a lattice surgery merge operation.

Next, as soon as a merge operation starts, the combined patch looks like the figure below:

Merged patch

A few questions up till this point:

  • Are X-measure qubits 10 and 12 needed at all? Or can I get away by ignoring them?
  • Data qubits j, k, l will be initialized in the Z-basis since it's the basis of the lattice surgery. Consequently, in Stim, the detector annotations for X-measure qubits 9, 10, 12, 13 will not be included in the first round of the merge operation?
  • The Z-measure qubits 7, 15 are changing from 2-body operators to 4-body operators, but the corresponding detector annotations will keep comparing the measurement in the first round after the merge operation with the measurement just prior to merge?
  • Will the two qubits be considered merged after d rounds of syndrome measurements? What would the logical observable now be for Stim?

Next, suppose I want to perform a split operation on the same merged patch. This would involve measuring the intermediate data qubits j, k, l:

  • The intermediate qubits will be measured in the basis of the lattice surgery (Z) and then used in the detector annotations of the Z-measure qubits 7 and 15? More specifically, if the measurement records for the intermediate qubits are rec[-5] rec[-6] rec[-7] and the measurement records for qubits 7 and 15 just before the split are rec[-8] rec[-9] (for simplicity), the detector annotation for qubits 7 and 15 in the first round of the split operation would be (assuming rec[-1] rec[-2] are the most recent measurements for qubits 7 and 15:
DETECTOR(Qubit 7) rec[-1] rec[-8] rec[-5] rec[-6] rec[-7]
DETECTOR(Qubit 15) rec[-2] rec[-9] rec[-5] rec[-6] rec[-7]

I'm still in the process of understanding surface codes and lattice surgery, so it's very likely I'm missing fundamental things here but I would really appreciate all answers and explanations, thank you!

$\endgroup$
7
  • $\begingroup$ That all sounds basically correct, or at least close enough that if you try to implement it you'll catch any remaining details. $\endgroup$ Commented Jun 5, 2023 at 21:02
  • $\begingroup$ Did you use Stim to create the two pre-merge patches and associated stabilizer circuits in each or did you do all of it with custom code? If Stim has a way to create the pre-merge patches with the respective stabilizer circuits automatically, could you clarify how? $\endgroup$ Commented Mar 27 at 11:45
  • 1
    $\begingroup$ @user1936752 Stim cannot generate multiple patches. I used Python to generate multiple patches and their combined Stim circuit. $\endgroup$ Commented Mar 28 at 14:14
  • $\begingroup$ @CraigGidney Hi Craig, I'm facing a weird issue in my implementation -- my experiment involves running two patches for 'd' round after which I merge the two patches and generate syndromes for the merged patch for another 'd' rounds. I then measure the observable of the merged patch to determine the logical error rate. For some reason, when the LS merge basis is the same as the observable I'm measuring (e.g. X observable and X-basis merge), the LER is orders of magnitude worse than the case when they are different. Is there anything obvious I could be doing wrong? $\endgroup$ Commented Mar 30 at 15:23
  • $\begingroup$ @CraigGidney To add to the comment above, the stim.Circuit.shortest_graphlike_error() method returns the same value ('d') for all cases. $\endgroup$ Commented Mar 30 at 15:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.