Magic state distillation uses special codes to suppress errors in input states, which are often tailored to a Clifford-twirled error model. We present detailed measurement sequences for magic state distillation protocols which can suppress arbitrary errors on any part of a protocol, assuming the independence of errors across qubits. Provided with input magic states, our protocol operates on a two-dimensional square grid by measurements of $ZZ$ on horizontal pairs of qubits, $XX$ on vertical pairs, and $Z,X$ on single qubits.
 P. Aliferis, D. Gottesman, and J. Preskill, ``Quantum accuracy threshold for concatenated distance-3 codes,'' Quant. Inf. Comput. 6, 97–165 (2006), arXiv:quant-ph/0504218.
 J. Haah, M. B. Hastings, D. Poulin, and D. Wecker, ``Magic state distillation with low space overhead and optimal asymptotic input count,'' Quantum 1, 31 (2017), arXiv:1703.07847v1.
 E. T. Campbell and M. Howard, ``Unified framework for magic state distillation and multiqubit gate synthesis with reduced resource cost,'' Phys. Rev. A 95, 022316 (2017), arXiv:1606.01904v3.
 T. Jochym-O'Connor, Y. Yu, B. Helou, and R. Laflamme, ``The robustness of magic state distillation against errors in clifford gates,'' Quant. Inf. Comput. 13, 361–378 (2013), arXiv:1205.6715.
 C. Chamberland and A. W. Cross, ``Fault-tolerant magic state preparation with flag qubits,'' Quantum 3, 143 (2019), arXiv:1811.00566.
 C. Chamberland and K. Noh, ``Very low overhead fault-tolerant magic state preparation using redundant ancilla encoding and flag qubits,'' npj Quantum Information 6, 91 (2020), arXiv:2003.03049.
 T. Karzig, C. Knapp, R. M. Lutchyn, P. Bonderson, M. B. Hastings, C. Nayak, J. Alicea, K. Flensberg, S. Plugge, Y. Oreg, et al., ``Scalable designs for quasiparticle-poisoning-protected topological quantum computation with majorana zero modes,'' Phys. Rev. B 95, 235305 (2017), arXiv:1610.05289.
 N. Delfosse, B. Reichardt, and K. Svore, ``Fault-tolerant cat state preparation with low classical and quantum hardware requirement,'' (2020).
 S. Bravyi and A. Kitaev, ``Universal quantum computation with ideal Clifford gates and noisy ancillas,'' Phys. Rev. A 71, 022316 (2005), arXiv:quant-ph/0403025.
 J. Haah and M. B. Hastings, ``Codes and protocols for distilling $T$, controlled-$S$, and Toffoli gates,'' Quantum 2, 71 (2018), arXiv:1709.02832.
This Paper is published in Quantum under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. Copyright remains with the original copyright holders such as the authors or their institutions.