states with energy difference $\omega$. A standard expression for $\gamma(\omega)$ can be obtained from a spin-boson model and reads [@Leggett1987; @DiVincenzo2005] $$\label{gamma_bath_text}
\gamma(\omega)=2 \kappa_n \left|\frac{\omega^n}{1-e^{-\beta\omega}}\right| e^{-|\omega|/\omega_c}.$$ Here, $\beta = 1/T$, with $T$ being the temperature of the bath (we set Boltzmann’s constant to one). For simplicity, we assume in the following a large cut-off energy $\omega_c \to \infty$. For $n = 1$, the bath is called ‘Ohmic’, whereas for $n \geq 2$ it is called ‘super-Ohmic’. We find in this work that $n$ has a strong influence on the decay times of the encoded states, with super-Ohmic baths providing the best scaling of the memory lifetime with $L$. These are not uncommon and emerge, e.g., for quantum dot spins in contact with phonons [@Golovach2004].

Simulations and error correction {#app:simulation_details}
--------------------------------

The eigenstates of Eq. (\[H0\]) are highly entangled, but it is nevertheless possible to perform classical simulations of the quantum memory in the simple framework discussed above. In order to achieve a time evolution in accordance with Eq. (\[rate equation\]), each iteration of a simulation consists of the following steps. (i) We record the relevant parameters of the system. (ii) We calculate the total spin flip rate $R = \sum_i 