The Resource Theory of Stabilizer Computation
Abstract
Recent results on the nonuniversality of faulttolerant gate sets underline the critical role of resource states, such as magic states, to power scalable, universal quantum computation. Here we develop a resource theory, analogous to the theory of entanglement, for resources for stabilizer codes. We introduce two quantitative measures  monotones  for the amount of nonstabilizer resource. As an application we give absolute bounds on the efficiency of magic state distillation. One of these monotones is the sum of the negative entries of the discrete Wigner representation of a quantum state, thereby resolving a longstanding open question of whether the degree of negativity in a quasiprobability representation is an operationally meaningful indicator of quantum behaviour.
subref \newrefsubname = section \RS@ifundefinedthmref \newrefthmname = theorem \RS@ifundefinedlemref \newreflemname = lemma
I Introduction
It is a major open problem in quantum information to determine the origins of quantum computational speedup. In particular, it is highly desirable to characterize exactly what resources are required for quantum computation. Beyond the obvious theoretical significance, a resolution to this problem is important because actual physical systems almost never afford us access to arbitrary quantum operations. For instance, a physical implementation of a manyqubit system may suffer from low purity, small coherence times or the inability to create large amount of entanglement. The problem is to determine how best to perform quantum computation in the face of the operational restrictions dictated by physical considerations.
Broadly speaking, operational restrictions divide any set of operations into two classes: the subset of operations that are easy to implement and the remainder that are not. For example, a common paradigm in quantum communication is two or more spatially separated parties communicating using classical communication and local quantum operations, considered “cheap” resources, supplemented by “expensive” resources that require global manipulation of quantum states, such as entanglement or quantum communication. This division of quantum operations into cheap and expensive parts motivates the development of a resource theoryHorodecki2012ResourceTheories (). In the sense just explained, entanglement theory is the resource theory of quantum communicationBennettConcentratingEntanglementRT1 (); BennettPurifyingEntanglementRT2 (); HorodeckiEntReview (). In this paper we develop a resource theory of quantum computation.
The major obstacle to physical realizations of quantum computation is that real world devices suffer random noise when they execute quantum algorithms. Fault tolerant quantum computation offers a framework to overcome this problem. Starting from a given error rate for the physical computation, logical encodings can be applied to create arbitrarily small effective error rates for the logically encoded computation. Transversal unitary gates, i.e. gates that do not spread errors within each code block, play a critical role in fault tolerant quantum computation. Recent theoretical work has shown that a fault tolerant scheme with a set of quantum gates that is both universal and transversal does not existEastin2009Restrictions ().
Many — though not all — of the known fault tolerant schemes are built around the stabilizer formalism. Stabilizer codes pick out a distinguished set of preparations, measurements, and unitary transformations that have a fault tolerant implementation; these are sometimes called “stabilizer operations”. In this case the fault tolerant operations are not only subuniversal but actually efficiently classically simulable by the GottesmanKnill theoremGottesman1998GKtheorem (). Thus to achieve universal quantum computation the stabilizer operations must be supplemented with some other faulttolerant nonstabilizer resource.
A celebrated scheme for overcoming this limitation is the magic state model of quantum computation Shor1996FT (); Gottesman1999Teleportation () where the additional resource is a set of ancilla systems prepared in some (generally noisy) nonstabilizer quantum state. The idea is to consume nonstabilizer resource states using only stabilizer operations in order to implement nonstabilizer unitary gates, thereby promoting stabilizer computation to universal quantum computation. Typically the ancilla preparation process will be subject to the physical error rates as, by necessity, this process is outside the realm of the stabilizer formalism. Thus we expect the raw resource states to be highly mixed, but such states are not directly useful for injection. The resolution is to perform “magic state distillation” Bravyi_magic_state_paper (), wherein stabilizer operations are used to distill a large number of these highly mixed resource states into a small number of very pure resource states. In this context the power of universal quantum computation reduces to a characterization of the usefulness of the resource states.
We will divide the set of quantum states into those that can be prepared using the stabilizer formalism, the stabilizer states, and those that can not, the magic states^{1}^{1}1This somewhat whimsical name stems from two sources. First, the use of the magic moniker in the original Bravyi and Kitaev paper to describe states that are, apparently magically, both distillable and useful for state injection. Second, the long held desire by one of the present authors to refer to himself as a mathemagician.. The goal is to characterize the optimal use of stabilizer operations to transform resource magic states into the target magic states required for implementing nonstabilizer gates. This is best considered as two distinct problems:

Starting from any number of copies of a particular resource state , is it possible to produce even a single copy of a target state ?

