Hidden Variable Model for Universal Quantum Computation with Magic States on

Michael Zurel,1, 2, ∗ Cihan Okay,1, 2, ∗ and Robert Raussendorf1, 2 1Department of Physics and Astronomy, University of British Columbia, Vancouver, BC, Canada 2Stewart Blusson Quantum Matter Institute, University of British Columbia, Vancouver, BC, Canada (Dated: February 2, 2021) We show that every quantum computation can be described by a probabilistic update of a proba- bility distribution on a finite phase space. Negativity in a quasiprobability function is not required in states or operations. Our result is consistent with Gleason’s Theorem and the Pusey-Barrett- Rudolph theorem.

It is often pointed out that the fundamental objects In Theorem 2, we apply this to quantum computation in are amplitudes, not probabilities with magic states, showing that universal quantum com- [1, 2]. This fact notwithstanding, here we construct a de- putation can be classically simulated by the probabilistic scription of universal quantum computation—and hence update of a probability distribution. of all quantum mechanics in finite-dimensional Hilbert This looks all very classical, and therein lies a puzzle. spaces—in terms of a probabilistic update of a probabil- In fact, our Theorem 2 is running up against a number ity distribution. In this formulation, quantum algorithms of no-go theorems: Theorem 2 in [23] and the Pusey- look structurally akin to classical diffusion problems. Barrett-Rudolph (PBR) theorem [24] say that probabil- While this seems implausible, there exists a well-known ity representations for quantum mechanics do not exist, special instance of it: quantum computation with magic and [9–13] show that negativity in certain Wigner func- states (QCM) [3] on a single . Compounding two tions is a precondition for speedup in quantum compu- standard one-qubit Wigner functions, a hidden variable tation. Further, does not Gleason’s theorem prove that model can be constructed in which every one-qubit quan- the proper representation of state in quantum mechanics tum state is positively represented [4]. This representa- is density matrices rather than probability distributions? tion is furthermore covariant under all one-qubit Clifford As we explain in the discussion part of this Letter, unitaries and “positivity preserving” under all one-qubit there is no contradiction with those works. Rather, Pauli measurements. The update under such operations the above-quoted theorems make stronger assumptions preserves the probabilistic character of the model, and than we do and establish no-go theorems because hence QCM on one qubit can be classically simulated by of that. However, for describing universal quantum a probabilistic update of a probability function on eight computation—hence all quantum mechanics in finite- elements (see Fig. 1 for illustration). dimensional Hilbert spaces—our weaker assumptions suf- The prevailing view on the one-qubit example is that it is an exception and that for multiple qubits negativity (a) (b) will inevitably creep into any quasiprobability function A A 100 A000 of any computationally useful , render- 100 A ing classical simulations inefficient [5]. This hypothesis z+ 000 A110 is informed by the study of Wigner functions in finite- A110 A010 dimensional state spaces, which establishes Wigner func- y+ x- tion negativity as a necessary computational resource, y x+ A101 i.e., there can be no quantum speedup without negativ- - A A001 arXiv:2004.01992v2 [quant-ph] 31 Jan 2021 ity [6–20]. A notion of quantumness— z 001 A111 - z A negativity of Wigner functions [21, 22]—and a compu- y A111 011 x tational notion—hardness of classical simulation—thus align.

The viewpoint just summarized requires correction. As FIG. 1. One-qubit model. (a) The state space Λ1 is a we show in this Letter, the one-qubit case is not an ex- cube with eight vertices corresponding to the phase point op- sx sy sz erators Aα = [I + (−1) X + (−1) Y + (−1) Z]/2, with ception; rather it is an example illustrating the general 3 case. Every quantum state on any number of qubits can α = (sx, sy, sz) ∈ Z2. The physical one-qubit states lie on or in the Bloch sphere which is contained in Λ and touches be represented by a probability function, and the update 1 the boundary of Λ1 at six points corresponding to the six of this probability function under Pauli measurement is one-qubit stabilizer states. (b) Update of the phase point also probabilistic. This is the content of Theorem 1 be- operators Aα under measurement of the Pauli observable Z. low. We emphasize that the states and operations are Each red arrow represents a transition probability of 1/2. both represented positively, not just one or the other. 2

