# 15-to-1 distillation protocol: why is the probability of error of the distilled state $35p^3$ and not $\binom{15}{3} p^3=455p^3$?

The circuit performing the $$15$$-to-$$1$$ distillation of the magic state $$T|+\rangle$$ is shown below (figure taken from Litinski's paper). The first gates encode the $$|+\rangle$$ of the 15 qubit code. A logical $$T$$ is applied on this state (the gate is transversal for the $$15$$ qubit code), and we finally decode the state. We end up with an un-encoded magic state $$T|+\rangle$$.

The 15-qubit code is a distance 3 code: hence we can detect up to $$2$$ errors. Assuming the only noisy gates are the $$T$$ gates (yellow box in this image) and that they fail with a probability of error $$p$$, by post-selecting the states which return trivial syndromes, we can guarantee that the final state has a probability of error $$O(p^3)$$.

In his paper, Litinski says that the probability of error, at leading order, is $$35p^3$$. For me it should be $$\binom{15}{3} p^3=455p^3$$ (there are $$\binom{15}{3}$$ possibilities to have $$3$$ errors).

Where does the $$35p^3$$ comes from? Is it that some triplet of errors are actually harmless? If so, where is it explained?

Because each single error has a unique symptom, for a given pair there will always be exactly one unique third error to add that turns the pair into an undetected logical error. For example, starting from error 3 and error 14 you will need error $$3 \oplus 14 = 13$$ to finish a bad triplet. So the number of bad triplets is at most the number of pairs, of which there are $${15 \choose 2} = 105$$. However, this overcounts by a factor of 3 because each failing triplet can be found redundantly via the $${3 \choose 2}$$ different pairs within it. If the pair $$a,b$$ has the finisher $$c$$ forming $$a,b,c$$, then $$a,c$$ will have the finisher $$b$$ and $$b,c$$ will have the finisher $$a$$ so those three pairs all are telling you the same triplet.
So the total number of bad triplets is $${15 \choose 2} / {3 \choose 2} = 35$$.
• @MarcoFellous-Asiani In the 15-to-1 factory, every error triplet $(a,b,c)$ where $a \oplus b \oplus c = 0$ will result in a silently corrupted output if applied. Commented Aug 8, 2023 at 16:05