Assuming this process is possible, how efficiently can it be done? That is, how many copies of are required to produce copies ?
The known protocols are able to distill some, but not all, resource magic states to target states useful for quantum computation. Until very recently it wasn’t even known whether some distillation protocol could be found to take any magic state to a nearly pure magic state. Astonishingly, the answer to the first question (at least in odd dimensions) is no: it was shown in veitch2012BoundMagicNJP () that there is a large class of bound magic states that are not distillable to pure magic states using any protocol. (There has also been some interesting progress on this problem in the qubit case Campbell_bound_magic_states (); Reichardt_magic_state_dist_2009 (); Reichardt_magic_state_dist_2005 ().) The second question is the primary focus of this work. We devise quantitative measures of how magic a quantum state is, allowing us to upper bound the distillation efficiency. For example, suppose the target state is five times as magical as the resource state according to such a measure. Then we can immediately infer that at least five resource states will be required for each copy of the target state.
Finding distillation protocols to minimize the amount of resources required is an extremely important problem. Currently stabilizer codes provide the best hope for practical quantum computation, but the physical resource requirement for known distillation protocols is enormous. For example, reference FowlerPrimerOnSurfaceCodes () analyzes the requirements for using Shor’s algorithm to factor a 2000 bit number using physical qubits with realistic error rates^{2}^{2}2Physical qubit error rate 0.1%, ancilla preparation error rate 0.5%.. A surface code construction is used to achieve fault tolerance, from which it is found that roughly a billion physical qubits are required. About of these physical qubits are used in the distillation of the ancilla states required to perform the nonstabilizer gates. More efficient distillation protocols are critical for the realization of quantum computation, and there has been a recent flurry of effort on this front eg. EastinToffoliMSD (); BravyiMagicStateLowOverhead (); FowlerPrimerOnSurfaceCodes (); JonesFourierDistProtocols (); MeierMSD4Qubit (). Of particular interest is ref. CampbellMSDAllPrimeDim () showing how magic state distillation can be extended from qubits to systems of arbitrary prime dimension (qudits) and giving evidence that distillation efficiencies may be significantly improved using oddprime dimensional qudits. Unfortunately, although these innovations offer improvement over the original magic state distillation protocols, the physical requirements remain extravagant. Moreover, it is unclear whether these protocols are near optimal or if dramatic improvements might still be made. The current work partially addresses this problem by developing a theory for the characterization of resources for stabilizer computation.
To quantify the amount of magic resource in a quantum state we introduce the notion of a magic monotone. This is any function mapping quantum states to real numbers that is nonincreasing under stabilizer operations. This is just the common sense requirement that the amount of nonstabilizer resource available cannot be increased using only stabilizer operations. Magic monotones are valid measures of the magic of a quantum state in exactly the same way entanglement monotones are valid measures of the entanglement of a quantum state. The main contribution of this paper is the identification and study of two magic monotones: the relative entropy of magic and the mana.
The relative entropy of magic is the analogue of the relative entropy of entanglement. Both magic theory and entanglement theory belong to a broader set of resource theoriesHorodecki2012ResourceTheories (). In the general setting the quantum states are divided into the free states that can be created using the restricted operations and the resource states that can not. The study of resource theories has primarily focused on the question of the reversible asymptotic inconvertibility of resource states, i.e., transformations among many copies of these states in the limit that an infinite number of copies are available. General resource theories quantify the usefulness of a quantum state via monotones that are nonincreasing under the restricted class of operations.
In general there can be many valid choices of monotone. In the context of reversible asymptotic interconversion, one standard choice is the asymptotic regularization of the relative entropy distance to the set of free states. The relative entropy distance between two states is . In the present context the relative entropy monotone is the relative entropy of magic , the minimum relative entropy distance between the resource state and any stabilizer state. We show that in general this monotone is subadditive in the sense ; because of this, in the asymptotic regime this measure should be regularized as . This monotone is the regularized relative entropy of magic. \SecrefRelativeEntropy is devoted to proving that this monotone has the property that if it is possible to reversibly asymptotically interconvert states and using stabilizer protocols then the rate at which this can be done is given by . Along the way we also use the relative entropy of magic to find some interesting features of magic theory. In particular, we establish that if we wish to create many copies of any magic state (including a bound magic state) starting with pure magic states, the ratio of the number of starting pure states to the number of final magic states is nonzero, even asymptotically.
The generality of the relative entropy distance is both a strength and a weakness. It offers powerful insight into the similarities between magic theory and other resource theories. However, by the same token it can tell us little about the unique features of magic theory. Moreover, the practical relevance of this monotone is specific to the context of reversible interconversion of magic states in the asymptotic regime of infinite resources. In the context of magic state computation, we are most interested in the oneway distillation of magic states using finite resources. This leads us to expect that the relative entropy of magic and its regularization may offer limited practical insight for the problem of magic state distillation. There is an even more discouraging problem with this measure: like the relative entropy of entanglement, it appears to be prohibitively computationally difficult to compute the relative entropy of magic. Moreover, we do not even have a guaranteed algorithm to find the value of the regularized relative entropy of magic. Thus this monotone is useful for the holistic study of the resource theory of magic but is of little use for giving concrete bounds on achievable rates of distillation.
In IV we introduce a computable measure of the magic of a quantum state: the mana. This monotone is inspired by the usefulness of the discrete Wigner functionGross2006Hudsons (); GrossPrimeDimWignerFunction (); Wootters1987_discrete_wig_function () in previous work showing the existence of bound magic statesveitch2012BoundMagicNJP (). We will restrict attention to qudits of odd prime dimension, as in the previous work. There it was shown that negative Wigner representation is a necessary condition for a magic state to be useful for distillation protocols. It is natural to wonder if this purely binary negative vs. positive condition could be extended to a quantitative measure of magic. We show that this is possible by proving that the sum of the negative entries of the Wigner representation of a state is a magic monotone, . This monotone is intuitively appealing, but it still has a nonadditive composition law. To recover additivity we define a closely related quantity, the mana , for which it follows that . Since it is easy to explicitly find the Wigner representation of an arbitrary quantum state it is also easy to compute the mana and find explicit bounds on the efficiency of magic state distillation; to distill copies of a target state from copies of a resource state at least copies are required on average. As an application we compute the mana efficiencies of the distillation protocols studied in AnwarQutritMSD (); Campbell_bound_magic_states (). Our monotone suggests the possibility of protocols offering dramatic improvements in efficiency. Additionally, we provide a detailed characterization of the mana for the qutrit state space, which includes identifying two distinct states with maximal mana.
Ii Background and Definitions
ii.1 Stabilizer Formalism
The stabilizer formalism is critical for the results of the present paper. Here we will give a very brief overview of the elements of the theory we require. For an overview of the stabilizer formalism in the context of fault tolerance see Gottesman1997Stabilizer (); GottesmanIntroErrorCorr (). For an overview of the phase space techniques for the stabilizer formalism see Gross2006Hudsons (); Gross2007Evenly (). Reference veitch2012BoundMagicNJP () gives an overview of the particular mathematical elements that will be important for the present paper.
We begin by defining the generalized Pauli operators for prime dimension and we will build up the formalism from these. Let be a prime number and define the boost and shift operators:
From these we can define the generalized Pauli (HeisenbergWeyl) operators in prime dimension:
where are the integers modulo . Note that a slightly different definition is required for qubits. For a system with composite Hilbert space , the HeisenbergWeyl operators may be written as:
The Clifford operators are the unitaries that, up to a phase, take the HeisenbergWeyl operators to themselves, i.e.,
The set of such operators form a group — this is the Clifford group for dimension . The pure stabilizer states for dimension are defined as
and we take the full set of stabilizer states to be the convex hull of this set:
where is some probability distribution.
We define stabilizer operations to be any combination of computational basis preparation, computational basis measurement, and Clifford rotations. In particular, this includes all stabilizer state preparations and measurements. This set of operations defines the "stabilizer subtheory", which is a convex subtheory of the full set of allowed quantum operations on a finitedimensional system. The only stabilizer measurement we consider directly is measurement in the computational basis. The other measurements in the stabilizer subtheory can be generated, in the usual Heisenberg picture, by conjugation under Clifford rotations.
ii.2 Wigner Functions
In IV, we will need the discrete Wigner functionGross2006Hudsons (); Wootters1987_discrete_wig_function (), which is defined for quantum systems with finite, odd Hilbert space dimension. The discrete Wigner function is a direct analog of the usual infinitedimensional Wigner functionWigner1932On (). The idea of such representation is to attempt to map quantum theory (states, transformations, and measurements) onto a classical probability theory over a phase space, which can be any continuous or discrete set. In any such representation some quantum states and measurements must be mapped to distributions with negative entriesFerrie2008Frame (); Ferrie2010Necessity (), i.e., negative “quasiprobabilities” are unavoidable. The discrete Wigner representation for odd dimensions enjoys the special property that all stabilizer operations can be represented nonnegatively, so the Wigner representation gives a classical probability model for the full stabilizer subtheory.
The discrete Wigner representation of a state is a quasiprobability distribution over , which can be thought of as a by grid (see 4 in IV). The mapping assigning quantum states to Wigner functions is given by
where are the phase space point operators. These are defined in terms of the HeisenbergWeyl operators as,
These operators are Hermitian so the discrete Wigner representation is realvalued. There are such operators for dimensional Hilbert space, corresponding to the points of discrete phase space.
A quantum measurement with POVM is represented by assigning conditional (quasi) probability functions over the phase space to each measurement outcome,
In the case where , this can be interpreted classically as an indicator function or “fuzzy measurement” associated with the probability of getting outcome given that the “physical state” of the system is at phase space point , .
We say a state has positive representation if and negative representation otherwise. We will say a measurement with POVM has positive representation if and negative representation otherwise. We are now ready to state a few salient facts about the discrete Wigner representationGross2006Hudsons (); Gibbons2004Discrete ():

(Discrete Hudson’s theorem) A pure state has positive representation if and only if it is a stabilizer state. Since convex combinations of positively represented states also have positive representation this means, in particular, for any stabilizer state it holds that .

Clifford unitaries act as permutations of phase space. This means that if is a Clifford then
for each point . Only a small subset of the possible permutations of phase space correspond to Clifford operations (namely, the symplectic onesGross2006Hudsons ()).

The trace inner product is given as .

The phase space point operators in dimension are tensor products of copies of the dimension phase space point operators, eg. .

The phase point operators satisfy . This implies for a Hermitian operator .

