  Quantum error correction codes are usually designed to correct errors
regardless of their physical origins. In large-scale devices, this is an
essential feature. In smaller-scale devices, however, the main error sources
are often understood, and this knowledge could be exploited for more efficient
error correction. Optimizing the quantum error correction protocol is therefore
a promising strategy in smaller devices. Typically, this involves tailoring the
protocol to a given decoherence channel by solving an appropriate optimization
problem. Here we introduce a new optimization-based approach, which maximizes
the robustness to faults in the recovery. Our approach is inspired by recent
experiments, where such faults have been a significant source of logical
errors. We illustrate this approach with a three-qubit model, and show how
near-term experiments could benefit from more robust quantum error correction
protocols.