fice. holds that The remainder of this Letter is organized as follows. X First, we define our setting and state our main results, Πa,sAαΠa,s = qα,a(β, s) Aβ. (3) Theorems 1 and 2. Then we prove them, and thereafter β∈Vn discuss the above questions. For all a ∈ En, α ∈ Vn, the qα,a : Vn × Z2 −→ R≥0 are Setting and Results.—We focus on systems of n qubits probability functions, for any n ∈ N (the statement below applies to qudits in (iii) Denote by Pρ,a(s) the probability of obtaining out- an analogous manner) and consider arbitrary quantum come s for a measurement of Ta on the state ρ. Then, states evolving under sequences of Pauli measurements. the Born rule Pρ,a(s) = Tr(Πa,sρ) takes the form The measurements need not commute, and the sequences X may be arbitrarily long. This setting comprises universal Tr(Πa,sρ) = pρ(α)Qa(s|α), (4) quantum computation with magic states. α∈Vn Below we devise a probability representation for this setting. The representation lives on a finite generalized where Qa(s|α) is given by phase space, and its purpose is to correctly reproduce the X joint measurements statistics for all quantum states and Qa(s|α) := qα,a(β, s). (5) all sequences of Pauli measurements. β∈Vn We denote the n-qubit Pauli operators by Ta = Hence 0 ≤ Q (s|α) ≤ 1, for all a, s, α. φ(a) n n a i X(aX )Z(aZ ), ∀a = (aX , aZ ) ∈ Z2 × Z2 =: En, with n aX [k] The above theorem describes a hidden variable model X(aX ) := ⊗ (Xk) , etc. The phases φ : En −→ Z4 k=1 (HVM) [31–35]. For any fixed number of qubits, any are free to choose, subject to the constraint that all Ta quantum state can be described by a probability func- are Hermitian. The projectors onto the eigenspaces of tion with finitely many elements. This property distin- s Pauli observables are Πa,s := [I + (−1) Ta]/2. guishes it from the HVM of Beltrametti and Bugajski The state space Λn of our probabilistic model is defined [35], which also applies to all quantum states but requires n as follows. We denote by Herm1(2 ) the set of Hermitian an infinite state space. A further distinguishing property 2n operators on n-qubit Hilbert space H = C with the is the probabilistic state update under a dynamical pro- n property that Tr(X) = 1 for all X ∈ Herm1(2 ), and by cess, Pauli measurement. Sn the set of all n-qubit pure stabilizer states [25–27]. Theorem 1 is illustrated in Fig. 1 through the example Then, we define the polytope Λn as of a single qubit and in the SM, Section V, for two qubits. Because of its capability to describe Pauli measure- Λ := {X ∈ Herm (2n)| Tr(|σihσ|X) ≥ 0, ∀ |σi ∈ S } n 1 n ments, the above HVM has bearing on a model of univer- (1) sal quantum computation, namely quantum computation (also see [28]). The elements X ∈ Λ are the “states” n with magic states (QCM) [3]. QCM is closely related to (though not necessarily proper quantum states) that be- the circuit model (see the SM, Sec. IV, for background). have “well” under all sequences of Pauli measurements; The difference is that in QCM the set of operations is namely, the probabilities for the outcome sequences are restricted to a sequence of Clifford unitaries interspersed all non-negative and add up to unity. with Pauli measurements. These operations are applied Λ is defined as the intersection of a finite number n to an initial “magic” state. The only property of QCM of halfspaces. Furthermore, it is bounded [see Supple- relevant for the present discussion is its quantum compu- mental Material (SM), Section VI]. Therefore, by the tational universality [3, 27, 36]. Minkowski-Weyl theorem [29, 30], Λ can equivalently n To apply the above probabilistic representation to be described as the convex hull of finitely many extreme QCM, we need to consider all its operational primitives— points (vertices). Denote by A the set of vertices of Λ , n n the Pauli measurements, the Clifford unitaries, and the and the vertices by A ∈ A . These are our generalized α n magic states. Magic states (like all other quantum states) phase point operators, and the corresponding index set and Pauli measurements are positively represented by our {α} =: V is the generalized phase space. n HVM, cf. Theorem 1. This leaves the Clifford gates. The We now have the following result. easiest way of dealing with them is to observe that they are redundant, i.e., no computational power is lost if we Theorem 1 For all numbers of qubits n ∈ N, (i) each n- qubit quantum state ρ can be represented by a probability consider sequences of Pauli measurements only. The rea- son is that the Clifford unitaries may be propagated past function pρ : Vn −→ R≥0, all measurements, thereby conjugating the Pauli mea- X surements into (other) Pauli measurements. After for- ρ = pρ(α) Aα. (2) ward propagation, the unitaries can be dropped since α∈Vn they do not affect the statistics of the (now earlier) mea- (ii) For the state update under Pauli measurements it surements (see e.g. [10, 12]). 3

0 0 With the Pauli measurements as the only essential dy- Tr[(Πa,s|σihσ|Πa,s)X] = c Tr(|σ ihσ |X) ≥ 0. Therefore, namical element, QCM matches the setting described in whenever Tr(Πa,sX) > 0, the post-measurement state 0 Theorem 1. This leads to the following result. Xa,s := Πa,sXΠa,s/Tr(Πa,sX) also has the property that

0 1. Sample from the probability distribution pρ. Ob- Tr(|σihσ|Xa,s) ≥ 0, ∀a ∈ En, ∀s ∈ Z2, ∀|σi ∈ Sn. tain a phase space point α0 ∈ Vn. 0 0 Furthermore, Tr(Xa,s) = 1. Therefore, Xa,s ∈ Λn.  2. For all Pauli measurements Tat , at ∈ En, from

t = 1 to t = tmax, sample from qα,a=at to obtain Proof of Theorem 1. With Property 1 in Lemma 1, the new phase space point β ∈ Vn and measure- any n-qubit quantum state ρ is in Λn. Hence it can be ment outcome s. Output s as the outcome for the expressed as a convex combination of the vertices Aα, as measurement of Tat , update the phase space point P in Eq. (2). Taking the trace of Eq. (2) yields α pρ(α) = αt−1 → αt = β, and increment t → t + 1. 1, i.e., pρ is a probability function. This proves the first Algorithm 1: Classical procedure to simulate a statement of Theorem 1. single run of a given QCM. With Property 2 of Lemma 1, for all phase point op- erators Aα and all projectors Πa,s with Tr(Πa,sAα) > 0 it holds that Πa,sAαΠa,s/Tr(Πa,sAα) ∈ Λn. Therefore, Theorem 2 For any n ∈ N and all n-qubit quantum states ρ the classical algorithm of Algorithm 1 for sam- X Πa,sAαΠa,s = qα,a(β, s)Aβ, pling the outcomes of any sequence of Pauli measure- β∈Vn ments on ρ agrees with the predictions of quantum me- chanics. with qα,a(β, s) ≥ 0 for all β ∈ Vn, and s ∈ Z2. Now fixing α, a and adding the corresponding equations for Thus, the HVM of Theorem 1 describes all of universal s = 0 and s = 1, and then taking the trace, we find quantum computation and hence arbitrarily closely ap- proximates all quantum mechanical dynamics in finite- X X qα,a(β, s) = 1. (7) dimensional Hilbert spaces. s∈Z2 β∈Vn Theorem 2 does not imply that the classical simula- tion algorithm of Table 1 is efficient. Intuition derived Hence, qα,a : An × Z2 −→ R≥0 is a probability distribu- from previous classical simulation algorithms for quan- tion for all α ∈ Vn, a ∈ En. This demonstrates Eq. (3). tum computation [9, 13, 37, 38] suggests that it is in- Regarding Qa(s|α) as defined in Eq. (5), since the efficient. However, at present we can neither prove the qα,a(β, s) are all positive, it holds that Qa(s|α) ≥ 0 efficiency nor the inefficiency of this algorithm. for all a, s, α. Furthermore, with Eq. (7) it follows that Proofs.—We now turn to the proofs of Theorems 1 and Qa(0|α) + Qa(1|α) = 1 for all a, α, and therefore 2. The proof of Theorem 1 requires a lemma. 0 ≤ Qa(s|α) ≤ 1, ∀a, s, α. Lemma 1 The set Λn has the following properties. Combining Eq. (2) and the already established Eq. (3), (1) Λn contains all n-qubit quantum states; i.e., for all n-qubit density operators ρ it holds that ρ ∈ Λn. X Tr(Πa,sρ) = pρ(α)Tr(Πa,sAαΠa,s) α∈V (2) Λn is closed under Pauli measurement, i.e., for all n X X Πa,s it holds that = pρ(α) qα,a(β, s) α∈V β∈V Π XΠ n n X ∈ Λ ∧ Tr(Π X) > 0 =⇒ a,s a,s ∈ Λ . X n a,s n = pρ(α)Qa(s|α). Tr(Πa,sX) α∈Vn Proof of Lemma 1. All quantum states ρ satisfy the con- This proves the formulation Eq. (4) of the Born rule. ditions Tr|σihσ|ρ ≥ 0, for all n-qubit stabilizer states  |σi (as well as all other pure states), and Tr(ρ) = 1; hence Proof of Theorem 2. Consider a Pauli measurement T on input state ρ. Using the classical simulation algo- all quantum states ρ are in Λn. a Regarding Property 2, we observe that for all stabilizer rithm, the conditional probability of obtaining outcome s given the state α ∈ V is given by Eq. (5). Therefore, the states |σi ∈ Sn and all Pauli observables Ta it holds that n probability of obtaining outcome s given a measurement 0 0 0 Πa,s|σihσ|Πa,s = c |σ ihσ |, where |σ i ∈ Sn, c ≥ 0. (6) of Ta on state ρ as predicted by the classical simulation algorithm is s s Namely, c = 1 if (−1) Ta|σi = |σi, c = 0 if (−1) Ta|σi = −|σi, and c = 1/2 otherwise [27]. Combining Eq. (6) (Sim) X Pρ,a (s) = pρ(α)Qa(s|α). (8) and the definition of Λn, Eq. (1), Tr(|σihσ|Πa,sXΠa,s) = α∈Vn 4

