# How does the size of a toric code torus affect its ability to protect qubits?

The Toric code Hamiltonian is:

$\sum_{x,y}\left( \prod_{i\in p(x,y)} Z_{ixy} + \prod_{i\in v(x,y)} X_{ixy} \right),$

where the $v$ and $p$ are defined according to this picture (courtesy of James Wooton's contribution to Wikipedia): At the moment we have an infinite 2D lattice:

$x\rightarrow \pm \infty$
$y\rightarrow \pm \infty$.

But if we set periodic boundary conditions such that (and feel free to edit the question if I am incorrect about this):

$p(x+10,y)=p(x,y)$
$v(x,y+10)=v(x,y)$,

We get the follownig torus (image courtesy of James Wooton's contribution to Wikipedia) : Now in my periodic boundary conditions, I chose to add $+10$ but could have added some other number instead. How does this "size of the torus" affect the function of the toric code?

The Toric code is an error correcting code. The distance of the code (I.e. the number of local operations required to convert one logical state into an orthogonal one) is equal to $N$, where the Toric code is defined on an $N\times N$ grid.
One of the places that the performance of the Toric code really wins out is that although it is only distance $N$, the vast majority of sets of $N$ single qubit errors can be corrected, and it is only once you get $O(N^2)$ errors that you get killed. That means that as $N\rightarrow\infty$, those $O(N)$ terms vanish, and you get a finite per-qubit error rate as a threshold for error correction. For finite $N$, the error correcting threshold will be lower.
More precisely, if $$d$$ is the code distance and $$\epsilon_P$$ is the physical qubit error rate then the logical qubit error rate $$\epsilon_L$$ is
$$\epsilon_L \approx c_1 \left(c_2\frac{\epsilon_P}{\epsilon_T}\right)^{\left\lfloor\frac{d+1}{2}\right\rfloor}$$
(c.f. equation $$(2)$$ on p.11 in this paper) where $$c_1$$ and $$c_2$$ are constants and $$\epsilon_T$$ is the threshold error rate which for the Toric code is in the range $$0.75\%-15.5\%$$ and depends on factors such as decoder performance and the quality of syndrome extraction. See e.g. here and here for more details.