  We demonstrate that small quantum memories, realized via quantum error
correction in multi-qubit devices, can benefit substantially by choosing a
quantum code that is tailored to the relevant error model of the system. For a
biased noise model, with independent bit and phase flips occurring at different
rates, we show that a single code greatly outperforms the well-studied Steane
code across the full range of parameters of the noise model, including for
unbiased noise. In fact, this tailored code performs almost optimally when
compared with 10,000 randomly selected stabilizer codes of comparable
experimental complexity. Tailored codes can even outperform the Steane code
with realistic experimental noise, and without any increase in the experimental
complexity, as we demonstrate by comparison in the observed error model in a
recent 7-qubit trapped ion experiment.
