Hierarchies of resources for measurement-based quantum computation

For certain restricted computational tasks, quantum mechanics provides a provable advantage over any possible classical implementation. Several of these results have been proven using the framework of measurement-based quantum computation (MBQC), where non-locality and more generally contextuality have been identified as necessary resources for certain quantum computations. Here, we consider the computational power of MBQC in more detail by refining its resource requirements, both on the allowed operations and the number of accessible qubits. More precisely, we identify which Boolean functions can be computed in non-adaptive MBQC, with local operations contained within a finite level in the Clifford hierarchy. Moreover, for non-adaptive MBQC restricted to certain subtheories such as stabiliser MBQC, we compute the minimal number of qubits required to compute a given Boolean function. Our results point towards hierarchies of resources that more sharply characterise the power of MBQC beyond the binary of contextuality vs non-contextuality.


I. INTRODUCTION
Quantum computation promises many advantages over classical computation, including the ability to efficiently solve certain problems, such as factoring, where no efficient classical algorithms are currently known. What drives this quantum advantage?
Contextuality offers a potential answer to this question, as it has been found to be an important resource for quantum computation in a variety of settings [1][2][3][4][5][6][7][8][9][10][11][12][13][14]. Roughly speaking, contextuality is the impossibility of assigning pre-determined outcomes to all potential measurements of a quantum system in a way that is independent of other, simultaneously performed measurements [15]. Contextuality is a common notion of nonclassicality. Notably, contextuality plays a central role in a recent seminal result showing a provable quantum advantage for a class of shallow quantum circuits over their classical counterparts [16] (later extended to the noisy setting in Ref. [17]). While the class of problems solvable with such circuits is not motivated by practical applications, it provides a proof of principle that quantum advantages over classical computation are possible, and highlights quantum contextuality as a key resource.
Despite this evidence for the role of contextuality as a resource for quantum advantage, a finer characterisation of this resource is largely missing. We address this problem by asking a related question: how non-classical is quantum computation? This is similar to the study of the extent to which quantum mechanics violates certain Bell inequalities, yet with an explicit emphasis on computation and computationally relevant resource constraints.
In this paper, we study the computability of Boolean functions in the framework of measurement-based quantum computation (MBQC) [18][19][20], observing that many of the relevant results in the literature including Refs. [16,21] are readily and naturally formulated within the measurement-based framework. For simplicity, we focus on non-adaptive MBQC with linear side-processing, where contextuality provides the sharpest known separation between classical and quantum computation [13,22]. We outline this setup in Sec. I A below.
Within this setting, we further consider the interplay between the following two resource aspects: the amount of magic (non-Clifford operations, see Sec. I B) necessary and the number of qubits required for the computation of a given Boolean function. Already in this limited framework, the classification of Boolean functions under these resources points towards a rich structure beyond the classical paradigm. We summarise our main results and provide an overview to the structure of the paper in Sec. I C.
A. The setting In this section, we define our restricted framework of MBQC. A MBQC consists of a correlated quantum resource state, and a control computer with restricted computational power. The quantum resource state arXiv:2203.09965v1 [quant-ph] 18 Mar 2022 consists of N local subsystems-or parties-each of which consists of a qubit and measurement device that exchanges classical information with the control computer once. The control computer is responsible for selecting the measurement settings for each local subsystem, and for processing the measurement outcomes into useful computational output. Importantly, the power of the control computer is limited: we consider control computers that can only compute linear functions, and as such are not even classically universal. 1 This notion of MBQC is known as l2-MBQC (where the l2 stands for mod-2 linear side-processing) and is based on the model of Anders and Browne [21]. The following definition is based on Refs. [13,22]. (See Ref. [8] for a more general notion of MBQC.) Definition 1. A l2-MBQC with classical input i ∈ Z n 2 and classical output o ∈ Z 2 consists of N qubit subsystems, jointly prepared in the state ψ⟩, each of which receives an input c k (i) ∈ Z 2 from the control computer, performs a measurement M k (c k (i)), and returns a measurement outcome m k ∈ Z 2 , for k = 1, . . . , N . 2 The inputs and computational output satisfy the following conditions: for some T ∈ Mat(N × N, Z 2 ) and P ∈ Mat(N × n, Z 2 ).
3. For a suitable ordering of the parties 1, . . . , N the matrix T in Eq. (1) is lower triangular with vanishing diagonal. If T = 0 the l2-MBQC is called non-adaptive.  [13]. For each qubit (indexed by k) of the resource state ψ⟩, the control computer determines the measurement settings c k as a linear function of the inputs i ∈ Z n 2 and any previous measurement outcomes m1, . . . , m k−1 . The output o ∈ Z2 is evaluated by the control computer as the parity of the measurement outcomes.
more flexible restrictions on adaptivity can still lead to interesting classes of algorithms such as shallow circuits in [16]. We briefly discuss the adaptive case in App. H. Finally, we note that Def. 1 is readily generalised to qudit systems, but requires care in the definitions of the higher-dimensional measurements allowed within the framework. Many of our results generalise to qudit systems of prime dimension, yet additional technicalities arise; to simplify presentation we only consider the qubit case in the main body of the text.

B. The stabiliser subtheory
We denote the group of Pauli operators on N qubits as P N . Throughout, we label the local computational basis states as q⟩ for q ∈ {0, 1}. An important class of operators is given by the Clifford hierarchy.
Definition 2. The Clifford hierarchy on N qubits is defined recursively by setting C 1 N = P N , and letting the k'th level C k N be given by Notably, the second level C 2 N is the normaliser of the Pauli group and is known as the Clifford group. Any state that can be obtained by applying a gate from the Clifford group to a computational basis state is known as a stabiliser state. Note that in the setting of the Clifford hierarchy, it is natural to model the classical control in Def. 1 in the form of unitary conjugation on some fiducial measurement setting. Definition 3. We say a MBQC belongs to level-D if the local measurement settings are of the form of where M k (0) ∈ P 1 is some fiducial measurement setting, U k (c k ) ∈ C D 1 , and where the resource state is a stabiliser state.
When the l2-MBQC belongs to level-2, the MBQC belongs to the stabiliser subtheory, and is classically efficiently simulable by the Gottesman-Knill theorem [24,25]. Level-3 MBQCs are universal for quantum computation (in the adaptive case), with the scheme based on cluster states [19] being a well known example. The restriction on resource states being stabiliser states is without loss of generality -one can additionally allow resource states that are obtained by applying a D'th level gate to a stabiliser state, in close analogy with the paradigm of stabiliser quantum computing supplemented by magic state injection.
In the context of MBQC, it is convenient to express the output of the computation in terms of a polynomial. Namely, every Boolean function f ∶ Z n 2 → Z 2 is given by a polynomial from the ring Z 2 [x 1 , . . . , x n ] in n variables x 1 , . . . , x n ∈ Z 2 . This representation is known as the algebraic normal form.