The outcome probability predicted by the Born rule, This appears to contradict Theorem 1. However, there (QM) Pρ,a , is given by Eq. (4). is no contradiction here, only a difference in assump- Comparing Eq. (8) and Eq. (4), we see that the clas- tions. Through the definitions made prior to it, the above sical simulation algorithm reproduces the outcome prob- quoted theorem refers to frame representations. This re- abilities predicted by the Born rule for a single Pauli quires, in particular, that the quasiprobability represen- measurement. tation for every quantum state is unique. Clearly, our Now we turn to the post-measurement state ρ0. Quan- probability distribution p does not satisfy this condition. tum mechanics predicts it to be (ii) Contextuality. Given the history of the subject [6–16, 18, 39–41], an interesting question is whether Π ρΠ ρ0(QM) = a,s a,s . the present HVM is contextual or noncontextual. The Tr(Π ρ) a,s Kochen-Specker notion of contextuality does not apply, Here the numerator is because the present value assignments are not determin- istic. This leaves us with Spekkens’ notion [42], [43] to X Πa,sρΠa,s = pρ(α)Πa,sAαΠa,s consider. In this regard, our HVM is preparation con-

α∈Vn textual and measurement-noncontextual. The former re- X X flects the aforementioned nonuniqueness of p. = pρ(α) qα,a(β, s)Aβ,

α∈Vn β∈Vn (iii) Negativity vs efficiency of simulation. Negativity in quasiprobability representations has been identified as and so a cause for slowing down the classical simulation of quan- P P tum systems by sampling. A general result has been ob- pρ(α) qα,a(β, s)Aβ ρ0(QM) = α β . (9) tained in [5] stating that a quantum system described by P p (α)Q (s|α) α ρ a a quasiprobality function W with negativity M = kW k1 can be simulated by sampling at a multiplicative cost Using the classical simulation algorithm, the prob- that scales like M2. ability of obtaining outcome s and state β given There are simulation schemes for QCM on qudits [9], a measurement of Ta on state ρ is Pρ,a(β, s) = P on rebits [10], and on qubits [12–14], where negativity is Pρ,a(β|s)Pρ,a(s). But Pρ,a(β, s) = pρ(α)Pa(β, s|α) = P α the only source for the computational hardness of clas- p (α)q (β, s) and P (β|s) = p 0 (β). Therefore, α ρ α,a ρ,a ρ sical simulation. Negativity is therefore singled out as the post-measurement state according to the classical precondition for quantum speedup. simulation algorithm is We do not contradict the results [9–14] but now find

