Codes and Protocols for Distilling<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>T</mml:mi></mml:math>, controlled-<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>S</mml:mi></mml:math>, and Toffoli Gates (2018)

We present several different codes and protocols to distill<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>T</mml:mi></mml:math>, controlled-<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>S</mml:mi></mml:math>, and Toffoli (or<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>C</mml:mi><mml:mi>C</mml:mi><mml:mi>Z</mml:mi></mml:math>) gates. One construction is based on codes that generalize the triorthogonal codes, allowing any of these gates to be induced at the logical level by transversal<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>T</mml:mi></mml:math>. We present a randomized construction of generalized triorthogonal codes obtaining an asymptotic distillation efficiency<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>γ</mml:mi><mml:mo stretchy="false">→</mml:mo><mml:mn>1</mml:mn></mml:math>. We also present a Reed-Muller based construction of these codes which obtains a worse<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>γ</mml:mi></mml:math>but performs well at small sizes. Additionally, we present protocols based on checking the stabilizers of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>C</mml:mi><mml:mi>C</mml:mi><mml:mi>Z</mml:mi></mml:math>magic states at the logical level by transversal gates applied to codes; these protocols generalize the protocols of. Several examples, including a Reed-Muller code for<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>T</mml:mi></mml:math>-to-Toffoli distillation, punctured Reed-Muller codes for<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>T</mml:mi></mml:math>-gate distillation, and some of the check based protocols, require a lower ratio of input gates to output gates than other known protocols at the given order of error correction for the given code size. In particular, we find a<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mn>512</mml:mn></mml:math>T-gate to<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mn>10</mml:mn></mml:math>Toffoli gate code with distance<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mn>8</mml:mn></mml:math>as well as triorthogonal codes with parameters<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mo stretchy="false">[</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>887</mml:mn><mml:mo>,</mml:mo><mml:mn>137</mml:mn><mml:mo>,</mml:mo><mml:mn>5</mml:mn><mml:mo stretchy="false">]</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>912</mml:mn><mml:mo>,</mml:mo><mml:mn>112</mml:mn><mml:mo>,</mml:mo><mml:mn>6</mml:mn><mml:mo stretchy="false">]</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>937</mml:mn><mml:mo>,</mml:mo><mml:mn>87</mml:mn><mml:mo>,</mml:mo><mml:mn>7</mml:mn><mml:mo stretchy="false">]</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math>with very low prefactors in front of the leading order error terms in those codes.