C. Summary of results
In this paper, we study the computability of Boolean functions in non-adaptive l2-MBQC under various resource constraints. Below, we summarize our main results, and outline the structure of the rest of the paper.
Contextuality. We begin by recalling that any Boolean function f ∶ Z n 2 → Z 2 can be computed within non-adaptive, deterministic l2-MBQC [23] (see Thm. 2 in Sec. II). In the classical setting, only linear functions are computable. Thus, nonlinearity indicates the presence of quantumness in the form of contextuality [13,22]. The proof of this result relies on operators outside the Clifford group, i.e., outside the second level in the Clifford hierarchy; moreover, it generally requires an exponential (in the degree of f , expressed as a polynomial) number of qubits. This suggests a finer classification in terms of the Clifford hierarchy, which we present in Sec. III, and the number of qubits ('qubit count') required to implement a given Boolean function in the non-adaptive case, presented in Sec. IV. 3 A natural starting point for these considerations is the stabiliser sub-theory, where resource states are stabiliser states and operators are restricted to the second level in the Clifford hierarchy.
Stabiliser theory. In the case of l2-MBQCs belonging to level-2 (i.e., stabiliser MBQCs), we show the computable functions (in non-adaptive MBQC) to be heavily restricted: in the deterministic case, only quadratic functions can be computed (see Thm. 3), while in the probabilistic case, the success probability (see Def. 4) to compute a given Boolean function is bounded by its non-quadraticity (see Def. 5), i.e., the Hamming distance to the nearest quadratic function (see Thm. 4). These results are presented in Sec. III A.
Moreover, we find that in the deterministic case, a quadratic function can be implemented using rk(f ) + 1 qubits only, where rk(f ) denotes the rank of the matrix corresponding to the quadratic terms of f (see Thm. 6).
Clifford hierarchy. Despite being non-classical (contextual), the above mentioned results (Thm. 3 and Thm. 4) show that computation within non-adaptive stabiliser l2-MBQC is limited. 4 A natural way to extend the stabiliser case is via the Clifford hierarchy. In Sec. III B, we consider what non-Clifford resources are required to implement a given Boolean function within l2-MBQC. The main result of this section, Thm. 5 shows that operations from the D'th level in the Clifford hierarchy are required whenever a non-adaptive, deterministic l2-MBQC computes a polynomial of degree D.
Qubit count. While we can compute the minimal number of qubits in the stabiliser case, i.e., for quadratic functions (see Thm. 6 in Sec. IV A), generalizing this result beyond the stabiliser case is challenging. In Sec. IV B, we consider an approach based on GHZ states, which (by the proof of Thm. 2) provide a universal resource for function computation in non-adaptive, deterministic l2-MBQC. 5 We characterise the number of qubits required to compute an arbitrary Boolean function in terms of the minimal number of Fourier components (see Thm. 7). Similar optimisation problems arise in circuit synthesis [27][28][29][30][31].
In addition, we employ the discrete Fourier transform to obtain upper bounds on the qubit count for certain highly symmetric functions, which turn out to be optimal in some cases, e.g. for δ-functions Cor. 2. As an immediate consequence, we conclude that the number of qubits required to implement a Boolean function f in non-adaptive, deterministic l2-MBQC is far from monotonic in the degree of f (see Cor. 3), thus further hinting at a rich substructure of contextuality beyond the results in Refs. [7,13].
Finally, we discuss possible avenues towards related and future research in Sec. V.

II. EVERY BOOLEAN FUNCTION HAS A REPRESENTATION AS CONTEXTUAL MBQC
In this section we prove Theorem 2, that non-adaptive l2-MBQC is complete. That is, for any function f ∶ Z n 2 → Z 2 there exists an l2-MBQC with output function o(i) = f (i) for all inputs i ∈ Z n 2 . This is in sharp contrast to the classical regime, which is restricted to linearity-nonlinear computation is an indicator of quantum contextuality [13,22]. The proof strategy is to first construct l2-MBQCs that compute the n-dimensional δ-function. Linearly composing the output of many such parallel l2-MBQCs can then be used to compute any function. In fact, our proof is easily generalised to qudits of prime dimension (see App. C).
We begin by defining the resource state and the measurement operators relevant for this construction. We take the resource state to be given by the N -qubit GHZ state This is a mild restriction, since the GHZ state in Eq. (4) will prove to be a universal resource for non-adaptive, deterministic l2-MBQC in Thm. 2 below (see also [23,32]). More generally, in Sec. III we will define a hierarchy for l2-MBQC by restricting the allowed operations to certain levels in the Clifford hierarchy and the resource state to a stabiliser state (see Def. 3). Note also that the GHZ state is a stabiliser state. Finally, in Sec. IV we will analyse the qubit count for l2-MBQC with a GHZ resource state. Next, recall from Def. 1 that each party performs one of two measurements M k (c k ) determined by a single input c k ∈ Z 2 . Moreover, we require that M k has (non-degenerate) eigenvalues (−1) q , q ∈ Z 2 , i.e., M 2 k = 1. We define the following canonical measurement operators where θ = e iπϑ . In matrix (gate) representation, these operators take the form 4 Note that for d odd prime, the stabiliser formalism is in fact non-contextual [26]. At least in this case, we can take it as the lowest level of such a hierarchy. 5 Note however, that GHZ states are not universal for MBQC in general.
The inputs c k to the measurement devices thus specify M k (c k ) = X k (θ(c k )) and are themselves determined in a linear way from the computational input i ∈ Z n 2 and other measurement outcomes m k ∈ Z 2 according to the general setup in Def. 1. (Note that in the non-adaptive case, c k = c k (i) is a linear functions of the inputs only.) The output function of the l2-MBQC, o(i) = ⊕ N k=1 m k , arises as the parity of the individual measurement outcomes on local qubits. The resource state ψ⟩ is a +1-parity eigenstate of the operator ⊗ N k=1 X k (0). On the other hand, we can easily construct operators for which ψ⟩ is a (−1)-parity eigenstate. For instance, consider the prototypical Anders-Browne 3-qubit example, where M k (0) = X k (0) = X k and M k (1) = X k ( √ −1) = Y k . Note that this choice of local measurements solves the following set of linear equations In fact, this example is representative of the general case. More precisely, for deterministic l2-MBQC the computation can be expressed in terms of the phase parameters in the local measurement operators of Eq. (5).
Theorem 1. In every non-adaptive, deterministic l2-MBQC with a GHZ resource state, the output function o ∶ Z n 2 → Z 2 arises from the phase relations between local measurement operators in Eq. (5), Proof. We give the proof in App. A.
Finding an implementation to compute o as a l2-MBQC thus reduces to finding a set of (linear) functions c k , which satisfies the required parity conditions in Eq. (7).
We first construct an l2-MBQC that computes the n-dimensional δ-function δ ∶ Z n 2 → Z 2 defined by We remark that the δ function is an important and ubiquitous function -up to linear pre-and post-processing it is equivalent to the n-bit AND function. We have the following lemma. Proof. We prove this in App. B by giving an explicit measurement scheme acting on a GHZ state.
We remark that a similar result has previously been obtained in Ref. [23]. Here, we gave a constructive proof in terms of the operators in Eq. (6). Moreover, our technique generalises to qudits of prime dimension (for details, see App. C).
In particular, we note that Lm. 1 recovers the main example of Anders and Browne [21] (up to linear side-processing) for n = 2 with The n-dimensional δ-function along with linear side-processing is sufficient to allow for the evaluation of arbitrary functions. In particular, one can decompose any function into a linear combination of delta functions, each of which admits an l2-MBQC. The outputs of these l2-MBQCs can be linearly combined to give the desired output, as in the following theorem.