0(Sim) X X Pρ,a(β, s) that they are an artifact of the particular quasiprobabil- ρ = pρ0 (β)Aβ = Aβ ity functions chosen. Our result lies at the opposite end Pρ,a(s) β∈Vn β∈Vn of the spectrum. There is no negativity but, presumably, P X α pρ(α)qα,a(β, s) still computational hardness. = P Aβ. (10) α pρ(α)Qa(s|α) The absence of negativity notwithstanding, there also β∈Vn is continuity with prior works. The probability distribu- This agrees with Eq. (9) above. Therefore, the clas- tion p satisfies the four criteria of the Stratonovich-Weyl sical simulation algorithm also reproduces the post- (SW) correspondence [44] (also see [45]; see SM, Section I measurement state predicted by quantum mechanics for for details). It is thus very closely related to the original a single Pauli measurement. Wigner function [46] and to previously defined discrete Now let ρ(t) denote the state before the tth measure- Wigner functions for finite-dimensional systems. From ment. Then the above shows that the classical sim- the SW perspective, the only condition p doesn’t satisfy ulation algorithm correctly reproduces the Born rule is uniqueness. probabilities Pρ,at (st|s1, s2, . . . , st−1) as well as the post- Furthermore, the phase point operators identified in measurement state ρ(t + 1). Therefore, by induction the the multiqubit setting of [13] (also see [47]) are special simulation algorithm correctly reproduces the outcome cases of the phase point operators discussed here (see the probabilities predicted by the Born rule for any sequence SM, Section IV). And thus, the present approach pro- of Pauli measurements.  vides a broader and yet conceptually simpler framework Discussion.—We now return to the questions posed in for the classical simulation of quantum computation by the introduction. sampling, subsuming earlier ones as special cases. (i) Existence of a probability representation. It is (iv) The PBR theorem. The hidden variable model stated in Theorem 2 of [23] that “a quasiprobability rep- presented here is ψ-epistemic [48]. The PBR theorem [24] resentation of quantum theory must have negativity in asserts that (with certain assumptions) no ψ-epistemic either its representation of states or measurements (or model can reproduce the predictions of quantum mechan- both).” ics. Our result does not contradict the PBR theorem for 5 two reasons. First, we consider only sequences of Pauli measurements rather than general measurements (this is sufficent for universal quantum computation). Second, ∗ These authors contributed equally to this work our model does not satisfy the assumption of preparation [1] A. Peres, Quantum Theory: Concepts and Methods, independence required for the theorem to hold. That is, Springer, 1995. in general, pρ1⊗ρ2 6= pρ1 · pρ2 . [2] R.P. Feynman, R.B. Leighton, M. Sands, Probability Am- The assumption of preparation independence is less plitudes. The Feynman Lectures on Physics. Volume 3. relevant for quantum computation with magic states, Redwood City: Addison-Wesley (1989). [3] S. Bravyi and A. Kitaev, Phys. Rev. A 71, 022316 (2005). where, in the language of resource theories, the free sector [4] J.J. Wallman, S.D. Bartlett, Phys. Rev. A 85, 062121 is formed by stabilizer states and stabilizer operations, (2012). not local states and local operations. Further, the mem- [5] H. Pashayan, J.J. Wallman, S.D. Bartlett, Phys. Rev. ory lower bound of Karanjai, Wallman, and Bartlett [16] Lett. 115, 070501 (2015). shows that a classical simulation algorithm like that of [6] D. Gross, Computational Power of Quantum Many-Body Algorithm 1 is incompatible with this assumption. States and Some Results on Discrete Phase Spaces, Ph.D thesis, Imperial College London, 2005. (v) Gleason’s theorem. Gleason’s theorem [49] says [7] E.F. Galv˜ao,Phys. Rev. A 71, 042302 (2005). that in Hilbert spaces H of dimension 3 or greater, the [8] C. Cormick, E.F. Galv˜ao,D. Gottesman, J.P. Paz, and only way to assign probabilities p(h) to all subspaces of A.O. Pittenger, Phys. Rev A 73, 012301 (2006). [9] V. Veitch, C. Ferrie, D. Gross, and J. Emerson, New J. h ⊂ H, represented by corresponding projectors Πh, is Phys. 14, 113011 (2012). via p(h) = Tr(Πhρ), for some valid density matrix ρ. [10] N. Delfosse, P. Allard Guerin, J. Bian and R. That is, the only consistent way to assign probabilities Raussendorf, Phys. Rev. X 5, 021003 (2015). to measurement outcomes is the Born rule involving den- [11] N. Delfosse, C. Okay, J. Bermejo-Vega, D. E. Browne, sity matrices. Our Theorem 1 does not contradict this; and R. Raussendorf, New J. Phys. 19, 123024 (2017). [12] R. Raussendorf, D. E. Browne, N. Delfosse, C. Okay, and rather it reproduces the Born rule, cf. Eq. (4). J. Bermejo-Vega, Phys. Rev. A 95, 052334 (2017). However, Gleason’s theorem is sometimes interpreted [13] R. Raussendorf, J. Bermejo-Vega, E. Tyhurst, C. Okay, as a mathematical proof that density operators are the M. Zurel, Phys. Rev. A 101, 012350 (2020). fundamental notion of state in quantum mechanics. In [14] M. Howard, E.T. Campbell, Phys. Rev. Lett. 118, short, density operators are for quantum mechanics, 090501 (2017). probability distributions for classical statistical mechan- [15] M. Heinrich, D. Gross, Quantum 3, 132 (2019). [16] A. Karanjai, J.J. Wallman, S.D. Bartlett, arXiv:1802.- ics. Theorem 1 escapes this interpretation. It shows that 07744v1. every quantum state can be described by a probability [17] H. Zhu, Phys. Rev. Lett. 116, 040501 (2016). distribution, and yet the Born rule for measurement is [18] L. Kocia and P. Love, Phys. Rev. A 96, 062134 (2017). reproduced. This is possible because we have restricted [19] J.B. DeBrota, C.A. Fuchs, and B.C. Stacey, Phys. Rev. measurement to Pauli observables. Note though that this Research 2, 013074 (2020). restriction does not affect the universality of quantum [20] J.B. DeBrota, B.C. Stacey, arXiv:1912.07554 computation with magic states! [21] R. L. Hudson, Rep. Math. Phys. 6, 249-252 (1974). [22] A. Kenfack and K. Zyczkowski,˙ J. Opt. B 6, 396-404 To summarize, in this Letter we have constructed a (2004). probability function over a finite set capable of positively [23] C. Ferrie, Rep. Prog. Phys. 74, 115001 (2011). [24] M. Pusey, J. Barrett, T. Rudolph, Nat. Phys. 8, 475-478 representing all quantum states on any number of qubits, (2012). as well as their update under all Pauli measurements, lo- [25] D. Gottesman, Proceedings of the XXII International cal and nonlocal. All prior quasiprobability representa- Colloquium on Group Theoretical Methods in Physics, tions invoked in the discussion of quantum computation p. 32-43 (Cambridge, MA, International Press, 1999) with magic states, such as the Wigner function for qu- [26] S. Aaronson, D. Gottesman, Phys. Rev. A 70, 052328 dits [6, 9] or for rebits [10], and the quasiprobability over (2004). stabilizer states [14], require negativity to represent uni- [27] M.A. Nielsen and I.L. Chuang, Quantum Computation and , Cambridge University Press versal quantum computation. (2000). In view of the seeming classicality of the hidden vari- [28] A. Heimendahl, MSc Thesis, University of Cologne, 2019. able model for universal quantum computation con- [29] G. M. Ziegler, Lectures on Polytopes, Springer-Verlag, structed here, an important open question is: Where New York, (1995). is quantumness hiding?—In this regard, we propose the [30] V. Chvatal, Linear programming, W. H. Freeman and polytopes Λ , and in particular the algebraic structure Company, New York, (1983). n [31] A. Einstein, B. Podolsky, and N. Rosen, Phys. Rev. 47, of their extremal vertices as a subject for further study. 777 (1935). [32] J. Bell, Physics 1, 195 (1964). This work is supported by NSERC. We thank Andreas [33] S. Kochen and E. P. Specker, J. Mathematics and Me- D¨oring(RR) and Bill Unruh (MZ, RR) for discussions. chanics 17, 59 (1967). 6