.
This is all we need to know about the discrete Wigner function for the present work. For a much more detailed overview see GrossPrimeDimWignerFunction (); Gross2006Hudsons () or for a moderately more detailed overview see veitch2012BoundMagicNJP ().
ii.3 Magic Monotones
In this paper we are concerned with the transformation of nonstabilizer states using stabilizer operations. In the same way that a state is defined to be entangled if it is not separable we define:
Definition 1.
A state is magic if it is not a stabilizer state.
The most general kind of stabilizer operation possible is of the following type:
Definition 2.
A stabilizer protocol is any map from to composed from the following operations:

Clifford unitaries,

Composition with stabilizer states, where is a stabilizer state

Computational basis measurement on the final qudit, with probability

Partial trace of the final qudit,

The above quantum operations conditioned on the outcomes of measurements or classical randomness
Stabilizer protocols encompass magic state distillation protocols as an important special case. For a function to be a valid measure of magic, i.e., a monotone, it must be nonincreasing under stabilizer operations, a requirement that can be formalized as:
Definition 3.
For each , let be a mapping from the set of density operators on to the real numbers. Define (for the appropriate ) so that is defined for all finitedimensional Hilbert spaces. If, on average, for any stabilizer protocol then we say is a magic monotone.
There are two important points to notice here. The first is that one need only require operations to not increase magic on average; if then we only require . In particular this means that post selected measurement can increase magic in the sense that we allow as long as measurement outcome is obtained with sufficiently small probability. This allows us to analyze nondeterministic protocols. The second point is that we do not require convexity, i.e., it can happen that . Although convexity is a desirable feature it is possible to have interesting and useful monotones that are not convex (for example, the logarithmic entanglement negativityPlenioLogarithmicNegativity ()).
Convexity constrains the behavior of the monotone on all mixtures of density matrices. The definition of a magic monotone only requires that the measure be nonincreasing on mixtures which are formed via stabilizer operations, and only nonincreasing relative to the starting states. For instance, we might form a mixture by beginning with the state and discarding the second state with probability and the first state with probability . A magic monotone must have the property that
whereas convexity requires that
Even if is additive (i.e., ), the latter equation is a stronger constraint.
Notice also that because Clifford gates and composition with stabilizer states are reversible within the stabilizer formalism (by the inverse gate and the partial trace respectively) any monotone must actually be invariant under these operations, as opposed to merely nonincreasing.
Iii Relative Entropy of Magic
Generic resource theories can, and usually do, admit more than one valid choice of monotone. Requiring a function to be nonincreasing under stabilizer operations is the minimal imposition for it to be a sensible measure of magic. However, there is no guarantee that all monotones will be equally interesting or useful. This leads us to wonder if some further natural conditions could be imposed to eliminate some of these measures and pick out especially interesting monotones. Resource theories are concerned with the problem of using restricted operations to convert between different types of resource states, for example distilling pure magic states from mixed ones or changing one type of pure magic state to another type of pure magic state. Most often this conversion is studied in the asymptotic regime (eg. Gour_rel_entropy_of_frameness (); Horodecki2012ResourceTheories (); Horodecki_Entang_Thermo (); HorodeckiPurityTheory (); GourSpekkensAsymmetryRT ()) where an infinite number of resource states are assumed to be available to conversion protocols and the task is to determine the rate at which one type of resource can be converted into another. In this regime it turns out that for many resource theories the monotone zoo can be cut down in a rather spectacular fashion: there is a monotone that uniquely specifies the rate at which the asymptotic interconversion of resource states can take place. Because of the importance of asymptotic interconversion of resource states this measure is often called the unique measure of the resourceHorodecki2012ResourceTheories (). For magic theory the analogous quantity is the regularized relative entropy of magic. The purpose of this section is to introduce this quantity; however, for magic theory it is not unique.
The relative entropy distance between quantum states is . This is a measure of how distinguishable is from . Qualitatively, we might expect a measure of how distinguishable is from all stabilizer states to be a good measure of magic. This inspires the definition:
Definition 4.
Let . Then the relative entropy of magic is .
The intuition that this should be a magic measure is immediately validated:
Theorem 5.
The relative entropy of magic is a magic monotone.
Proof.
This is essentially a consequence of the nice properties of the relative entropy and holds for the same reasons that the relative entropy is a monotone for other resources theories. See A for details. ∎
The main importance of the relative entropy of magic is in the asymptotic regime. This is because the relative entropy of magic is subadditive in the sense . This follows from the fact that in general there can be some entangled stabilizer state such that . In particular this means that the amount of magic added from adding an extra copy of depends on how many copies of we already have. In the asymptotic limit an appropriate measure should give the amount of magic in when an infinite number of copies of are available. This prompts us to introduce the asymptotic variant of the relative entropy measure:
Definition 6.
Let . Then the regularized relative entropy of magic is .
We do not have an analytic expression for the relative entropy of magic and thus we do not have an analytic expression for the asymptotic version. Moreover, because of the infinite limit in the definition we do not even know how to numerically approximate in general. This is the same as the situation in entanglement theory where it remains a famous open problem to find a “single letter” expression for the regularized relative entropy of entanglement. Nevertheless, the (regularized) relative entropy of magic is useful for the holistic study of magic theory. For instance, we will use it as a tool to show that an asymptotically nonzero amount of pure magic resource states is always required to produce bound magic states via stabilizer protocols, even though no pure magic can be extracted from the states that are produced.
iii.1 Relative entropy of magic
One of the major difficulties with the study of resource monotones is that the actual computation of the value of the monotone for a particular state is often an intractable problem. Although we do not know a simple analytic expression for the relative entropy of magic, it can be computed numerically. For systems with low Hilbert space dimension this is reasonably straightforward. The relative entropy is a convex function and we want to perform minimization over the convex set of stabilizer states. This means that a simple numerical gradient search will succeed in finding . Each qudit stabilizer state can be written as a convex combination of the pure qudit stabilizer states. A simple strategy for finding the relative entropy of magic is to do a numerical search over the values that define the probability distribution over the stabilizer states. Unfortunately, for a system of quits the number of pure stabilizer states isGross2006Hudsons ()
and this grows too quickly for a numerical search to be viable in general. For example, the original type magic state distillation protocolBravyi_magic_state_paper () consumes resource states to produce a more pure magic state . In principal we can bound the quantity of the resource required via,
where is the success probability of the protocol, but this would require a numerical optimization over more than parameters using the approach just outlined, which is not viable.
For arbitrary resource states it is not clear how to avoid the numerical optimization. However, the states typically used in magic state distillation protocols have a great deal of additional structure that can be exploited. In particular, many protocols have a “twirling” step where a random Clifford unitary is applied to the resource state to ensure it has the form,
If the twirling map is for some subset of the Clifford operators, then
where is the largest value such that is a stabilizer state. This means that the relative entropy of magic can be computed exactly for states of this form by finding . Unfortunately the twirling is only applied to individual qudits so this does not by itself resolve the numerical problems. Nevertheless, it is possible to give naive bounds according the following observation:
where we have used the obvious fact that the relative entropy of magic is subadditive.
This bound might not seem naive at all. One might suspect that the relative entropy of magic is genuinely additive so . This seems like a very desirable feature for a monotone to have: copies of a resource state should contain times as much resource as a single copy. The relative entropy of magic does not have this feature — it can be the case that . To establish this we consider the qutrit Strange state defined as the pure qutrit state invariant under the symplectic component of the Clifford group (see IV.4). Twirling by the symplectic subgroup of the Clifford group^{3}^{3}3This is the Clifford group modulo the HeisenbergWeyl (Pauli) group. has the effect
so we can use our twirling argument to find exactly. A numerical search over the two qutrit stabilizer states turns up a state such that .
Note that the relative entropy of entanglement is also subadditive. However, there is a very important difference between the entanglement and magic relative entropy measures: for pure states the relative entropy of entanglement is an additive measure. This fact is at the heart of the importance of the relative entropy distance for the theory of entanglement. As we have just seen this is not true for the relative entropy of magic.
iii.2 The (regularized) relative entropy of magic is faithful
The relative entropy is if and only if . It is easy to see that this implies that is faithful in the sense that if and only if is magic. Since is a magic monotone, if it is possible to create a magic state from a (pure) resource state using a stabilizer protocol it must be the case that . Previous work established the existence of a large class of “bound magic states”^{4}^{4}4Called bound universal states in the original paper. that can not be distilled to pure magic statesveitch2012BoundMagicNJP (). Together these facts imply that to create any magic state, including bound magic states, a nonzero amount of magic is required. This means, in general, that the amount of magic that can be distilled from a resource state is not equal to the amount of magic required to create it; this is analogous to the wellknown result in entanglement theory that the entanglement of formation is not equal to the entanglement of distillation.
Because the relative entropy of magic is subadditive it could be that for some magic state . I.e., it is not automatic that the regularized relative entropy of magic is faithful. For example, in the resource theory of asymmetryGour_rel_entropy_of_frameness (), the regularized relative entropy measure is for all states. Happily, for magic theory the relative entropy is well behaved in the asymptotic regime:
Lemma 7.
The regularized relative entropy of magic is faithful in the sense that if and only if is a stabilizer state.
Proof.
The proof of this fact is a straightforward application of a theorem of Pianipiani2009RelEntFaithful () showing that the regularized relative entropy measure is faithful for all resource theories where the set of restricted operations includes tomographically complete measurements and the partial trace. The idea is to define a variant of the relative entropy distance that quantifies the distinguishability of states using only stabilizer measurements. This quantity lower bounds the usual relative entropy of magic so by showing that its regularization is faithful we get the claimed result. See appendix A for details. ∎
We will need this result for the proof of Corollary 9 showing that the regularized relative entropy gives the optimal rate of asymptotic interconversion. It also represents a strengthening of our earlier claim that a nonzero amount of pure state magic is required to create any magic state. For finite size protocols this followed from the faithfulness of the relative entropy of magic, as just explained. The faithfulness of the regularized relative entropy implies that the creation of magic states by an asymptotic stabilizer protocol requires resource magic states to be consumed at a nonzero rate. The analogous problem in entanglement theory was the main motivation for proving that the regularized relative entropy of entanglement is faithfulBrandao2010GenQuantumStein (); piani2009RelEntFaithful ().
iii.3 Asymptotic interconversion and the regularized relative entropy
In the scenario of asymptotic state conversion, it is useful to consider an additional property that a magic measure may possess beyond those required to make it a magic monotone. To understand the additional property, it is simplest to first consider the case of finite state interconversion. Suppose there is some stabilizer protocol that maps copies of resource state to copies of a target magic state . Then it must be the case that for any magic monotone . If there is also some other stabilizer protocol that maps to then it must be the case that , which conceptually just means that if and are equivalent resources then they have the same magic according to any magic measure. It is rarely possible to exactly interconvert between resource states with only a finite number of copies available. However, it is often the case that we can get close to a reversible interconversion; that is, that conversion from copies of to approximate copies of and then back to approximate copies of loses only an asymptotically negligible number of copies of the state. Thus, we wish to study measures that satisfy the requirement that asymptotically reversibly interconvertible states have the same resource value.
Typically if we try to convert into copies of , the stabilizer protocol () we use will depend on the number of input states. When converting to it is thus necessary to consider a family of stabilizer protocols taking as input and producing approximate copies of with an error . In the case that the approximation becomes arbitrarily good in the asymptotic limit (i.e., ) we say is asymptotically convertible to at a rate . The additional condition we consider is that if is asymptotically convertible to then
(1) 
That is, if asymptotic conversion is possible then on average we must put in at least as much magic as we get out, up to some discrepancy.
If it is possible to interconvert between and at rates then we say the two resources are asymptotically reversibly interconvertible. Any magic monotone satisfying the additional condition (1) gives the rate of asymptotic interconversion according to the following theorem:
Theorem 8.
Let be a magic monotone satisfying the condition given by (LABEL:asympt_condition) and define its asymptotic variant . Then if it is possible to asymptotically reversibly interconvert between magic states and and is nonzero the rate of conversion is given by .
Proof.
This is a special case of broader theorem that says this result holds in any resource theory. The result was first proved in Horodecki_Entang_Thermo (). That paper dealt primarily with entanglement and missed the requirement that the regularization of the monotone needs to be nonzero. This was pointed out in Gour_rel_entropy_of_frameness (), and the theorem we state here is essentially the application of their Theorem 4 to magic theory. The only subtlety is that instead of the condition in (LABEL:asympt_condition) they require the monotone to be asymptotically continuous, which means implies
The first step of their proof is to show that this condition implies (LABEL:asympt_condition) so we prefer to start with the weaker requirement directly.∎
Corollary 9.
If it is possible to asymptotically reversibly interconvert between magic states and , the rate at which this can be done is , where is the regularized relative entropy.
Proof.
In SynakRadtke2006AsymptoticContinuity () it is shown that the relative entropy distance to any convex set of quantum states is asymptotically continuous. Since asymptotic continuity implies (LABEL:asympt_condition) and the stabilizer states are a convex set, the relative entropy of magic is a magic monotone satisfying condition (LABEL:asympt_condition). Moreover, we showed in \lemreffaithful that the regularized relative entropy is nonzero for all magic states. ∎
Notice that the relative entropy is only one example of a monotone satisfying the conditions of 8. There could be other monotones for which this result holds. In fact it is conceivable that this result holds for every magic monotone. For any magic monotone with this property, if it possible to asymptotically interconvert between and , it must be the case that so . I.e., the regularization of such magic measures can differ only up to a multiplicative factor that can vary between sets of quantum states where asymptotic interconversion is possible.
If we have a resource measure that is additive then it will be equal to its own regularization, . If this measure also satisfies (LABEL:asympt_condition) then it will tell us how to compute the asymptotic interconversion rate whenever asymptotic interconversion is possible. In the particular case that we have a resource theory where asymptotic interconversion is possible between any two resource states then it is easy to see that up to a constant factor there really is a single unique measure of the resource. For instance, this is true of bipartite pure entangled states, and the entanglement entropyBennettConcentratingEntanglementRT1 () is an additive measure that satisfies our condition. Thus the entanglement entropy is the genuinely unique measure of pure state bipartite entanglement. One of the special features of the relative entropy of entanglement is that it reduces to the entanglement entropy on pure states. It is this feature which is ultimately responsible for the privileged status of the relative entropy of entanglement. In the case of magic theory the relative entropy of magic does not reduce to an additive measure on pure states so there is no apparent reason to prefer the relative entropy of magic over any other monotone satisfying the conditions of 8. This stands in contrast to the claim that the relative entropy distance to the set of free states is the unique measure of the resource (eg. Horodecki2012ResourceTheories ()).
iii.4 Discussion
The privileged status of the relative entropy magic comes from its role in the asymptotic regime. Since the assumption of infinite state preparations is unreasonable for an actual physical system one might expect that the measure would be of limited practical value. This suspicion is lent additional weight by the fact that, like the regularized relative entropy distance in other resource theories, it is not known how to compute in general. The regularized relative entropy distance is essentially useless for analyzing the performance of particular distillation protocols. Nevertheless, the monotone is a useful tool for the holistic study of the resource theory of magic. This is the role of the regularized relative entropy distance in the theory of entanglement, where it is a well studied object. We had a taste of this already in our demonstration that the amount of pure state magic required to create a magic state does not equal the amount of pure state magic that can be distilled from that state. It is an exciting direction for future work to see what other insights can be gleaned from the relative entropy of magic and its asymptotic variant.
It is also important to understand exactly what corollary 9 says. The statement is that if asymptotic interconversion is possible then the rate is given by . This “if clause” is a deceptively strong requirement: it is not guaranteed that asymptotic interconversion will always be possible, or even that it will ever be possible. In particular, every currently known magic state distillation protocol has rate and it is an important open problem to determine if a positive rate distillation protocol exists.
Iv A Computable Measure of Magic
The results of the previous section deal primarily with reversible conversion of magic states in the limit where infinite copies are available, but for magic state distillation we are interested in the one way distillation of resource magic states to pure target magic states in the regime where only a finite number of resource states are available. Because of this, there is no reason to prefer the (regularized) relative entropy of magic over any other monotone. Nevertheless, the relative entropy, like any monotone, gives nontrivial bounds on distillation efficiency. But there is a more fundamental problem: it is generally computationally hard to compute the relative entropy, and we have no idea how to compute the regularized relative entropy so we are unable to find explicit upper bounds to distillation. In this section we address this issue by introducing a computable measure of magic.
iv.1 Sum negativity and mana
Previous work establishing the existence of bound magic statesveitch2012BoundMagicNJP () provides a starting place in the search for a computable monotone. The fundamental tool in that construction is the discrete Wigner function. There it was found that a necessary condition for a magic state to be distillable is that it have negative Wigner representation. However, that work is purely binary in the sense that it does not distinguish degrees of negative representation. It is natural to suspect that a state that is “nearly” positively represented is less magic than a state with a large amount of negativity in its representation. Here we formalize this intuition by showing that the absolute value of the sum of the negative entries of the discrete Wigner representation of a quantum state is a magic monotone.
Definition 10.
The sum negativity of a state is the sum of the negative elements of the Wigner function, .
The right hand side of this expression follows because the normalization of quantum states () implies . The advantage of writing the expression in this form is that is a multiplicative norm and is thus very nice to work with. By this we mean that the composition law is given as:
(2)  
Since the sum negativity is a linear function of this quantity we can establish that the former is a magic monotone by showing this for the latter:
Theorem 11.
The sum negativity is a magic monotone.
Proof.
The sum negativity is an intuitively appealing way of using the Wigner function to define a magic monotone, but it has some irritating features. The worst of these is the composition law,
which has the troubling feature that a linear increase in the number of resource states implies an exponential increase the amount of resource according to the measure. Happily there is a simple resolution to this problem suggested by the composition law, (LABEL:wignorm_composition). We define a new monotone by a particular function of the sum negativity:
Definition 12.
The mana of a quantum state is .
Theorem 13.
The mana is a magic monotone.
Proof.
Most of the monotone requirements follow because log is a monotonic function, but there is a small subtlety here. Consider a stabilizer protocol that sends with probability (e.g., postselected computational basis measurement). Then we require . This need not be true for arbitrary monotonic functions of but it is easy to see that it follows from the concavity of and . ∎
From (LABEL:wignorm_composition) this monotone is additive in the sense
Beyond its intuitive appeal, additivity is a nice feature for a monotone to have because it makes the bound on distillation efficiency take an especially nice form. How many copies of a resource magic state are required to distill copies of a resource magic state ? Suppose we have a stabilizer protocol , then the monotone condition combined with additivity shows:
Taking and , the above discussion lets us see:
Theorem 14.
Suppose is a stabilizer protocol that consumes resource states to produce copies of target state , succeeding probabilistically. Any such protocol requires at least copies of on average.
Proof.
Suppose . The fact that the mana is an additive magic monotone implies:
Letting be the number of times we must run the protocol to get a success we have and,
from which it follows that . ∎
We can only bound the average number of copies required because the monotone is only nonincreasing on average under stabilizer operations — it might increase conditionally on a specific measurement outcome.
The most common case for magic state distillation is nested distillation protocols, which a little thought will show are covered by the bound as a special case. Indeed, this bound covers a broader set of protocols than it might first appear. One might have expected to do better by “recycling” the output states of the failed protocols. For instance, if
then one expects to reduce the overhead of the total number of copies required by introducing a second stabilizer protocol:
However, by just combining the two steps we have a new protocol and our theorem applies.
Computing the mana of a quantum state is straightforward: we find the Wigner function by taking the trace of with the phase space point operators and compute the mana directly. This means that the mana provides a simple way to numerically upper bound the efficiency of distillation protocols, fulfilling the major promise of this section.
iv.2 Uniqueness of sum negativity
Quantifying the magic of a state by the negativity in its Wigner representation is an intuitively appealing idea, but it is not clear that the sum of the negative elements is the best way to do this. For example, we might have instead looked at the maximally negative element of the Wigner function, . It is not immediately obvious that the sum negativity is a better way to quantify the magic of a quantum state than the maximal negativity just defined. However, it turns out that the maximal negativity is not a magic monotone, so it is not a useful measure of resources for stabilizer computation. In fact, we will now show that any magic monotone that is determined solely by the values of the negative entries of the Wigner function (and in particular not by the positions in phase space of the negative entries) can be written as a function of only the sum negativity.
The reason that the maximally negative entry is not a magic monotone is that it is not invariant under composition with stabilizer states. Suppose we have some resource state and we compose it with the maximally mixed state on a qudit . Then . Therefore, this function can decrease under composition with stabilizer states, and thus can increase under partial trace: it is a poor measure of the amount of resource in . The natural requirement that magic monotones must be invariant under composition with arbitrary stabilizer states is an extremely strong one; it forms the backbone of our proof of the uniqueness of the sum negativity.
Theorem 15.
Assume is a function on quantum states that satisfies the following conditions: 1. is a magic monotone, 2. is determined only by the negative values of the Wigner function, and 3. is invariant under arbitrary permutations of discrete phase space (that is, even under permutations that do not correspond to quantum transformations). Then may be written as a function of only .
Proof.
Consider two quantum states and that have Wigner representations with different negative entries but . The idea is to construct stabilizer ancilla states and such that and have the same negative Wigner function entries. In this case conditions 2 and 3 imply and since magic monotones are invariant under composition with stabilizer states this means , ie. is entirely determined by the sum negativity. For details see appendix B.1. ∎
For our proof of 15 to succeed it is critical that the value of the monotone does not depend on the locations of the negative entries. All magic monotones must be invariant under Clifford unitaries, , and these operations correspond to permutations of the phase space. Thus the monotone condition already implies invariance under a subset of possible permutations (namely those that preserve the symplectic inner product). However, we require invariance under arbitrary permutations and there is no compelling reason to expect magic monotones to have this feature in general. It is not clear whether this additional assumption was really necessary; it was introduced because actually working with only the symplectic transformations is extremely challenging. It remains an interesting open problem to either prove uniqueness without this assumption or else give a counterexample in the form of a magic monotone that is determined by just the negative entries of the Wigner representation and does depend on their position. Even if the latter resolution is the case, 15 is useful because it at least shows that sum negativity is the unique “simple” monotone, in the sense that computing its magnitude does not depend on the detailed symplectic structure of phase space. As simplicity of computation is our primary motivation for the study of Wigner function monotones, this is a significant advantage.
In III we showed that (the regularization of) any monotone satisfying a certain natural asymptotic condition uniquely specifies the rate at which asymptotic interconversion of resource states is possible. Since the mana is additive, it is clearly equal to its own regularization. Thus if it satisfied the condition given by (LABEL:asympt_condition) we would be able to compute the conversion rates explicitly. Typically it is usually a stronger property that is demanded: asymptotic continuity of the monotone. In appendix B.2 we show that the mana is not asymptotically continuous. However, our counterexample leaves open the possibility that the weaker condition actually required by the theorem holds. It would be very exciting to either prove or disprove this.
iv.3 Numerical Analysis of Magic State Distillation Protocols
To illustrate the use of mana in the evaluation of magic state distillation protocols we have computed the input and output mana of single steps of several (qudit) magic distillation protocols from the literature over a large parameter range. Figures 1 and 2 present qutrit codes from AnwarQutritMSD () and CampbellMSDAllPrimeDim () respectively. Figure 3 presents a ququint () code from CampbellMSDAllPrimeDim (). Notice that none of the protocols come close to meeting the mana bound, which is illustrated as a red line in all three figures.
iv.4 The Qutrit Case
It’s interesting to compute the qutrit states with maximal sum negativity. Since
it is easy to see that the states with maximal sum negativity must be eigenstates of operators where is some subset of the discrete phase space. An exhaustive search over such subsets reveals two classes of maximally sum negative states.