Theorem 2.
For any Boolean function f ∶ Z n 2 → Z 2 there exists a non-adaptive l2-MBQC that deterministically evaluates it.
Proof. This follows directly from Lm. 1 and the fact that every function can be written as a sum of δ-functions The number of qubits in the implementation of the δ-function is N = 2 n − 1, which is optimal (see Ref. [23]). We explore the question of optimality for arbitrary Boolean functions in more detail in Sec. IV, as well as other resource aspects related with l2-MBQC.

III. BOOLEAN FUNCTIONS AS MBQC -(DEPENDENCE ON) CLIFFORD HIERARCHY
While any Boolean function can be computed using l2-MBQC, the type of measurements required above depended on the complexity (e.g. the degree) of the polynomial representing the Boolean function. In this section, we study the implementation of Boolean functions in l2-MBQC restricted to the stabiliser subtheory where only Pauli operators can be measured. In the deterministic, non-adaptive case such l2-MBQCs admit a simple description, namely the entire computation can be expressed as a set of eigenvalue equations that relate the inputs and outputs of the computation as follows: where ω = e 2πi 2 = −1 is a square root of unity. In Sec. III A we prove that any quadratic Boolean function can be computed within the stabiliser formalism. Conversely, any non-quadratic function requires gates from higher levels in the Clifford hierarchy. In fact, the complexity of a Boolean function in l2-MBQC relates to local phases via the discrete Fourier transform (see Sec. III B 1), which in turn puts a bound on the necessary level in the Clifford hierarchy. We make this precise in Sec. III B 2.

A. Quadratic Boolean functions and stabiliser formalism
The qubit stabiliser formalism is contextual. For instance, the prototypical Anders-Browne NAND-gate computes a quadratic Boolean function. It is natural to ask whether stabiliser l2-MBQC can realise any polynomial f ∶ Z n 2 → Z 2 . However, this is not the case. In fact, non-adaptive, deterministic stabiliser MBQC is limited to quadratic Boolean functions.
Proof. We give the proof in App. D For the probabilistic case, we need two additional concepts: the success probability for a MBQC and the non-quadraticity of a Boolean function.
Definition 4 (success probability). Let f ∶ Z n 2 → Z 2 be a Boolean function, and let A be a MBQC, which implements f with probability p(i) on inputs i ∈ Z n 2 . We define the average success probability by P succ = ∑ i∈Z n 2 p(i) 2 n . Assume that a deterministic MBQC implements a Boolean function g ∶ Z n 2 → Z 2 , then the success probability } denotes the Hamming distance between f and g. Clearly, P succ = 1 if and only if f = g. In order to compute the success probability for general functions, we measure how far it is from being quadratic (see e.g. [33]).
Definition 5 (non-quadraticity). Let f ∶ Z n 2 → Z 2 be a Boolean function. Then the non-quadraticity of f is given by It then follows as a corollary of Thm. 3 that Corollary 1. Let f ∶ Z n 2 → Z 2 be an arbitrary Boolean function. The maximum success probability of computing this function in non-adaptive, deterministic, level-2 (i.e., stabiliser) l2-MBQC is Proof. The proof of this simply follows by noting that Thm. 3 entails the MBQC must compute some quadratic function q with success probability 1 − d H (f, q). The maximum success probability is achieved by choosing q to minimise the Hamming distance d H , which is the non-quadraticity of f .
In general, a non-adaptive, level-2 l2-MBQC does not yield deterministic outputs. Still, Cor. 1 remains true also in the probabilistic case. In other words, when restricted to stabiliser measurements (and stabiliser states), the best approximation to a given Boolean function is always achieved with a deterministic l2-MBQC.
Theorem 4. Let f ∶ Z n 2 → Z 2 be an arbitrary Boolean function. The maximum success probability of computing f in (probabilistic) non-adaptive, level-2 (i.e., stabiliser) l2-MBQC is Proof. We give the proof in App. E.
In particular, this says that if f is not quadratic then the success probability will be less than one, and we cannot demonstrate 'strong' non-locality (contextuality) for this function. As a concrete case study, consider Example 2 in Ref. [34] that is an 8-bit input Boolean function with N Q(f ) = 68. This entails an optimal success probability of P succ = 47 64 ∼ 0.734375.
Note also that the bound in Thm. 4 is strict since for the stabiliser formalism deterministic strategies are always optimal. However, it is not clear whether this is always the case. In particular, a similar problem arises from the well-known CHSH inequality. While quantum correlations violate the classical bound, they cannot win the related CHSH non-local game with certainty. This is different to the problem studied here, where the restriction is not on the number of qubits involved but on the level in the Clifford hierarchy of the gates used in Eq. (3). Nevertheless, this example shows that the MBQC which best approximates a given Boolean function need not be a deterministic one.

B. Beyond quadratic functions
Thm. 3 shows that in the non-adaptive case, non-Clifford operations are required to evaluate general (nonquadratic) Boolean functions f . In this section, we establish the necessity of operations belonging to higher levels in the Clifford hierarchy depending on the degree of f .