[34] D. Bohm, Phys. Rev. 85, 166 (1952). [35] E.G. Beltrametti S. Bugajski, J. Phys. A: Math. Gen. 29, 247 (1996). [36] A. Yao, Proc. 34th Annual IEEE Symposium on Foun- dations of Computer Science, 352–361 (1993). [37] G. Vidal, Phys. Rev. Lett. 91, 147902 (2003). [38] M.J. Bremner , R. Jozsa and D.J. Shepherd, Proc. R. Soc. A, 467, 459 (2011). [39] M. Howard et al., Nature 510, 351355 (2014). [40] M.S. Leifer and O.J.E. Maroney, Phys. Rev. Lett. 110, 120401 (2013). [41] N.D. Mermin, Rev. Mod. Phys. 65, 803 (1993). [42] R. W. Spekkens, Phys. Rev. A 71, 052108 (2005). [43] R. Kunjwal and R.W. Spekkens, Phys. Rev. Lett. 115, 110403 (2015). [44] R.L. Stratonovich, Zh. Eksp. Teor. Fiz. 31, 1012 (1956) [Sov. Phys. JETP 4, 891 (1957)]. [45] C. Brif, A. Mann, J. Phys. A 31, 9 (1998). [46] E. Wigner, Phys. Rev. 40, 749 (1932). [47] William M. Kirby, Peter J. Love, Phys. Rev. Lett. 123, 200501 (2019). [48] N. Harrigan and R.W. Spekkens, Found. Phys. 40, 125- 157 (2010). [49] A.M. Gleason, Indiana University Mathematics Journal 6, 885 (1957). 7

Further, the mapping A −→ WA is linear, A + B can be represented as WA + WB. However, the mapping is Supplementary Material one-to-many, and the Stratonovich-Weyl criterion (0) is thus not satisfied. In fact, this is a general consequence of A comment regarding notation: Equation and Theo- Kochen-Specker contextuality, as has been demonstrated rem references to the main text carry a suffix “[m]” below, in [3]. to distinguish them from the equation numbering in this The remaining SW conditions apply. supplement. For example, Eq. (8) from the main text is (1) Reality. All phase point operators Aα are Her- here referred to as Eq. (8) [m]. mitian by definition, cf. Eq. (1) [m]. Therefore A† can be represented by the quasiprobability distribution ∗ Stratonovich-Weyl correspondence α 7→ WA(α) . (2) Standardization. By their definition Eq. (1) [m], the phase point operators satisfy Tr A = 1, for all α ∈ In the field of quantum optics, the Stratonovich-Weyl α V . Standardization, (SW) correspondence is a set of criteria that well-behaved n quasi-probability distributions over phase space have to X (s) TrA = WA(α), (12) satisfy. Denote by FA : X −→ C the quasiprobability α distribution corresponding to the (not necessarily Hermi- tian) operator A, with X the phase space and s a real follows by taking the trace of Eq. (11). parameter in the interval [−1, 1]. In the standard formal- (3) Covariance. Let Cln denote the n-qubit Clifford ism for infinite-dimensional Hilbert spaces, s = −1, 0, 1 group. We have the following result. correspond to the Glauber-Sudarshan P , Wigner, and Lemma 1 For any operator A it holds that Husimi Q function, respectively. Then, the following set (s) of criteria is imposed on the F [1]; also see [2], −1 A WgAg† (α) = WA(g α), ∀g ∈ Cln. (13) (0) Linearity: A −→ F (s) is a one-to-one linear map. A Proof of Lemma 1. First we show that Λn is mapped into (1) Reality: itself under the action of the Clifford group. Namely, for all stabilizer sates |σi ∈ S, ∗ (s)  (s)  F (u) = F (u) , ∀u ∈ X. † † A† A Tr(gAαg |σihσ|) = Tr(Aα g |σihσ|g) 0 0 = Tr(Aα |σ ihσ |) (2) Standardization: ≥ 0.

Z † dµ(u)F (s)(u) = Tr A. Furthermore, Tr(gAαg ) = TrAα = 1. Hence, with the A † X definition Eq. (1) [m] of Λn, it holds that gAαg ∈ Λn, for all α ∈ Vn and all g ∈ Cln. (3) Covariance: Now we show that for every α ∈ Vn and every g ∈ Cln there is a unique β ∈ Vn such that (s) (s) −1 Fg·A(u) = FA (g u), g ∈ G, † gAαg = Aβ. (14) with G the dynamical symmetry group. Let Sα be the subset of stabilizer states that specifies (4) Traciality: Aα, i.e. Aα is the unique solution in Λn to the set of Z constraints Tr(X|σihσ|) = 0 for all |σi ∈ Sα. In fact, (s) (−s) 2n dµ(u)FA (u)FB (u) = Tr AB. we can choose the size of Sα to be equal to 2 − 1 [4, X Theorem 18.1]. Let g · Sα denote the set of stabilizers g|σihσ|g† where |σi ∈ S . Then the action of g gives a To investigate the SW criteria in the present setting, we α one-to-one correspondence between the set of solutions first extend the probability distributions p defined in ρ to the constraints specified by S and g† ·S since if X Eq. (2) [m] for proper density matrices to a quasiproba- α α is a solution to the former then gXg† is a solution to bility function W defined for all operators A, via the latter and vice versa. Moreover, gXg† belongs to † X the polytope Λn. Therefore gAαg specifies a vertex. In A = WA(α)Aα. (11) α other words, given α ∈ Vn and g ∈ Cln, Eq. (14) holds for a suitable β ∈ Vn. We thus define gα := β, and Eq. (14) We note that W does not come with a parameter s; there becomes is only a single quasiprobability function W . This will † affect the formulation of traciality. gAαg = Agα. (15) 8

