Small codes for magic state distillation

Magic state distillation is a critical component in leading proposals for fault-tolerant quantum computation. Relatively little is known, however, about how to construct a magic state distillation routine or, more specifically, which stabilizer codes are suitable for the task. While transversality of a non-Clifford gate within a code often leads to efficient distillation routines, it appears to not be a necessary condition. Here we have examined a number of small stabilizer codes and highlight a handful of which displaying interesting, albeit inefficient, distillation behaviour. Many of these distill noisy states right up to the boundary of the known undististillable region, while some distill toward non-stabilizer states that have not previously been considered.


I. INTRODUCTION
Most efforts towards building a large-scale quantum computer use error-correcting codes to protect the quantum information.However, no matter what code is chosen, the set of gates that are transversal (i.e.manifestly fault-tolerant) will be non-universal [1], meaning these operations are insufficient for useful quantum computation.Therefore, some additional resource will be required to supplement the limited set of operations.The most promising technique for circumventing this issue is to supplement the non-universal gate set with a supply of special resource states, known as magic states.Having access to pure magic states enables implementation of an additional unitary operation, which ultimately provides us with a universal gate set.The magic state distillation protocol, as introduced by Knill [2] and Bravyi and Kitaev [3], provides a method of producing these resource states through an iterative procedure in which less pure magic states are consumed to produce a higher purity magic state using only stabilizer operations.
Here we use small stabilizer codes, which means that the number of qubits, the number of measurements and the number of nonlocal operations involved in each round of distillation are all small.While these are attractive features, it seems that using a small code limits the amount of purification that can occur per round of distillation.For practical purposes, one typically quantifies how many raw magic states are required to produce a single magic state of very high purity (e.g., infidelity of no more than 10 −10 ).Applying this metric one typically finds that small codes fare much worse than larger codes like the 15qubit Reed-Muller code [3].If instead we rank codes by their range of applicability, i.e., the threshold noise rate above which purification no longer occurs, then smaller codes seem to fare at least as well as larger codes.Although this may not be a pressing issue experimentally, since it seems reasonable to expect raw state preparation infidelity on the order of 10 −2 -10 −4 , it is of foundational interest.Bravyi and Kitaev highlighted the fact that tight magic state distillation routines imply a sharp transition, as noise is decreased, from a circuit that is classically efficiently simulable to one that enables universal quantum computation.The question of tight distillability for qutrit states was addressed in [4,5].
Efficient codes for magic state distillation typically exhibit quadratic (p → O(p 2 )) or cubic (p → O(p 3 )) suppression of the error parameter p.The codes listed here all exhibit linear error suppression and consequently are not competitive with existing routines in terms of efficiency.Nevertheless we feel that exploring the landscape of codes that achieve distillation is still worthwhile.Reichardt [9] has previously summarized a handful of known distillation routines exhibiting the best thresholds.

arXiv:1512.04765v2 [quant-ph] 4 Mar 2016
A number of the codes presented below achieve tight distillation right up to the boundary of the stabilizer octahedron -the convex hull of Pauli eigenstates depicted in Fig. 1 -whose interior contains states that are provably undistillable.We also present codes that converge, upon iteration, to states that are not those that are typically considered i.e., the H-type and T -type magic states.None of our codes require twirling (which diagonalizes the state in the {|H , |H ⊥ } or {|T , |T ⊥ } basis) between rounds.

II. BACKGROUND
Here we briefly summarize notation and terminology associated with both magic state distillation and with the type of quantum codes that we have used.

A. Magic state distillation, thresholds and yields
Magic state distillation routines are described in terms of stabilizer error correcting codes, which in turn are described by a set of generators {G i } consisting of Pauli operators.The protocol (see e.g.[6]) consists of iteratively applying the following steps: When successful, the output state(s) will be purified in the direction of the target magic state.Typically k = 1 and consequently an [[n, k = 1, distance]] stabilizer code is used (see [10][11][12] for k ≥ 2 however).
For simplicity, one can assume that input states suffer from depolarizing noise and take the form where |M is the target magic state.The maximum value of p for which distillation is possible even in principle, which we call p oct , is when ρ M crosses the boundary into the stabilizer octahedron.With reference to  The yield [8] of a magic state distillation routine is defined as where N is the total number of iterations needed to obtain p out starting at initial error rate p, and p is the probability of success on the k th iteration.This quantity relates to the efficiency/resource overhead of a magic state distillation routine.

B. Codeword stabilized quantum codes
The Pauli measurements associated with a stabilizer code can be written in binary symplectic notation so that An n-qubit stabilizer code with n generators has k = 0 and consequently specifies a 1-dimensional subspace of Hilbert space i.e, a stabilizer state.By applying local Cliffords (the unitaries that map Pauli operators to Pauli operators under conjugation), a generic stabilizer state (X|Z) can be brought to the form (1 n |Γ) where Γ is the adjacency matrix of the graph.When stabilizer states take this particular form they are called graph states, sometimes denoted |Γ .
The majority of magic state distillation routines presented here will be described by codeword stabilized (CWS) codes (see [13]).In this representation, the code is given by a graph state written as an adjacency matrix, Γ ∈ Z n×n 2 , as well as a classical codeword, w ∈ Z n 2 .We may choose the logical basis state |0 L of our code to be the state Subsequently the logical |1 L operator is given by where w is the codeword and Z w denotes the product of Z operators The unitary encoding/decoding associated with these codes is quite straightforward as illustrated in Fig. 2b it involves controlled-Z rotations applied to qubits whose vertices are connected by edges in the graph.A convenient way of visualizing CWS codes is to display the graph and highlight the subset of vertices 1 ≤ i ≤ n such that w i = 1 see Fig. 3,4 and 6.