Polynomial vs Z2-linear representation of Boolean functions
We first introduce some tools to allow us to map between different representations of Boolean functions in l2-MBQC. In particular, we introduce the Z 2 -linear representation of a Boolean function, in addition to its polynomial representation. We show how to map between these representations using the discrete Fourier transform. This will be useful for this section and the following. (See also Ref. [35] for more details on Boolean function analysis.) The polynomial representation of computational output is one useful way of characterising l2-MBQCs, as the polynomial degree places important constraints on the resources required. In order to characterise the optimal implementation of a given l2-MBQC, we consider another representation known as the Z 2 -linear function representation. Any Boolean function f ∶ Z n 2 → Z 2 can be written in the following two ways, up to an additive constant, where C a ∈ R, D b ∈ Z 2 for all a, b ∈ Z n 2 , and ⊕ denotes addition modulo 2. We focus on the first representation in terms of Z 2 -linear functions. In particular, we define the Z 2 -linear basis functions φ a ∶= ⊕ n j=1 a j x j , and monomial basis functions Both sets of functions {φ a a ∈ Z n 2 } and {π b b ∈ Z n 2 } are each linearly independent and generate the space of Boolean functions on bit strings x ∈ Z n 2 , as will be shown below. As such, we can determine the corresponding transformation map between the coefficients C a , D b . By Eq. (4) in Ref. [23], every Z 2 -linear function can be written in terms of monomials, Following this, it is easy to see that we can write a given Z 2 -linear basis function φ a as where we have defined the set aZ n 2 = {(a 1 b 1 , . . . , a n b n ) ∈ Z n 2 ∀b i ∈ Z 2 }. More generally, we define the symmetric product, This defines a linear map F ∶ R 2 n → R 2 n with matrix coefficients F π b φa ∶= ⟨π b , φ a ⟩. 6 From Eq. (16) it follows that F φaπ b = ±1 and given that F has full rank (as a basis change) it has an inverse. In fact, for fixed dimension n and with appropriate normalisation factor N = 2 − n 2 , F becomes a Hadamard transform and is thus in particular orthogonal, hence, This generalises Eq. (14) and provides an explicit translation between the two representations of Boolean functions underlying Eq. (7). More In particular, we emphasise that the local phases ϑ k in θ k ∶= e πiϑ k from Eq. (7) simply correspond to the coefficients C a under the mapping F −1 applied to the output function of the l2-MBQC (in its polynomial representation). We will apply this transformation explicitly in a number of examples in Sec. IV B below.

Necessity of non-Clifford operations
We utilise a characterisation of the Clifford hierarchy due to Zeng et. al. [36]. We define a set of operations known as semi-Clifford operations [36,37].
Definition 6 (semi-Clifford hierarchy). We say a gate U ∈ C k N is a k-th level semi-Clifford gate (on N qubits) if U = C 1 DC 2 where C 1 , C 2 ∈ C 2 N are Clifford gates, and D ∈ C k N is diagonal. We label the set of k-th level semi-Clifford gates (on N -qubits) as SC k N .
In other words, gates in the semi-Clifford hierarchy are those that are diagonal up to Clifford operations. Note in the above that D ∈ C k N necessarily, as for any U ∈ C k N one can verify that Theorem 5. For a non-adaptive, deterministic l2-MBQC that belongs to level-D in the Clifford hierarchy, only polynomials of degree at most D can be computed.
Proof. We give the proof in App. F.
This theorem can be viewed as a generalisation of Thm. 3. If a non-adaptive l2-MBQC belonging to some level in the Clifford hierarchy computes a polynomial of degree D, then it at least belongs to level-D in the Clifford hierarchy. Moreover, this bound is tight, as it is saturated by the delta function construction in Lm. 1.
We remark that the analogous problem for qudits is open. In our argument we used the fact that the semi-Clifford hierarchy is equal to the Clifford hierarchy for single qubits, SC k 1 = C k 1 , which has not been shown to hold for general qudits (see Ref. [38] for a more comprehensive discussion). For prime qudits it is conjectured that all Clifford hierarchy gates are semi-Clifford, and has been proven true for the third-level gates [38]. We also remark that certain gates do not belong to any finite level in the Clifford hierarchy. For qubits, an example is the square root of the Hadamard,

IV. BOOLEAN FUNCTIONS AS MBQC -(DEPENDENCE ON) QUBIT COUNT
In this section, we ask for the minimal number of qubits, also known as qubit count, needed to implement a Boolean function f ∶ Z n 2 → Z 2 in non-adaptive, deterministic l2-MBQC. Definition 7. Let f ∶ Z n 2 → Z 2 . We call a non-adaptive l2-MBQC which deterministically implements f optimal, if no other non-adaptive l2-MBQC exists which deterministically implements f on fewer qubits. The minimal number of qubits over all possible resource states is denoted by R(f ), while R GHZ (f ) denotes the minimal number of qubits when restricted to the n-qubit GHZ state in Eq (4).
Note first that we have the freedom to manipulate f by any invertible linear transformation on the inputs via pre-processing P . The resource cost R should therefore be an invariant under affine transformations. We thus define an equivalence relation on all functions with signature f ∶ Z n 2 → Z 2 under affine transformations as follows, Furthermore, in Sec. II we have seen how the n-dimensional δ-function can be implemented as a non-adaptive l2-MBQC on N = 2 n − 1 qubits. 7 Hence, given an arbitrary Boolean function f ∶ Z n 2 → Z 2 , one way to implement it is by naively adding all terms in the sum f (i) = ∑ j∈Z n 2 f j δ(i − j) with f j ∈ Z 2 for all i ∈ Z n 2 . However, the minimal number of qubits is only subadditive in this as well as its polynomial representation. To see this, we again consider the stabiliser case first.