Therefore, The resource are arbitrarily many copies of the state iπ/4 P † |0i + e |1i α WgAg† (α)Aα = gAg |T i = √ . (16) P † = WA(α) gAαg 2 Pα = α WA(α)Agα The state |T i is called a “magic state”. P −1 = α WA(g α)Aα. A stabilizer state is a pure n-qubit quantum state which is the joint eigenstate of a maximal set of commut- −1 Thus, WgAg† (α) = WA(g α)Aα.  ing Pauli operators [14–16]. The n-qubit Clifford group n We remark that, for qubits, only non-unique quasi- Cln is the largest subgroup of SU(2 ) with the property probability functions can be Clifford covariant. Namely, that for any g ∈ Cln and all Pauli operators Ta there if the phase point operators form an operator basis, i.e., exists a Pauli operator Tb such that are linearly independent, then the resulting quasiproba- gT g† = ±T . bility function cannot be Clifford covariant [5]. a b The covariance property can be used to efficiently sim- That is, the Clifford group is the normalizer of the Pauli ulate the effect of Clifford unitaries in QCM, as an alter- group. native to the method of treating Clifford unitaries dis- The distinction between free operations and resources cussed in the main text. in QCM is motivated by the Gottesman-Knill theorem. (4) Traciality. In the absence of a continuously varying Namely, the free operations alone are not universal for parameter s, we introduce a dual quasiprobability func- quantum computation, and, in fact, can be efficiently tion W˜ in addition to W , to stand in for F (−s). Namely, classically simulated. The magic states restore computa- for all projectors Πa,s, corresponding to measurements of tional universality (see below), hence the name. Pauli observables Ta with outcome s, we define A further motivation for subdividing the computa- tional primitives into free operations and resources stems ˜ WΠa,s (α) := Qa(s|α). from . Fault-tolerant versions of the free operations are comparatively easy to produce, ˜ By linearity, this implies expressions for all WTa (α). but the creation of fault-tolerant magic states is very op- Since the Pauli operators form an operator basis, again erationally costly. by linearity one obtains W˜ A for any operator A. Then, X TrAB = W˜ A(α)WB(α) Computational universality α It is well known [17] that the gates follows from Eq. (4) [m]. We thus satisfy the SW criteria (1) - (4). {CNOTij,Hi, Ti, 1 ≤ i 6= j ≤ n} To conclude, we emphasize that for the present purpose form a universal set, i.e., enable universal quantum com- of classically simulating QCM, a crucial property of W is putation. Therein, the controlled NOT gates CNOTij positivity preservation under Pauli measurement. This between qubits i and j and the Hadamard gates Hi are property has no counterpart in the Stratonovich-Weyl in the Clifford group. The only non-Clifford element in correspondence. the above universal set is  π  T = exp −i Z . i 8 i Some background on QCM This gate can be simulated by the use of a single magic state |T i in a circuit of Clifford gates and Pauli measure- Quantum computation with magic states (QCM) is a ments (circuit reproduced from Fig. 10.25 of [16]), scheme for universal quantum computation, closely re- lated to the circuit model. From a practical point of T SX T ψ view, QCM is very advantageous for fault-tolerant quan- . tum computation [13], but that does not concern us here. ψ Therein, the lower qubit is measured in the Z-basis, and Operations in QCM the binary measurement outcome classically controls the SX-gate. S is a Clifford gate, There are two types of operations in QCM, the “free”  π  Si = exp −i Zi . operations and the resources. The free operations are 4 (i) Preparation of all stabilizer states, (ii) All Clifford Thus, the magic states Eq. (16) boost the free operations unitaries, and (iii) Measurement of all Pauli observables. to quantum computational universality. 9