The Strange states defined to be those with 1 negative Wigner function entry equal to . There are such states, e.g.

The Norrell states defined to be those with 2 negative Wigner function entries equal to . There are such states, e.g.
The maximum value is . An example of each type of state is given in 4.
Geometrically each Strange state lies outside a single face of the Wigner simplex and each Norrell state lies outside the intersection of two faces, analogous to the qubit Ttype (outside a face) and Htype (outside an edge) states. This analogy is further strengthened since the Norrell states are also the generalized Htype states of HowardQuditPiOver8 () and AnwarQutritMSD ().
Note that the states with maximal resource value do not need to agree between monotones. In particular,
Of course this still leaves open the possibility that .
iv.5 Wherefore the discrete Wigner function?
Our main motivation for studying the mana is that it can be computed explicitly to give concrete bounds on the rate at which magic states can be converted. However, one might suspect that this bound, although nontrivial, is rather arbitrary. For example, it is not clear a priori if the bound given by 14 can ever be saturated, or under what circumstances this might occur. The mana arose very naturally from the negativity of the discrete Wigner function, but it is not immediately clear that the Wigner negativity is the relevant tool for the study of magic theory. However, a number of recent results show that the negativity of the discrete Wigner representation is extremely well motivated in this context. For example, could we have started with some other notion of quasiprobability representation Ferrie2008Frame () and defined a monotone from that? Recent work HowardContextualityandComputation () has shown (at least for small prime dimension) that this is not the case by connecting the onset of negativity in the DWF with the onset of a noncontextuality violation. This means that the subtheory of quantum theory consisting of elements with positive discrete Wigner representation is a maximal classical subtheory in the sense of nonclassicality given by contextuality. That is, the set of states with positive discrete Wigner representation is the largest possible subtheory of quantum theory that includes the stabilizer measurements and admits a noncontextual hidden variable theory. In particular this means that any other choice of quasiprobability representation (that represents the stabilizer subtheory nonnegatively) would have a positively represented region that is strictly contained within the discrete Wigner function we use here.
For the purposes of magic state distillation we are more interested in the notion of nonclassicality given by universal quantum computation. The results of veitch2012BoundMagicNJP (); Mari2013_pos_wig_efficient_sim () show that there is an intimate connection: the hidden variable model afforded by the discrete Wigner function leads naturally to an efficient classical simulation scheme for quantum circuits with positive Wigner representation. It is not known if access to any negatively represented state suffices to promote stabilizer computation to universal quantum computation, but it is at least apparent that the known classical simulation protocols cannot be extended to deal with this case. In the context of magic state computation it is desirable for the magic measures to give an indication of how useful a state is for quantum computation. In this sense, the fact that the mana is not a faithful monotone is a feature rather than a bug — it picks specifically the set of quantum states that do not admit an efficient simulation scheme under stabilizer operations.
Although the mana is essentially the unique symmetric monotone arising from the negativity of the Wigner function, it is not the only choice of monotone arising from the Wigner function. In particular, one very natural choice is the relative entropy distance to the set of states with positive Wigner representation, . It is easy to check that all of the results of III go through for this new monotone, subject to obvious modifications in the statement of the theorems.
iv.6 Discussion
The major inspiration for the monotones of this section was earlier work showing that states with positive Wigner representation cannot be distilled by stabilizer protocols. In the theory of entanglement it is known that states with positive partial transpose (ppt) cannot be distilled by LOCC protocols HorodeckMafiaBoundEnt (), and this inspired the introduction of the entanglement negativity , a measure of the violation of the ppt condition, as a measure of entanglement VidalWernerComputableEntanglement (). As with the sum negativity, the major advantage of this measure is that it is computable, allowing for explicit upper bounds on the efficiency of entanglement distillation. The entanglement negativity grows exponentially in the number of resource states, prompting the definition of an additive variant — exactly as in the present case. Like the mana this measure has the strange features that it is neither convex nor asymptotically continuous.^{5}^{5}5In fact it is now known that these two features are closely related PlenioLogarithmicNegativity (). The close analogy we have uncovered suggests that it may be possible to adapt much of the work on entanglement negativity to the magic case: this is an interesting direction for future work.
There is at least one way in which the sum negativity is better behaved than the entanglement negativity. All separable states are local, but this does not mean that all entangled states are nonlocal in the sense that they enable violation of a Bell inequality. In PeresPPTNonLocConjecture () Peres conjectured that any ppt state should admit a local hidden variable model; proving or disproving this conjecture is one of the major outstanding problems in the study of entanglement. In our case the equivalent conjecture would be that any state with positive Wigner representation admits a noncontextual hidden variable model. But in our case the answer is obvious: the Wigner itself is this noncontextual hidden variable theory! Moreover, as noted above, recent work HowardContextualityandComputation () has shown (at least for small prime dimension) that magic states admit such a model only if they have positive Wigner representation. The direct resolution of this question (which has proven difficult to solve for other resource theories) is a consequence of our use of the Wigner function (quasiprobability) technology. However, the quasiprobability techniques used in this section have no known analogue in other resource theories. The possibility of exporting this technology to the study of other resource theories, in particular entanglement theory, is a fascinating and promising direction for future work.
A closely related problem is to determine a qubit analogue for the mana. Because it is possible to violate a contextuality inequality (eg. a GHZ inequality) using qubit stabilizers, there can be no qubit analogue for the discrete Wigner function (see also Wallman2012QubitQuasiProb ()). This is because the discrete Wigner function is a noncontextual hidden variable theory. Nevertheless, it may be possible to find a computable monotone of a similar flavour.
V Discussion
In this paper we have introduced the resource theory of magic, showing how the tools of resource theories can be applied to study the extra resources required to promote stabilizer computation to universal quantum computation. In particular, we have introduced the concept of magic monotone and given two examples: the relative entropy of magic and the mana.
The relative entropy of magic and its asymptotic variant are useful tools for the holistic study of magic theory. In particular, we saw that (even asymptotically) to create any magic state by consuming pure magic states via stabilizer operations a nonzero amount of pure magic states are required. This established, in conjunction with the results of veitch2012BoundMagicNJP (), that generally the amount of magic that can be extracted from a magic state is not equal to the amount required to create it: the magic of creation does not equal the magic of distillation. The main motivation for studying the relative entropy of magic was that its asymptotic regularization gives the correct rate for asymptotic interconversion of magic states. However, as we saw, this is not a special feature of the relative entropy of magic but a (potentially) common feature among magic monotones. This is promising because the relative entropy of magic has some serious drawbacks. Foremost among these are the lack of a closed form expression and the fact that it is a subadditive monotone, even for pure magic states. The combination of these two irritants implies that computing the relative entropy of magic generally requires a numerical search that is computationally infeasible.
To address this shortcoming we introduced the mana, a computable monotone. We have shown this monotone has the appealing feature that it is additive, . As a consequence, we may give explicit lower bounds on the number of resource states required to produce copies of a resource state . This is an explicit, absolute upper bound on the efficiency of magic state distillation protocols. This monotone is in some sense the unique measure of magic arising from the negativity of the discrete Wigner function. Since the discrete Wigner function itself is essentially the unique maximal classical representation for the stabilizer formalism HowardContextualityandComputation (), there is some reason to believe that the mana has some privileged status among all possible monotones. Determining if and how this intuition can be formalized is a very important open problem.
There are a number of directions for future work, many of which have already been discussed in the main body of the text. Other resource theories admit a wealth of monotones. This is especially true in the theory of entanglement where a large number of entanglement measures have been developed to solve specialized problems. One obvious direction for future work is the creation of additional magic monotones to address particular problems in magic resource theory. It is also important to develop the parts of the resource theory that are not encapsulated by magic monotones. For example, analogues of entanglement catalysis and activation are discussed in Campbell_magic_state_catalysis (). The most urgent outstanding problem of this type is to find a criterion for determining if it is possible to (asymptotically) reversibly convert between particular resource states using stabilizer operations. Concretely, it is always possible to use LOCC to reversibly convert pure bipartite entangled states but this is not true for tripartite entanglement; we would like to know which situation holds for magic theory. Even a partial result of this type would be very powerful, offering deep insight into the structure of stabilizer protocols.
Much of this paper has been dedicated to showing that much of the technology from other resource theories can be imported to the resource theory of magic. It is very interesting to ask if we can go in the other direction and export the insights of magic theory to the study of generic resource theories and quantum theory broadly. One obvious extension of this type is to the setting of linear optics, which is the infinite dimensional analogue of the stabilizer formalism. Some progress on this front has already been made: it has been shown that linear optics operations acting on states with positive Wigner function, which includes nonGaussian states, is efficiently classically simulableVeitchEtAl_LinOpticsWigSimulation (); Mari2013_pos_wig_efficient_sim (). We should also mention Kenfack2004Negativity () which examined the volume of the negative region of the infinitedimensional Wigner function as a measure of nonclassicality but did not explore the resource theory implications.
The study of entanglement theory offers powerful insights into the power of quantum communication protocols. This is because of the close relationship between LOCC and quantum communication. Similarly, there is a close relationship between stabilizers and quantum computation beyond the application of stabilizer codes to faulttolerant quantum computation. The stabilizer operations are a maximal subset of efficiently simulable quantum operations in the sense that the addition of any pure nonstabilizer resource promotes stabilizer computation to universal quantum computationCampbellMSDAllPrimeDim (). This suggests that the usefulness of the tools developed here may extend beyond the study of magic state computation to give insights into the origins of quantum computational speedup.
Acknowledgements.
We thank Marco Piani, Chris Ferrie, Robert Spekkens and Earl Campbell for helpful comments and discussions. The authors acknowledge financial support from CIFAR, USARODTO, and the Government of Canada through NSERC. Research at Perimeter Institute is supported by the Government of Canada through Industry Canada and by the Province of Ontario through the Ministry of Research and Innovation.References
 [1] Hussain Anwar, Earl T Campbell, and Dan E Browne. Qutrit magic state distillation. New Journal of Physics, 14(6):063006, 2012.
 [2] Charles H. Bennett, Herbert J. Bernstein, Sandu Popescu, and Benjamin Schumacher. Concentrating partial entanglement by local operations. Phys. Rev. A, 53:2046–2052, Apr 1996.
 [3] Charles H. Bennett, Gilles Brassard, Sandu Popescu, Benjamin Schumacher, John A. Smolin, and William K. Wootters. Purification of noisy entanglement and faithful teleportation via noisy channels. Phys. Rev. Lett., 76:722–725, Jan 1996.
 [4] Fernando G.S.L. Brandao and Martin B. Plenio. A generalization of quantum stein’s lemma. Communications in Mathematical Physics, 295:791–828, 2010.
 [5] Sergey Bravyi and Jeongwan Haah. Magicstate distillation with low overhead. Phys. Rev. A, 86:052329, Nov 2012.
 [6] Sergey Bravyi and Alexei Kitaev. Universal quantum computation with ideal clifford gates and noisy ancillas. Phys. Rev. A, 71:022316, Feb 2005.
 [7] Earl T. Campbell. Catalysis and activation of magic states in faulttolerant architectures. Phys. Rev. A, 83:032317, Mar 2011.
 [8] Earl T. Campbell, Hussain Anwar, and Dan E. Browne. Magicstate distillation in all prime dimensions using quantum reedmuller codes. Phys. Rev. X, 2:041021, Dec 2012.
 [9] Earl T. Campbell and Dan E. Browne. Bound states for magic state distillation in faulttolerant quantum computation. Phys. Rev. Lett., 104:030503, Jan 2010.
 [10] Bryan Eastin. Distilling onequbit magic states into toffoli states. Phys. Rev. A, 87:032321, Mar 2013.
 [11] Bryan Eastin and Emanuel Knill. Restrictions on Transversal Encoded Quantum Gate Sets. Physical Review Letters, 102:110502+, March 2009.
 [12] Christopher Ferrie and Joseph Emerson. Frame representations of quantum mechanics and the necessity of negativity in quasiprobability representations. Journal of Physics A: Mathematical and Theoretical, 41(35):352001+, 2008.
 [13] Christopher Ferrie, Ryan Morris, and Joseph Emerson. Necessity of negativity in quantum theory. Phys. Rev. A, 82:044103, 2010.
 [14] Austin G. Fowler, Matteo Mariantoni, John M. Martinis, and Andrew N. Cleland. Surface codes: Towards practical largescale quantum computation. Phys. Rev. A, 86:032324, Sep 2012.
 [15] Kathleen S. Gibbons, Matthew J. Hoffman, and William K. Wootters. Discrete phase space based on finite fields. Physical Review A, 70(6):062101+, December 2004.
 [16] Daniel Gottesman. Stabilizer Codes and Quantum Error Correction. PhD thesis, California Institute of Technology, 1997.
 [17] Daniel Gottesman. The heisenberg representation of quantum computers. arXiv:quantph/987006, 1998.
 [18] Daniel Gottesman. An introduction to quantum error correction and faulttolerant quantum computation. In Quantum Information Science and Its Contributions to Mathematics. 2009.
 [19] Daniel Gottesman and Isaac Chuang. Demonstrating the viability of universal quantum computation using teleportation and singlequbit operations. Nature, 402:390–393, 1999.
 [20] Gilad Gour, Iman Marvian, and Robert W. Spekkens. Measuring the quality of a quantum reference frame: The relative entropy of frameness. Phys. Rev. A, 80:012307, Jul 2009.
 [21] Gilad Gour and Robert W Spekkens. The resource theory of quantum reference frames: manipulations and monotones. New Journal of Physics, 10(3):033023, 2008.
 [22] D. Gross. Hudson’s theorem for finitedimensional quantum systems. Journal of Mathematical Physics, 47(12):122107+, 2006.
 [23] D. Gross. Nonnegative wigner functions in prime dimensions. Applied Physics B, 86(3):367–370, 2007.
 [24] D. Gross, K. Audenaert, and J. Eisert. Evenly distributed unitaries: On the structure of unitary designs. Journal of Mathematical Physics, 48(5):052104+, 2007.
 [25] Michał Horodecki, Paweł Horodecki, and Ryszard Horodecki. Mixedstate entanglement and distillation: Is there a “bound” entanglement in nature? Phys. Rev. Lett., 80:5239–5242, Jun 1998.
 [26] Michał Horodecki, Paweł Horodecki, and Jonathan Oppenheim. Reversible transformations from pure to mixed states and the unique measure of information. Phys. Rev. A, 67:062104, Jun 2003.
 [27] Michal Horodecki and Jonathan Oppenheim. (quantumness in the context of) resource theories. International Journal of Modern Physics B, 27(01n03):1345019, 2013.
 [28] Michał Horodecki, Jonathan Oppenheim, and Ryszard Horodecki. Are the laws of entanglement theory thermodynamical? Phys. Rev. Lett., 89:240403, Nov 2002.
 [29] Ryszard Horodecki, Paweł Horodecki, Michał Horodecki, and Karol Horodecki. Quantum entanglement. Rev. Mod. Phys., 81:865–942, Jun 2009.
 [30] Mark Howard and Jiri Vala. Qudit versions of the qubit gate. Phys. Rev. A, 86:022316, Aug 2012.
 [31] Mark Howard, Victor Veitch, and Joseph Emerson. Negativity, contextuality and universal quantum computation. In Preparation.
 [32] Cody Jones. Distillation protocols for Fourier states in quantum computing. arXiv:1303.3066, 2013.
 [33] Anatole Kenfack and Karol Życzkowski. Negativity of the wigner function as an indicator of nonclassicality. Journal of Optics B: Quantum and Semiclassical Optics, 6(10):396, 2004.
 [34] Elliott H. Lieb and Mary Beth Ruskai. A fundamental property of quantummechanical entropy. Phys. Rev. Lett., 30:434–436, Mar 1973.
 [35] A. Mari and J. Eisert. Positive wigner functions render classical simulation of quantum computation efficient. Phys. Rev. Lett., 109:230503, Dec 2012.
 [36] Adam M. Meier, Bryan Eastin, and Emanuel Knill. Distillation protocols for Fourier states in quantum computing. 2013.
 [37] Asher Peres. All the bell inequalities. Foundations of Physics, 29:589–614, 1999.
 [38] M. Piani. Relative entropy of entanglement and restricted measurements. Phys. Rev. Lett., 103:160504, Oct 2009.
 [39] M. B. Plenio. Logarithmic negativity: A full entanglement monotone that is not convex. Phys. Rev. Lett., 95:090503, Aug 2005.
 [40] B.W. Reichardt. Quantum Inf. Proc., 4:251, 2005.
 [41] B.W. Reichardt. Quantum Inf. Comput., 9:1030, 2009.
 [42] Peter Shor. Faulttolerant quantum computation. In Proc. 35th Ann. Symp. on Fundamentals of Computer Science, pages 56–65. IEEE Press, 1996.
 [43] Barbara SynakRadtke and Michal Horodecki. On asymptotic continuity of functions of quantum states. Journal of Physics A: Mathematical and General, 39(26):L423, 2006.
 [44] V. Vedral and M. B. Plenio. Entanglement measures and purification procedures. Phys. Rev. A, 57:1619–1633, Mar 1998.
 [45] Victor Veitch, Christopher Ferrie, David Gross, and Joseph Emerson. Negative quasiprobability as a resource for quantum computation. New Journal of Physics, 14(11):113011, 2012.
 [46] Victor Veitch, Nathan Wiebe, Christopher Ferrie, and Joseph Emerson. Efficient simulation scheme for a class of quantum optics experiments with nonnegative wigner representation. New Journal of Physics, 15(1):013037, 2013.
 [47] G. Vidal and R. F. Werner. Computable measure of entanglement. Phys. Rev. A, 65:032314, Feb 2002.
 [48] Joel J. Wallman and Stephen D. Bartlett. Nonnegative subtheories and quasiprobability representations of qubits. Phys. Rev. A, 85:062121, Jun 2012.
 [49] E. Wigner. On the quantum correction for thermodynamic equilibrium. Phys. Rev., 40:749–759, 1932.
 [50] William K Wootters. A wignerfunction formulation of finitestate quantum mechanics. Annals of Physics, 176(1):1 – 21, 1987.