A. Qubit count in stabilzer l2-MBQC
Recall that only quadratic functions can be computed with high probability using stabiliser l2-MBQCs. We now find the minimal number of qubits to do so. Consider a quadratic Boolean function and define a symmetric matrix Q(f ) such that Q i,i = 0 and Q i,j = Q j,i = q i,j . We denote by rk(f ) the Z 2 -rank of Q.
Theorem 6. Let f ∶ Z n 2 → Z 2 be a quadratic Boolean function. Let f be expressed as Then f can be implemented as a non-adaptive, deterministic, level-2 (i.e., stabiliser) l2-MBQC on R(f ) = rk(f ) + 1 qubits, where rk(f ) is the Z 2 -rank of the symmetric matrix Q(f ).
Proof. We give the proof in App. G.
Thm. 6 replicates the Anders-Browne result as a special case, where o(i 1 , This is a rank 2 matrix and so the theorem says it can be computed using 3 qubits. Note that Thm. 6 suggests another resource measure: by Thm. 3, within the stabiliser formalism only quadratic functions can be computed; in fact, they can be computed efficiently in the number of qubits. Unfortunately, as a consequence of Thm. 3 we cannot use arguments based on stabilisers (as in the proof of Thm. 6) to understand the number of qubits as a resource also in the general case. Instead, in the next section we will apply the Fourier transform between the polynomial and Z 2 -linear representation of Boolean functions to obtain a lower bound on the number of qubits for non-adaptive, deterministic l2-MBQCs with a GHZ resource state. 8 This turns out to be a hard problem in general, yet we show how to reproduce the bound in Thm. 6, as well as other known bounds for R obtained in previous sections. 7 Note that this is the same scaling behaviour as for the n-dimensional AND(i) = ∏ n j=1 i j , which is optimal by Ref. [23]. 8 Recall that by Thm. 2 GHZ-states are universal for the computation of Boolean functions in non-adaptive, deterministic l2-MBQC.
B. Qubit count in l2-MBQC using GHZ states By comparison with optimal bounds for Bell inequalities, finding the optimal l2-MBQC implementing a given Boolean function is likely a difficult problem. Here, we approach this problem by fixing the resource state to be a GHZ state, which we found to be universal for non-adaptive, deterministic l2-MBQC in Thm. 2. We will also make use of the discrete Fourier transform defined in Eq. (17).
More precisely, let f = ∑ a∈Z n 2 C a φ a be a Boolean function, which is implemented (in terms of the output function) of a non-adaptive, deterministic l2-MBQC with a GHZ state. By Thm. 1, the coefficients C a are encoded in terms of local phases, which in turn define local measurement operators via Eq. (6). It follows that the minimal number of qubits required to implement f deterministically as a non-adaptive l2-MBQC with a GHZ state corresponds with the minimal number of terms in the Z 2 -linear representation of f .
Let f = ∑ b∈Z n 2 D b π b be the polynomial representation of f . Then we obtain a corresponding representation in terms of Z 2 -linear functions by applying the inverse discrete Fourier transform F −1 in Eq. (17). As we will see in the next sections, for monomials and other highly symmetric functions this representation is already minimal in the number of non-zero coefficients in its Z 2 -linear representation, and thus in the number of qubits in the implementation as l2-MBQC. However, for more general Boolean functions this is no longer the case. The reason is that we may change the representation of f in terms of Z 2 -linear functions, as long as f describes the same Boolean function. To give an example, the minimal number of Z 2 -linear terms of the given by adding the optimal representations of the Boolean functions i 1 i 2 and i 3 i 4 .
More generally, let f ∶ Z n 2 → Z 2 be a Boolean function and define the linear span of zero polynomials In addition to the linear equivalence relation in Eq. (18), we have the following characterisation. Proof. From the above discussion, we know that the minimal number of qubits to implement f as a nonadaptive, deterministic l2-MBQC with a GHZ state corresponds to the minimal number of terms in the Z 2 -linear representation of f . Recall that F ∶ R 2 n → R 2 n in Eq. (17) is an orthogonal linear map, in particular, it has full rank. It follows that ∑ a C a F(φ a ) = F(∑ a C a φ a ) = 0 for C a ∈ R implies C a = 0 for all a ∈ Z n 2 . Now let f = ∑ a C a φ a = ∑ a C ′ a φ a such that F(∑ a C a φ a ) = F(∑ a C ′ a φ a ) (mod 2). It follows that F(∑ a C a φ a ) = F(∑ a C ′ a φ a ) + z for some z ∈ R 2 n with z = 0 (mod 2). Since {π b } b∈Z n 2 is a basis of R 2 n , we conclude that Consequently, the optimal implementation of f is given by minimising the number of terms in the Z 2 -linear representation of F −1 (f + z) over all z ∈ Z(f ). 9 The ambiguity in the Z 2 -linear representation of Boolean functions makes computing the qubit count in non-adaptive, deterministic l2-MBQC a complex task in general. Since the number of terms in Eq. (22) grows doubly exponentially with n, a brute force search is generally infeasible. Moreover, the existence of a general solution as in the case of quadratic functions within stabiliser l2-MBQC via Thm. 3 seems unlikely by comparison with similar problems in circuit synthesis. For instance, the minimal number of T -gates can be related to minimal number of mod-2 linear functions with odd coefficients. Solving the latter relates to minimum distance decoding in punctured Reed-Muller codes which is hard in general [27,28].
Nevertheless, for the δ-function as well as some highly symmetric functions we can use Thm. 7, together with the discrete Fourier transform in Eq. (17), to obtain at least an estimate on the qubit count.
Example 1: n-dimensional δ-function Given a general output function in its polynomial representation o(i) we may use F −1 to obtain its representation in terms of Z 2 -linear basis functions and thus study its scaling behaviour. For monomials this decomposition is optimal with respect to minimising necessary Z 2 -linear terms.

Corollary 2. In order to implement the monomial
x j in non-adaptive, deterministic l2-MBQC with a GHZ resource state one requires no fewer than N = 2 n − 1 qubits, i.e., R GHZ (f ) = N .
Proof. Note that f has degree deg(f ) = n = W (b) for b = (1) n ∶= (1, ⋯, 1) ∈ Z n 2 , hence, by Eq. (17) it has coefficient Explicitly, the coefficients in the Z 2 -linear representation under the transformation F −1 read: Since these terms are all odd multiples of 1 2 W (b)−1 , they can only be reduced by a zero term of degree at least n, however, there are no such terms in Z(f ), hence, the representation in terms of Z 2 -linear functions under the transformation F −1 is already optimal. Finally, note that the overlap with φ a , a = 0 can be implemented by post-processing, leaving N = 2 n − 1 non-zero terms.

Example 2: elementary symmetric functions
While for monomials the transformation in Eq. (17) is already optimal in the number of non-zero coefficients (and thus in the number of qubits in the implementation as non-adaptive, deterministic l2-MBQC with a GHZ resource state), this is no longer the case for more general polynomials. Nevertheless, for certain symmetric functions the minimisation problem in Thm. 7 under the equivalence relation in Eq. (22) simplifies.
As an example we consider elementary symmetric functions, Plugging Σ n k into the inverse transformation in Eq. (17) results in a total number of terms equal to ∑ k l=1 n l . It turns out that we can minimise this number by (at least) n k − 1 as follows. We add the zero polynomial z ∈ Z(Σ n k ) given by By construction, F −1 (Σ n k ) and F −1 (z) have the same (smallest) coefficient 1 2 k−1 , and we can thus compare the coefficients in their representation based on Z 2 -linear functions φ a , a ∈ Z n 2 . Clearly, F −1 (Σ n k + z) contains the term x 1 ⊕ ⋯ ⊕ x n and thus C Hence, with respect to monomials of degree k ≤ m in Σ n k + z, we have reduced the overall number of non-zero coefficients by n k − 1. Note also that the coefficients of the remaining monomials of degree 1 ≤ m < k are non-zero since there, the above sum is truncated and reads thus leaving a total of ∑ k−1 l=1 n l + 1 terms in the Z 2 -linear representation, hence, R GHZ (Σ n k ) ≤ ∑ k−1 l=1 n l + 1. Note also that: (i) R GHZ (Σ n 2 ) = n 1 + 1 = n + 1 confirms Thm. 6, since Σ n 2 is quadratic with rk(Σ n 2 ) = n (see also Prop. 2 in Ref. [23]), and (ii) R GHZ (Σ n n ) = ∑ n−1 l=1 n l +1 = 2 n −1 reproduces the minimal number of qubits within l2-MBQC for monomials in Cor. 2 (see also Prop. 1 in [23]). Comparing the latter, we draw the following conclusion from the above classification.
Proof. This follows immediately by comparing the linear scaling (in the number of qubits) of quadratic Boolean functions according to Thm. 6 with the exponential scaling of the symmetric function Σ n n and the n-qubit δ- In summary, we find that-unlike the contextuality threshold in Ref. [13] and the close correspondence with the Clifford hierarchy in Thm. 5-the degree is not sufficient to compare Boolean functions with respect to their optimal representation in non-adaptive, deterministic l2-MBQC with a GHZ resource state. The computational classification of the latter therefore possesses a rich substructure beyond the non-contextual case.

V. DISCUSSION
We have assessed the ability to compute Boolean functions in non-adaptive, deterministic l2-MBQC under various resource restrictions. We have considered the computational power of stabiliser l2-MBQC, as well as l2-MBQC involving operations from higher levels in the Clifford hierarchy. We find that stabiliser l2-MBQCs can only compute quadratic functions with high probability (with the Anders and Browne example [21] being a prototypical example), while higher degree polynomials require operations from increasing levels in the Clifford hierarchy. In this way, we obtain a hierarchy of resources for non-adaptive, deterministic l2-MBQC beyond contextuality in [22].
In addition to the necessity of certain quantum operations in l2-MBQC for evaluating Boolean functions, we posed the resource-theoretic problem of determining the minimal number of qubits needed to implement a given Boolean function within non-adaptive, deterministic l2-MBQC. Clearly, this is an important and often limiting resource for near-term quantum devices. We characterise this problem by focusing on GHZ resource states and find that it too reveals a complex substructure to contextuality. At the heart of this is the (quantum Fourier) transformation mapping between two different representations of a Boolean function, as polynomial and as a Z 2 -linear sum. Interestingly, our characterisation closely resembles known hard problems in circuit synthesis and minimal distance coding in punctured Reed-Muller codes [27], suggesting that finding the minimal number of qubits is hard in general. Nevertheless, in certain cases the sharp bound can be found, such as for quadratic functions within stabiliser l2-MBQC.
Finally, we comment on some close connections and extensions of our results. Adaptivity. The motivation for our setting was based on the recent results for shallow circuits, which constitute the first proof of a quantum-classical gap [16]. For this class of circuits, a constant depth circuit of one and two qubit gates is performed -that depends on the classical input bit string -followed by a measurement in the computational basis. Conversely, we consider a fixed unitary circuit (i.e., the resource state preparation), followed by a measurement that depends on the input bit string. This simplifies the analysis and allows us to derive strong bounds on resources in this scheme, but the same reasoning can also be applied in the adaptive case. As outlined in more detail in App. H, within the latter the exponential scaling in qubit count, along with the necessity of non-Clifford gates for certain functions in the non-adaptive case quickly collapse. Nevertheless, one can sometimes trade off between space and time resources such as in [16]. We hope that the non-adaptive case can be leveraged to understand resource costs for more general adaptive computations.
Magic, contextuality, and cohomology. Both magic and contextuality can be classified by cohomology. In the former case, certain gates in the D'th level in the Clifford hierarchy C D N on N qubits can be classified by elements of the group cohomology H D (Z N 2 , U (1)), following for example Ref. [39], while in the latter case, group cohomology also appears as a classifier for certain proofs of contextuality [7,8,40,41]. As both magic and contextuality appear as resources for quantum computation, it is tempting to construct a unified framework for resource theories based on cohomology.
Recently, the role of magic in certain many-body systems known as symmetry-protected topological (SPT) phases 10 has been studied [43][44][45], whereby all states within a phase of matter possess magic. Such SPT phases have also been identified as resources for MBQC [46][47][48][49][50][51]. It would be interesting to study the role of many-body magic for computational universality, particularly with the example of Ref. [48], which is universal with only Pauli measurements. Further, it would be interesting to consider the role of contextuality in the fault-tolerant setting -particularly fault-tolerant MBQC [17,[52][53][54][55][56] -where non-Clifford operations require vastly more resources than non-Clifford operations (and indeed is the motivation for considering magic as a resource in the present setting). the N -qubit GHZ resource state in Eq. (4) in terms eigenstates of the local measurement bases thus yields where we defined (−1) o ′ (i) = e −iπqc k (i)ϑ k and we used that ψ⟩ is an eigenstate of the global measurement operators M (i) = ⊗ N k=1 M k (c k (i)). Finally, since the output function of the non-adaptive, deterministic l2- We are left to show that every local measurement operator is of the form in Eq. (6). To see this, note that the global measurement operators M (i) = ⊗ N k=1 M k (c k (i)) are such that ψ⟩ is a parity eigenstate of M (i) for all inputs i ∈ Z n 2 . For every i ∈ Z n 2 , rewrite ψ⟩ in the local eigenbases corresponding to the M k (c k (i)). This yields a superposition of product states m⟩ ϕ,ϑ = ⊗ N k=1 m k ⟩ ϕ,ϑ , where we again denote every product state by the Boolean vector m ∈ Z N 2 such that 0⟩ ϕ,ϑ = sin(ϕ) 0⟩ + e πiϑ cos(ϕ) 1⟩ 1⟩ ϕ,ϑ = cos(ϕ) 0⟩ − e πiϑ sin(ϕ) 1⟩ .
In particular, note that m⟩ ϑ = m⟩ π 4 ,ϑ . Clearly, the product state m⟩ ϕ,ϑ has parity m ∶= ⊕ N k=1 m k . Moreover, the coefficient to the product state m⟩ ϕ,ϑ reads ϕ,ϑ ⟨m ψ⟩ = where we defined Φ 0 (ϕ k ) = sin(ϕ k ) and Φ 1 (ϕ k ) = cos(ϕ k ), and the two summands correspond to the inner product between the two summands in ψ⟩ = 1 √ 2 ( 0⟩ ⊗N + 1⟩ ⊗N ) with m⟩ ϕ,ϑ . 12 We have a parity eigenstate if ϕ,ϑ ⟨m ψ⟩ = 0 for all m with m ≠ o for some o ∈ Z 2 . We thus obtain 2 N 2 constraints from Eq. (A3), both on absolute values and phases of the form Clearly, the constraints on absolute values are satisfied for ϕ = π 4 . Moreover, for N ≥ 3 all solutions are of this form. First, for N ≥ 3 odd, consider pairs of constraints in Eq. (A3) of the same parity m = ⊕ N k=1 m k . Specifically, given any m ∈ Z N 2 and another vector arising from m by flipping all bits except the one at site k. Then we have the following pair of constraints, . For N ≠ 2 we thus again find ϕ k = π 4 , since for another pair of constraints in Eq.
. Finally, for all N > 2 we find (−1) m+1 e πi ∑ N k=1 ϑ k = 1, hence, e πi ∑ N k=1 ϑ k = (−1) m+1 = (−1) o , which recovers the first part of the proof. Consider the resource state given by the N -qubit GHZ state ψ⟩ in Eq. (4) with N = 2 n − 1, and consider the measurement procedure 0 → M (0) = X and 1 → M (1) = X(θ) = X(e iπϑ ) with measurements in Eq. (6), which we re-state here for convenience, As before, the measurement operators M k (c k (i)) = X(e iπc k (i)ϑ k ) are specified by linear functions c k ∶ Z n 2 → Z 2 . In particular, we set In other words, the qubits in ψ⟩ are indexed by vectors 0 ≠ a ∈ Z n 2 . We prove that this indeed allows us to compute the n-dimensional δ-function in Eq. (8) for a suitable ϑ k = ϑ.
First, consider the case of the input string containing exactly one non-zero entry, e.g. i T = (1, 0, ⋯, 0), and count the number of phases ϑ that we collect. As ϑ is independent of the site, this is simply the number of functions φ a that i 1 appears in. There is one function in which it appears by itself, then n − 1 functions where it appears together with another input, n−1 2 in which it appears together with two more inputs and so on. Overall, the number of functions is For inputs containing two non-zero entries, e.g., i = (1, 1, 0, ⋯, 0), we again count the number of appearances of, in this case, i 1 and i 2 . Note that only those functions φ a will contribute for which φ a (i) = 1, i.e., those that contain exactly one but not both of entries. The corresponding counting of appearances is thus given by The general case with m non-zero entries reads as follows: Hence, for all but the zero input we flip the overall parity in Eq. (7) if we set Finally, note our setup computes the function o(i) = δ(i) + 1, hence, we obtain the n-dimensional δ-function by simple post-processing.
with corresponding expressions in terms of computational basis states, We fix the resource state to be the N -qudit GHZ state for N = d n − 1, Assume that the output function o ∶ Z n d → Z d is encoded in the phase relations as follows Rewriting ψ⟩ in terms of the respective measurement bases via Eq. (C1) then yields It follows that ψ⟩ is a parity ∑ N k=1 m k = o(i) (mod d) eigenstate for all operators M (i) with i ∈ Z n d . We thus want to show that we can satisfy the phase relations in Eq. (C2) for any o ∶ Z n d → Z d by choosing suitable linear functions for the measurement settings c k . Similar to the case of Boolean functions in Sec. III B 1, we take as a basis for the space of functions f ∶ Z n d → Z d all (non-zero) linear functions of the form φ a = ⊕ n j=1 a j i j for 0 ≠ a ∈ Z n d . In analogy with the proof of Lm. 1 in App. B we again count vectors 0 ≠ a ∈ Z n d such that φ a (i) ≠ 0 for input i ∈ Z n d . First, consider a single non-zero entry, Z n d ∋ i = (i 1 , 0, ⋯, 0) and let a such that a 1 ≠ 0. There is (d − 1)-fold degeneracy resulting from changing a to a ′ such that a ′ 1 = ra 1 for some 0 ≠ r ∈ Z d and a ′ j = a j for all j > 2. This degeneracy yields a the local phase factor 13 where we set θ ∶= ∏ d−1 c=0 θ(c). Furthermore, the number of functions φ a with a 1 ≠ 0 counts ∑ n−1 k=0 n−1 k (d − 1) k = d n−1 , hence, the overall phase factor in Eq. (C2) reads φ(q) d n−1 . Next we consider an input with two non-zero entries, e.g., i = (i 1 , i 2 , 0, ⋯, 0). We need to be more careful about the counting in this case as in contrast to case Z 2 , where i 1 ⊕ i 2 = 0 for i 1 , i 2 ≠ 0, this does not hold in Z d . For functions φ a with non-zero coefficients a 1 , a 2 ≠ 0, we instead need to count how many combinations a 1 i 1 +a 2 i 2 ≠ 0 (mod d) for any i 1 , i 2 ≠ 0 fixed. It is not hard to see that there are (d−1) 2 −(d−1) = (d−1)(d−2) non-trivial combinations, hence, we end up with the following global phase factor in Eq. (C2), The first two factors count functions φ a where either a 1 = 0 or a 2 = 0. The third arises from functions φ a with both a 1 , a 2 ≠ 0, out of which there are ((d − 1)(d − 2)) d n−2 (and where by symmetry we can always group (d − 1) together to obtain the phase φ(q) from Eq. (C3)). This argument generalises to inputs i ∈ Z n d with m non-zero entries. Note first that the number of non-zero linear combinations in φ a = ⊕ n j=1 a j i j with W (a) = k, denoted by g(k), is given by, Now there are d n−m functions for every function that contains at least one a k ≠ 0 and for each of those we have the contribution, In here, the first factor (d − 1) will result in the phase φ(q) from Eq. (C3) and we thus again obtain the global phase, Finally, we relate this global phase factor to the local phases θ(c) and χ. Since, we need to choose θ(c) Next, we insert Eq. (C5) into Eq. (C3) and compute the global phase factors, We may thus set χ − d n−1 (d−1)

2
= ω from which it follows that (χ − d n−1 (d−1) 2 ) d = 1, hence, φ(q) d n−1 = ω q . We obtain the following output function, from which we compute δ(i) = (d − 1)o(i) + 1 by simple post-processing. Finally, as in Thm. 2 the result follows since every function can be written as a sum of δ-functions, f (i) = Recall from Def. 1 that a non-adaptive, deterministic, level-2 (i.e., stabiliser) l2-MBQC is specified by the following data: P ∈ Mat(N × n, Z 2 ) is the classical, linear pre-processing; ψ⟩ is an N -qubit stabiliser resource state; and M k (c k (i)) is a single qubit Pauli operator for every c k (i) = P i, input i ∈ Z n 2 and k ∈ {1, ⋯, N }. Given a stabiliser l2-MBQC as above, note that the exact same measurement statistics are obtained if we instead rotate ψ⟩ by some local Clifford operations and conjugate the measurement settings by the inverse Clifford operations. Therefore, we can assume without loss of generality that M k (0) = X k and M k (1) = Z k . We denote M (c = P i) to be the tensor product of unitaries measured in this canonical choice.
Consider the quadratic function f (x) = ∑ n i=1 l i x i + ∑ i<j q i,j x i x j with associated matrix Q. We require If we denote by S the stabiliser of ψ⟩, this can be restated as M (0) ∈ S and (−1) f (x) M (P x) ∈ S for all 0 ≠ x ∈ Z n 2 . Under group closure of the stabiliser we have (−1) f (x) M (P x)M (0) ∈ S. Note that M (0) = X ⊗N and M (P x) will be a tensor product of X and Z operators. Therefore, the product M (P x)M (0) is a tensor product of the identity and Y operators, possibly with some extra phase. We define where we recall that W (u) ∶= {k ∈ {1, ⋯, N } u k ≠ 0} denotes the Hamming weight of u ∈ Z N 2 , and we observe that M (P x)M (0) = Q(P x). Therefore, (−1) f (x) Q(P x) ∈ S for all 0 ≠ x ∈ Z n 2 . In particular, for x = (1, 0, . . .) T and x = (0, 1, . . .) T we have (−1) l1 Q(p 1 ) ∈ S, (−1) l2 Q(p 2 ) ∈ S, where we write p j to denote the j th column of P .
We have so far checked inputs x ∈ Z n 2 with Hamming weight W (x) ≤ 2. More generally, let x ∈ Z n 2 be arbitrary such that P x = ⊕ n i=1 p i x i . For every i ∈ {1, ⋯, n} with x i = 1, we find (−1) li Q(p i ) ∈ S as before, hence, by group closure Repeated application of Eq. (D4) then yields where in the second line we have used p i .p j = q i,j from Eq. (D6). Combining Eqs. (D7) and (D8) gives (−1) ∑ n i=1 lixi+∑ i<j qi,j xixj Q(P x) = (−1) f (x) Q(P x) ∈ S.
This proves that any quadratic function can be computed within non-adaptive, deterministic, level-2 l2-MBQC.
Conversely, for any Boolean function f ∶ Z n 2 → Z 2 the above argument shows that only its quadratic part can be computed deterministically. Hence, f can be computed by a non-adaptive, deterministic, level-2 l2-MBQC if and only if f is quadratic.
Since A is deterministic over D A , by Thm. 3 it defines a quadratic Boolean functionq A ∶ Z m 2 → Z 2 on inputs in Φ(D A ). Clearly, the success probability (with respect to the different target functions f and g) is invariant under the transformation Φ (being a mere relabelling of inputs), hence, Eq. (E2) becomes In this section, we comment further on how our results change in the presence of adaptive measurements. Adaptivity is a powerful resource for many quantum computational schemes. For universal MBQC it is essential-in general, measurement bases must be chosen based on previous measurement outcomes in order to control the randomness induced by non-deterministic measurement outcomes. For many families of quantum circuits adaptivity is also essential and they may become classically simulable in its absence, see Ref. [59] for example.
By conditioning future measurements on prior measurement outcomes, qubit count and non-Clifford resource requirements can be drastically reduced. To see this, we consider a general adaptive MBQC as being composed of several non-adaptive MBQCs called components (where each component does need not to have deterministic output). The overall computation can be represented by a directed acyclic graph G called the incidence graph. Each node on the graph G corresponds to a non-adaptive component, and the directed edges correspond to the information flow required for adaptivity: the target node corresponds to the component that requires the output of the component corresponding to the source node.
The nodes of the graph G are also labelled by integers, referring to the order in which they are performed. Multiple nodes may share the same label -meaning they are performed in parallel -but the labels must strictly increase when moving along the edges. We call this list of integers the schedule S. For a MBQC with incidence graph G and schedule S, we define the depth of the computation as the largest integer in S. We define the width of the computation as the total number of qubits in all components with a common schedule index k ∈ S, maximised over all k ∈ S. The depth is how many timesteps the computation takes to perform, while the width is how many qubits are required to execute it with the prescribed schedule. Note the volume does not represent the number of qubits required to implement the MBQC. In fact, an arbitrary width w MBQC can be implemented using w qubits as not all measurements need to be executed in parallel. In general, space-time tradeoffs are possible, meaning that it may be possible to vary between the width and the depth of the MBQC. We note that shallow quantum circuits in [16] are restricted to constant depth, while non-adaptive MBQCs admit a depth-1 representation.
As a concrete example, we consider the delta function δ ∶ Z n 2 → Z 2 . As shown in Cor 2, 2 n − 1 qubits are required for its implementation in non-adaptive MBQC (i.e. width 2 n − 1 and depth 1), as well as non-Clifford gates belonging to the n-th level in the Clifford hierarchy. Using the adaptive scheme represented in Fig. 3 (left), the delta function can be implemented with width 3 (meaning only 3 qubits are required), however the depth needed is n. The volume of 3n is exponentially smaller (in n) than the non-adaptive case. Similarly, one could choose an adaptive scheme based on a binary tree, such as that depicted in Fig. 3 (right). In this case, one can use O(3n) qubits and a depth of O(log(n)) to compute the delta function. This gives a volume of O(3n log(n)).