N Complexity parameter of the state polytope Λn where |+iB := i∈B |+iB:i. ˜ A question that arises with Theorem 2 [m] is what 2. Measure ZB:1 on |ψ(t)i ⊗ |+iB, with outcome st+1. determines the value of n labelling the state polytope 3. Apply U †. Λn, and hence the complexity of the simulation. In this regard, we make the following observation. Now, note that the measurement in Step 2, of the Pauli observable ZB:1 is applied to the stabilizer state |+iB. Lemma 2 Any quantum computation in the magic state Nm The result is |σ˜(t + 1)i = |st+1iB:1 j=2 |+iB:j. There- model that operates on an initial state |µiA ⊗|σiB, where fore, after normalization, the effect of the measurement |µi is an n-qubit magic state and |σi is an m-qubit sta- st+1 can be replaced by the unitary (XB:1) HB:1. bilizer state, can with the same efficiency be run on the Thus, the whole procedure may be replaced by the magic state |µi alone. † st+1 Clifford unitary U (XB:1) HB:1 U. But Clifford uni- Supplementing the non-stabilizer magic state |µi with taries don’t need to be implemented. They are just stabilizer states is thus redundant. For example, if the propagated past the last measurement, thereby affecting magic states used in a given QCM are all of T -type, then the measured observables by conjugation whereby their n can be taken to be the number of those states. Pauli-ness is preserved. In result, in Case II, the measure- Proof of Lemma 2. Wlog. we discuss the version of ment of T (t + 1) doesn’t need to be performed at all. It QCM where the quantum computation consists of a se- is replaced by classical post-processing of the subsequent quence of only Pauli measurements. We give an explicit measurement sequence. procedure to replace the sequence τ on A⊗B by an equiv- We conclude that in both the cases I and II, given alent sequenceτ ˜(A) of measured observables that act only the induction assumption, the original measurement se- on the subsystem A. The proof is by induction, and the quence τ≤t+1 can be replaced by a computationally induction hypothesis is that, at time t, the sequence τ≤t (A) equivalent measurement sequenceτ ˜≤t+1 acting on reg- of measurements has been replaced by a computationally ister A only. By induction, the complete measurement (A) equivalent sequenceτ ˜≤t of Pauli measurements on the sequence τ can be replaced by a computationally equiv- register A only. This statement is true for t = 0, i.e., the alent sequenceτ ˜(A) acting on A only. empty measurement sequence. We now show that the Since the measurementsτ ˜(A) are applied to an unen- above statement for time t implies the analogous state- tangled initial state |µiA ⊗ |σiB, the register B can be ment for time t + 1. dropped. Finally, the measurement sequenceτ ˜(A) is of At time t, the state of the quantum register evolved the same length or shorter than τ, and can be efficiently under the computationally equivalent measurement se- computed from the latter. Hence its implementation is (A) quenceτ ˜≤t is |Ψ(t)i = |ψ(t)iA ⊗ |σiB. We now consider at least as efficient.  the Pauli observable T (t + 1) ∈ τ to be measured next, and write T (t + 1) = SA(t + 1) ⊗ RB(t + 1). There are two cases. Multi-qubit phase points from [10] are extremal Case I: T (t+1) commutes with the entire stabilizer S of |σi. Hence, also RB(t + 1) commutes with S. But then, The present work, there is no negativity anywhere in either RB(t + 1) or −RB(t + 1) is in S, and RB(t + 1) the classical simulation of QCM. The shifting of the cause may be replaced by its eigenvalue ±1 in the measurement. for computational hardness away from negativity to other Hence, the measurement of T (t + 1) is equivalent to the potential sources is a major disruption with the prior measurement of ±SA(t + 1). works [6–10]. Case II: T (t + 1) does not commute with the entire But underneath this discontinuity lies an element of stabilizer S of |σi. Then, the measurement outcome st+1 continuity. Namely, the direct precursor to the present is completely random. Further, there exists a Clifford work is Ref. [10]; and the phase point operators of the unitary U such that multi-qubit quasiproability function defined therein are also extremal vertices of the present state polytope Λn. † USU = hXB:1,XB:2, .., XB:mi, This is the content of Lemma 4 below, the main re- † UT (t + 1)U = ZB:1. sult of this section. It shows that the multi-qubit phase Therefore, the state resulting from the measurement of space defined in [10] is a subset of the phase space of the present model, describing a sector of it in which the T (t+1), with outcome st+1 on the state |Ψ(t)i is the same state as the one resulting from the following procedure: update rules under Clifford unitaries and Pauli measure- ments are guaranteed to be computationally efficient. 1. Apply the Clifford unitary U to |Ψ(t)i = |ψ(t)iA ⊗ Recall from [10] a couple of definitions. We call a set |σ(t)iB, leading to Ω ⊂ En closed under inference if for all a, b ∈ Ω with ˜ U |Ψ(t)i = |ψ(t)i ⊗ |+iB, the property that [a, b] = 0 it holds that a + b ∈ Ω. 10

(a) (b) (Here [a, b] := aX bZ + aZ bX mod 2.) We call a set Ω ⊂ En non-contextual if it supports a non-contextual value assignment. Sets Ω which are both closed under inference b and non-contextual are called “cnc” [10] (also see [12]). b Of particular interest in are maximal cnc sets, which are cnc sets that are not strictly contained in any other cnc set. They give rise to the following multi-qubit phase point operators FIG. 2. Two possibilities for the set Ω ∩ M, shown in color. 1 X Aγ = (−1)γ(a)T , (17) Ω 2n a a∈Ω Since M is closed under inference, so is Ω ∩ M. Also, where Ω is a maximal cnc set, and γ :Ω −→ Z2 is a since Ω is maximal, Ω ∩ M is maximal in M. Up to per- non-contextual value assignment. mutations of rows and columns, there are two possibilities Theorem 1 in [10] classifies the maximal cnc sets. For for Ω ∩ M, which are displayed in Fig. 2. the present purpose it may be rephrased as Case (a). For any b there exists a triple {x, y, z} ⊂ M\b such that [x, y] = [x, z] = [b, y] = [b, z] = 0, [x, b] = Lemma 3 If a subset of En is closed under inference [y, z] 6= 0. We have the following Mermin square: and does not contain a Mermin square then it is non- contextual. x y x+y Proof sketch for Lemma 3. Theorem 1 of [10] classifies z b z+b the subsets of En that are closed under inference and do not contain a Mermin square. They all turn out to be non-contextual.  x+z y+b x+y+z+b We now have the following result (also see [11] for an Therein, Mermin’s contradiction to the existence of a independent proof). non-contextual HVM is encapsulated in the operator re- Lemma 4 For any number n of qubits, the phase point lation (TxTy)(TzTb) = −(TxTz)(TyTb). γ We chose the following phase conventions. operators AΩ of Eq. (17) are vertices of Λn.

An independent proof of this result is given in [11]. Tx+y = TxTy,Tz+b = TzTb, γ (19) Tx+z = TxTz,Ty+b = TyTb, Proof of Lemma 4. Pick an n, any pair (Ω, γ). AΩ has γ unit trace, and, as shown in [10], satisfies Tr(|σihσ|AΩ) ≥ γ γ and 0. Therefore, AΩ ∈ Λn, and AΩ has an expansion Tx+y+z+b = Tx+zTy+b, γ X (20) AΩ = pΩ,γ (β)Aβ, (18) Tx+y+z+b = −Tx+yTz+b. β∈Vn Recall that with the first part of the proof hTjiβ = where p (β) ≥ 0, ∀β, and P p (β) = 1. Thus, p γ(j) Ω,γ β Ω,γ Ω,β (−1) , for j = x, y, z. Now assume that hTbiβ = ν, is a probability distribution. Henceforth, we consider any with −1 ≤ ν ≤ 1. Now, with Eq. (19) Aβ for which pΩ,γ (β) > 0. γ γ(x)+γ(y) γ(x)+γ(z) Now pick an a ∈ Ω and consider Tr (TaAΩ). With hTx+yiβ = (−1) , hTx+ziβ = (−1) , γ(a) P γ(y) γ(z) Eq. (17), it holds that (−1) = β pΩ,γ (β)hTaiβ. hTy+biβ = ν(−1) , hTz+biβ = ν(−1) . Since pΩ,β is a probability distribution and |hTaiβ| ≤ 1 for all β, it follows that Therefore, with Eq. (20),