Appendix A Proofs on the relative entropy of magic
We begin by showing that the relative entropy is a valid measure of magic.
Relative entropy of magic is a monotone
Theorem.
The relative entropy of magic is a magic monotone.
Proof.
We need to verify that this function is nonincreasing under stabilizer operations.

Invariance under Clifford unitaries: For any unitary, . If is a Clifford and is a stabilizer state then will also be a stabilizer state, ergo .

Nonincreasing on average under stabilizer measurement: Without loss of generality, we consider computational basis measurement on the final qudit. Let be the measurement POVM and label outcome probabilities as well as postmeasurement states and . In reference [44] it is shown that
Since is a stabilizer state whenever is a stabilizer state this implies measurement does not increase the relative entropy of magic on average.

Nonincreasing under partial trace: From the strong subadditivity property of the von Neumann entropy [34] we have from which the result follows immediately.

Invariance under composition with stabilizer states: for any quantum state , from which it follows . Equality follows because the relative entropy of magic is nonincreasing under the partial trace, i.e., .
∎
We now turn to the asymptotic variant of the relative entropy of magic, . We show that this quantity is nonzero if and only if is a magic state, which in particular implies that magic must be consumed at a nonzero rate to create magic states. We will also need this result for 8.
Regularized relative entropy of magic is faithful.
Theorem.
The regularized relative entropy of magic is faithful in the sense that if and only if may be written as a convex combination of stabilizer states.
Proof.
We recover this result as a special case of the main theorem of reference [38]. That paper introduces a variant of the relative entropy measure that quantifies the distinguishability of a quantum state from the set of free states using a restricted set of measurements. Let be a measurement POVM and define the map
where is any orthonormal set and is a map associated to measurement . Letting be the set of restricted measurements we can define,
The significance of this quantity is from theorem 1 of [38]:
Theorem.
Consider a restricted set of operations inducing a resource theory. Let be the restricted set of measurements (here the stabilizer measurements) and the set of free states (here the stabilizer states). If the set of free states is closed under restricted measurement and the partial trace then it holds that the regularization of the relative entropy distance to the set of free states satisfies
The stabilizer formalism satisfies the conditions of the theorem. Moreover, since the stabilizer measurements contain an informationally complete measurement it holds that whenever is a magic state. This implies whenever is a magic state. for all stabilizer states , so the claimed result follows.
∎
Appendix B Proofs on sum negativity and mana
b.1 Odd dimensions
The main ingredient in establishing both and as magic monotones is to show that is a magic monotone.
Wigner function 1norm is a magic monotone.
Theorem.
is a convex magic monotone.
Proof.
We need to verify that this function is nonincreasing under stabilizer operations:

Invariance under Clifford unitaries: The action of Clifford unitaries on the phase space of the Wigner function is a permutation, . Thus,