III. RESULTS
All stabilizer codes are local Clifford equivalent to some CWS stabilizer code.Consequently CWS stabilizer codes form a subset of all stabilizer codes and so checking all combinations of graphs, Γ, and codewords, w, may still miss stabilizer codes that are useful for distillation.Nevertheless, for n ≤ 4 qubits we iterated over all graphs on n vertices and for n ∈ {5, 6} qubits we iterated over non-isomporphic graphs on n vertices.We were primarily focused on recording those CWS codes that achieve tight distillation but we also noted a number of non-tight codes that distilled to target states other than |H .
With the exception of one code, the codes that we present will be depicted graphically.concise representation is possible because of the CWS formalism that we described in II B. All the codes that we present converge, upon repeated iteration, to a pure state on the surface of the Bloch sphere.We give this point in coordinates (x, y, z) where x = Tr(|M M |X) etc. Codes that we describe below as being tight obey the following property: all non-stabilizer states in the same quadrant as |M are distillable.For instance, if |M has Bloch vector (x, 0, z) with x, z > 0 then all states ρ satisfying Tr(Xρ) + Tr(Zρ) > 1 converge to |M under repeated iteration.(We confirmed this numerically by taking a random sample of 1000 points from the relevant region).

A. Codes achieving tight distillation
A 3-qubit code with generators corresponding to the logical basis states distills an equatorial state in the y-z plane with Bloch coordinates (0, −.83929, −.54369) up to a tight error threshold of p oct = .276921.Other codes achieving tight distillation are given in pictorial form in Fig. 3 and Fig. 4. It is a straightforward exercise to recover the generators and logical operators if necessary.The 5-qubit code in Fig. 3(e) distills to the |H -type magic state but is more efficient than the (also tight) 7-qubit Steane code.The efficiency of these codes is compared in Fig. 5. From bottom to top we have (i) the 7-qubit Steane code as applied by Reichardt [14] (ii) the 5-qubit code in Fig. 3(e), (iii) 3-qubit code from Fig. 3(a) and (iv) the 3-qubit code in Eq. ( 6).

B. Codes not achieving tight distillation
Here we highlight a small number of codes that, even though they do not achieve tight distillation, we still find to be noteworthy.
The |T -type states (depicted in Fig. 1) were shown to be distillable by Bravyi and Kitaev [3] using the perfect [ [5,1,3]] code.We are not aware of any additional routines for |T states that have subsequently been developed.This is in marked contrast to |H -type distillation for which a number of codes have been found.For this reason we note the existence of a 4-qubit code in Fig. 6(b) that also converges to |T -type states.A visual comparison with the [ [5,1,3]] code in Fig. 6(a) indicates that they are closely related.Unfortunately, the threshold for the new code is worse than that of the [ [5,1,3]] code.Finding tight distillation routines for the |T direction was already known to be more complex than the |H case because of a no-go theorem in [15].
It is of interest to find distillation routines that distill |V -type magic states, which look like (x, y, z) = ( 35 , 0, 4 5 ) in the Bloch sphere picture.Supplementing Cliffords with such states leads to a set of gates -the V -basis -that is highly efficient for gate synthesis [7].We did not find such a code but in Fig. 6(d) we depict a code that converges to a nearby state (x, y, z) = (0.60965, 0., 0.79267).We have presented a collection of qubit magic state distillation schemes using small stabilizer codes, most of which achieve tight distillation up to the edge of the stabilizer octahedron.Two codes that are not tight were still noted because they converge to |T and |π/3 respectively.Our distillation routines converge to equatorial states, which means that they can be used to implement rotations about a Pauli axis using standard halfteleportation techniques [3].We have noted that inefficiency of our routines relates to linear error suppression and leave as open question whether there is some way of boosting their efficiency by combining them with other codes or techniques.Another possible avenue is to use these codes to convert non-stabilizer states of one type to another, as was done in e.g., [16].For example, if we have access to almost pure |H states (after using the Reed-Muller code, say) then input these to the |π/3 routine, the output is an almost pure state somewhere between |H and |π/3 .Further analysis of the relative merits of methods such as this is left for future work.

FIG. 1 .
FIG. 1.The stabilizer octahedron inscribed within the Bloch sphere: Six Pauli eigenstates form the vertices of an octahedron.States within the octahedron are provably undistillable so the best one can hope for is to distill states up to the boundary.The two pure non-stabilizer states singled out here, |H and |T , were shown to be distillable by Bravyi and Kitaev [3].

1 . 3 .
Prepare n copies of the input state ρ ⊗n in , where n is the size of the code 2. Perform Pauli measurements corresponding to each of the n − k generators G i , and postselect on the desired outcome Optionally perform a Clifford transformation based on the measurement outcome.

2 (
FIG.2.Creating the graph state associated with a given graph amounts to performing controlled-Z rotations between qubits whose vertices are connected by an edge in the graph.

2 FIG. 3 .
FIG.3.Codeword stabilized quantum codes with tight distillation thresholds.The classical codeword w associated with each graph is the binary vector with a "1" in lighter pink positions and "0" in darker blue positions.
FIG.4.Codeword stabilized quantum codes with tight distillation thresholds.The classical codeword w associated with each graph is the binary vector with a "1" in lighter pink positions and "0" in darker blue positions.

FIG. 5 .
FIG. 5.Curves showing the yield (efficiency) of various tight distillation routines as a function of input noise rate p.From bottom to top we have (i) the 7-qubit Steane code as applied by Reichardt[14] (ii) the 5-qubit code in Fig.3(e), (iii) 3-qubit code from Fig.3(a) and (iv) the 3-qubit code in Eq. (6).
FIG.6.Codeword stabilized quantum codes that do not achieve tight thresholds