  We consider the problem of calculating the logical error probability for a
stabilizer quantum code subject to random Pauli errors. To access the regime of
large code distances where logical errors are extremely unlikely we adopt the
splitting method widely used in Monte Carlo simulations of rare events and
Bennett's acceptance ratio method for estimating the free energy difference
between two canonical ensembles. To illustrate the power of these methods in
the context of error correction, we calculate the logical error probability
$P_L$ for the 2D surface code on a square lattice with a pair of holes for all
code distances $d\le 20$ and all error rates $p$ below the fault-tolerance
threshold. Our numerical results confirm the expected exponential decay
$P_L\sim \exp{[-\alpha(p)d]}$ and provide a simple fitting formula for the
decay rate $\alpha(p)$. Both noiseless and noisy syndrome readout circuits are
considered.