γ(a) γ(x)+γ(y)+γ(z) hTaiβ = (−1) , ∀ β with pΩ,γ (β) > 0. hTx+y+z+biβ = ν(−1) = −ν(−1)γ(x)+γ(y)+γ(z). That is, every phase point operator that appears on the γ rhs. of Eq. (18) with non-zero coefficient agrees with AΩ This is satisfiable only if ν = 0, and hence hTbiβ = 0. on the expectation values hTai for all a ∈ Ω. Case (b). The argument is analogous to case (a), and Now we turn to the expectation values for b 6∈ Ω. Any we do not repeat it here. set Ω˜ ⊂ En that is closed under inference and contains By the above case distinction, for any b ∈ En\Ω either both Ω and b is contextual, by the maximality of Ω. By case (a) or (b) applies, and each way the consequence Lemma 3, any such Ω˜ contains a Mermin square M, and is that hTbiβ = 0. Therefore, any phase point operator furthermore b ∈ M. Aβ that appears on the rhs of Eq. (18) with nonzero 11

Λn is bounded ρ2

Λ2 The set En has the structure of a vector space over Z2. [a,b] The commutator TaTbTaTb is given by (−1) where Physical T T states [a, b] = aZ bX +bZ aX mod 2. A subspace of En on which the symplectic form [·, ·] vanishes is called an isotropic subspace. For an isotropic subspace I ⊂ En and a value assignment λ : I → Z2 we define a projector 1 X Π = (−1)λ(a)T . I,λ |I| a a∈I ρ1 Stabilizer mixtures ρ4 y Summing over all value assignments gives a resolution P x of the identity: λ ΠI,λ = I. For each stabilizer state ρ3 |σi there is a unique pair (I, λ) consisting of a maximal isotropic subspace and a value assignment defined on it such that ΠI,λ = |σihσ|. Then for X ∈ Λn we have FIG. 3. Cross section of the space Herm1(4) parameterized by Eq. 21. The two-qubit stabilizer polytope is inscribed in the Tr(XΠa,s) = Tr(XΠa,sI) set of physical states and the set of physical states is inscribed P = Tr(XΠa,s λ0 ΠI0,λ0 ) in the polytope Λ2. The states labelled by ρ1–ρ4 are given in P = 0 Tr(XΠa,sΠI0,λ0 ) Eq. (22). Pλ = λ| λ(a)=s Tr(XΠI,λ) ≥ 0.

γ Therefore Λn is contained in the hypercube defined by pΩ,γ (β) agrees with AΩ on all expectation values of Pauli γ observables; hence AΩ = Aβ for all such β. n {X ∈ Herm1(2 )| Tr(Πa,sX) ≥ 0, ∀a ∈ En−{0}, s = 0, 1} Now assume there exists no such Aβ. Taking the trace of Eq. (18) yields 1 = 0; contradiction. Hence, there γ and thus it is bounded. must exist a β such that AΩ = Aβ, for all (Ω, γ). 

The two-qubit polytope Λ2 ∗ These authors contributed equally to this work Fig. 1 in the main text shows what the polytope Λn [1] R.L. Stratonovich, Zh. Eksp. Teor. Fiz. 31, 1012 (1956) [Sov. Phys. JETP 4, 891 (1957)]. looks like for a single qubit, n = 1. The polytope Λ1 is a cube inscribing the Bloch ball—the set of physical quan- [2] C. Brif, A. Mann, J. Phys. A 31, 9 (1998). [3] M.S. Leifer and O.J.E. Maroney, Phys. Rev. Lett. 110, tum states. The situation is similar for multiple qubits. 120401 (2013). In general, Λn is not a hypercube, it is a more general [4] V. Chvatal, Linear programming, W. H. Freeman and polytope, but it still inscribes the set of physical states. Company, New York, (1983). Fig. 3 shows a cross section of the space Herm1(4), in- [5] H. Zhu, Phys. Rev. Lett. 116, 040501 (2016). dicating the states which are contained in the two-qubit [6] V. Veitch, C. Ferrie, D. Gross, and J. Emerson, New J. stabilizer polytope—the set of mixtures of pure two-qubit Phys. 14, 113011 (2012). stabilizer states, the set of physical states, and the poly- [7] N. Delfosse, P. Allard Guerin, J. Bian and R. Raussendorf, Phys. Rev. X 5, 021003 (2015). tope Λ . The cross section is parameterized by 2 [8] N. Delfosse, C. Okay, J. Bermejo-Vega, D. E. Browne, 1 and R. Raussendorf, New J. Phys. 19, 123024 (2017). ρ(x, y) = I12 + x(Z1 + Z2) + y(X1X2 + Z1Z2 − Y1Y2). [9] R. Raussendorf, D. E. Browne, N. Delfosse, C. Okay, and 4 J. Bermejo-Vega, Phys. Rev. A 95, 052334 (2017). (21) [10] R. Raussendorf, J. Bermejo-Vega, E. Tyhurst, C. Okay, The four states labelled in the figure are M. Zurel, Phys. Rev. A 101, 012350 (2020). [11] A. Heimendahl, MSc Thesis, University of Cologne, 2019. 1 1 ρ1 = I12 − (Z1 + Z2), [12] William M. Kirby, Peter J. Love, Phys. Rev. Lett. 123, 4 8 200501 (2019). 1 1 [13] S. Bravyi and A. Kitaev, Phys. Rev. A 71, 022316 (2005). ρ2 = I12 + (X1X2 + Z1Z2 − Y1Y2), 4 4 (22) [14] D. Gottesman, Proceedings of the XXII International 1 1 Colloquium on Group Theoretical Methods in Physics, ρ = I − (X X + Z Z − Y Y ), 3 4 12 12 1 2 1 2 1 2 p. 32-43 (Cambridge, MA, International Press, 1999) 1 1 [15] S. Aaronson, D. Gottesman, Phys. Rev. A 70, 052328 ρ = I + (Z + Z ). 4 4 12 8 1 2 (2004). 12

[16] M.A. Nielsen and I.L. Chuang, Quantum Computation (1993). and Quantum Information, Cambridge University Press (2000). [17] A. Yao, Proceedings of the 34th Annual IEEE Sym- posium on Foundations of Computer Science, 352–361