# Magic state distillation with the $15$ qubit code. How are the transversal $T$ performed? Also via a (lower level) state injection?

I have a code $$C1$$ that admits native fault-tolerant gates for any element in the Clifford group (for instance via transversal implementation), but that then doesn't have an easy way to perform the $$T$$ gate.

In practice, to implement the $$T$$-gate we can use state injection and create a logical ancilla state in the state $$|A\rangle=T |+\rangle$$.

A way to create the $$|A\rangle$$ state in a reliable manner is to make use of a code that has a native fault-tolerant $$T$$ gate. The $$15$$ qubit code is such example (the $$T$$-gate is transversal).

In practice, to prepare $$|A\rangle$$, we then:

1. Regroup $$15$$ logical qubits of the code $$C1$$ and encode with them the logical $$|+_L\rangle$$ state of the $$15$$ qubit code (hence each qubit of the $$15$$ qubit code is a logical qubit of $$C1$$, itself composed of physical qubits).
2. Apply a transversal $$T$$ to this logical qubit (it is equal to a logical $$T$$ thanks to the $$15$$ qubit code properties)
3. Decode the $$15$$ qubit encoding: we now have a state $$|A\rangle$$ encoded with the code $$C1$$, we can perform state injection.

(Of course we have to repeat the procedure to have a reliable state but I skip this un-necessary detail for my question).

## My question:

For $$C_1$$ we do not have a fault-tolerant $$T$$ gate. However, we need to do a $$T$$ gate within this code for step 2 of the procedure I described. How is it done? Do we use either one of the following methods? Another thing I am not thinking of?

1. We implement a non-fault-tolerant $$T$$ gate within $$C_1$$ (hence super noisy, but it is not "really" a problem thanks to the logic of magic state distillation). In this case, I would be interested to know which operations are performed on the physical qubits for the surface code to perform this "non fault-tolerant logical $$T$$ gate" (it probably deserves another question).
2. We basically do another state injection technique to perform the $$T$$ gates. This time we will then use an encoding with the $$15$$ qubit code but each qubit within this code will now be a physical qubit (we are basically at a "lower level" of encoding).

You start with physically injected magic states, expanded into $$C_1$$. In the case of the surface code you could use e.g. Li injection. • Thank you very much. I reformulate in my own word (and complement a bit) to check if I understand you properly. Step 1: we initialize a physical qubit in the magic state. Then using the paper you reference you can "expand" it to its encoded version. At this point we could do state injection but it would lead to very noisy $T$ gates. Step 2: we use a distillation protocol to create better magic states. We can use the 15-to-1 protocol and use the magic state of step 1 to create "better" magic states. Step 3: if we are still not satisfied we use the magic states of step 2 to create "better" magic Mar 20, 2022 at 12:51
• states. And so on until step N where we consider that the fidelity of the magic states (and hence of the T gate) will be good enough. Then we can implement a $T$ gate with a "good enough" fidelity. Would you agree with my reformulation in my own words of your answer and my overall understanding? Thanks a lot! Mar 20, 2022 at 12:51