# What is a "temporal" or "timelike" logical error in the surface code?

When studying the surface code with phenomenological or circuit noise, the syndrome measurement is noisy, and therefore one has to repeat the syndrome measurement for several rounds before decoding. In all literature about surface code, people repeat the measurement for $$d$$ rounds, where $$d$$ is code distance. But why is that?

There are several reasons for why $$\Theta(d)$$ rounds are necessary and sufficient, and the one which baffles me is due to "temporal" or "timelike" logical error. Specifically, one can imagine a 3D space-time "syndrome graph" or "decoder graph", where time goes upwards. A "temporal" or "timelike" logical error is a path that links the bottom boundary with the top boundary.

I find it difficult to appreciate the consequence of such error, either in a lattice surgery circuit, or in an identity circuit without computation. I guess my issue is that I tend to project such bottom-to-top path onto the 2D spacelike plane, and then simply treat it as a spacelike error.

Specifically, I tend to focus on the post-correction residual data error $$R$$ and decompose it as $$R=L\cdot E$$, where $$E$$ is an operator with the same syndrome as $$R$$ and with minimum weight, and $$L$$ is a logical operator. I care about two probabilities:

• $$p$$: the probability that $$L$$ is nontrivial,
• $$q$$: conditioned that $$L$$ is trivial, the probability of $$E$$.

I understand that $$p$$ and $$q$$ both depend on the number of measurement rounds. But I don't see why $$\Theta(d)$$ is necessary and sufficient for (a) $$\lim_{d\rightarrow\infty}p=0$$, or (b) $$q$$ decays exponentially with $$|E|$$. (Assume iid circuit noise.)

Can anyone elaborate why a bottom-to-top path is an issue, either in a lattice surgery circuit, or in an identity circuit without computation?

What is a “temporal” or “timelike” logical error in the surface code?

An example of an undetectable timelike error is a stabilizer measurement being consistently wrong. For example, when you initialize your data qubits to be $$|0\rangle$$, all the X stabilizer measurements project randomly into their +1 or -1 eigenspaces. If one of the X stabilizers happens to project into its -1 eigenspace, but your measurements of that stabilizer keep failing and reporting that it's in its +1 eigenspace, that's an undetectable timelike error.

I find it difficult to appreciate the consequence of such error, either in a lattice surgery circuit, or in an identity circuit without computation.

You're correct that an undetectable timelike error can't hurt a typical identity circuit. However, this is only because identity circuits don't move the logical observable around.

Even more trickily, the timelike boundaries of an identity circuit in a memory experiment have a boundary type (X or Z) matching the type of the observable you want to measure. So errors of the opposite type (the type that can invert the observable you are measuring) can't terminate on those boundaries. So in a memory experiment there are no undetectable purely timelike errors that invert the logical observable you are measuring.

Problems only arise when the timelike boundaries are not of the same type as the observable you are tracking. This necessarily means the observable is partially spacelike. It has to move to the side because it can't terminate on a boundary of the opposite type. Which allows timelike errors to pierce it:

Can anyone elaborate why a bottom-to-top path is an issue, either in a lattice surgery circuit, or in an identity circuit without computation?

Computations often involve moving logical qubits around. For example, you might move a logical qubit from a storage area to a processing area. You do this by moving the X and Z logical observables defining the logical qubit. You move the observables by taking advantage of the fact that you have measured local X and Z stabilizers, which you can multiply into the corresponding logical observable to compute the slightly-moved observable that has been moved over the stabilizer at that location.

To be clear: there's not really anything moving on the quantum computer. You're just changing some tracking information in the classical control system. But you have to update the tracking information correctly. You need to compute the products of all of the stabilizers in the area you want to move the observable across, because this tells you what the sign on the new tracked observable should be compared to the sign of the old tracked observable.

If there is a timelike error crossing through the area you move an observable over, then one of the stabilizers in that area has the wrong sign. When you multiply it into the area product while moving the observable over the stabilizer, you end up thinking the observable's sign is the opposite of what it should be. The observable-after-movement will not be equal to the observable-before-movement. And everything breaks. The logical qubit you are tracking now includes a Pauli error.

In summary: tracking logical qubits and operations often involves computing products of stabilizers in an area. Timelike errors negate stabilizer signs, breaking the tracking.

And, of course, real errors are often complicated combinations of spacelike and timelike errors with tons of symptoms that are just misleading enough that the decoder miscategorizes it.

Well I also had a similar issue.

As far as I know, when you are considering Lattice Surgery specifically Merging Operation, you get the final output state depending on Measurement result. For applying CNOT operation between two Logical qubits, according to what result(Merging Operation) you get, you decide whether you should apply Logical operator or not. In here, All you need to concern if the measurement error is either odd or even. so basically if you are thinking about temporal Logical failure, that is why you should think measurement error parity.

I hope this information gives some intuition about temporal Logical error.