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).
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:
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 tomerge
? - 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 arerec[-8] rec[-9]
(for simplicity), the detector annotation for qubits 7 and 15 in the first round of thesplit
operation would be (assumingrec[-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!
stim.Circuit.shortest_graphlike_error()
method returns the same value ('d') for all cases. $\endgroup$