## Abstract

We present a set of practical benchmarks for *N*-qubit arrays that economically test the fidelity of achieving multi-qubit nonclassicality. The benchmarks are measurable correlators similar to two-qubit Bell correlators, and are derived from a particular set of geometric structures from the *N*-qubit Pauli group. These structures prove the Greenberger–Horne–Zeilinger (GHZ) theorem, while the derived correlators witness genuine *N*-partite entanglement and establish a tight lower bound on the fidelity of particular stabilizer state preparations. The correlators need only *M* ≤ *N* + 1 distinct measurement settings, as opposed to the 2^{2N} − 1 settings that would normally be required to tomographically verify their associated stabilizer states. We optimize the measurements of these correlators for a physical array of qubits that can be nearest-neighbor-coupled using a circuit of controlled-*Z* gates with constant gate depth to form *N*-qubit linear cluster states. We numerically simulate the provided circuits for a realistic scenario with *N* = 3, …, 9 qubits, using ranges of *T*_{1} energy relaxation times, *T*_{2} dephasing times, and controlled-*Z* gate-fidelities consistent with Google’s 9-qubit superconducting chip. The simulations verify the tightness of the fidelity bounds and witness nonclassicality for all nine qubits, while also showing ample room for improvement in chip performance.

## Introduction

As hardware is developed to implement quantum circuits on increasing numbers of qubits, it will be valuable to have economical benchmarks of fully quantum behavior. From the outset of quantum computing it has been clear that the advantage of a quantum computer lies somewhere in its ability to readily perform tasks that are physically challenging or impossible for a classical system. Therefore, ideal hardware benchmarks should certify the ability of the hardware to generate such nonclassical behavior. Indeed, a wide variety of benchmarking techniques have been developed recently,^{1,2} including gate-fidelity benchmarks using randomized gate sequences that avoid the state-preparation and measurement errors, and state-preparation benchmarks that certify particular states while avoiding the exponential scaling of state tomography.

Despite these recent achievements, quantifying the specific nonclassical resources that lead to quantum computational advantage has remained an elusive goal.^{3} Several earlier proposals for suitable measures like entanglement,^{4,5,6,7} Bell-nonlocality,^{8,9,10,11,12,13} or quantum discord and its variations,^{14,15,16} proved to be insufficient on their own due to the discovery of algorithmic counter-examples.^{17,18,19,20,21} Recent advances suggest a strong connection between quantum advantage and contextuality,^{22,23,24,25,26} which is a general structural feature of quantum mechanics that subsumes nonlocality. The most pragmatic metric of nonclassical behavior in quantum devices, however, has been the violation of two-qubit Bell inequalities, or similar entanglement witnesses that can apply to few-qubit subsets of a multi-qubit device.^{27}

In this article, we provide a set of practical hardware benchmarks that naturally generalize two-qubit Bell inequality tests to *N* qubits, based on the Greenberger–Horne–Zeilinger (GHZ) theorem. As with Bell inequalities, our nonclassicality benchmarks use the experimental violation of a classical bound to quantify the nonclassical behavior of the circuit. Beyond quantifying nonclassicality via a bound-violation, these benchmarks also provide tight lower bounds on the fidelities with which particular stabilizer subspaces have been prepared, and thus witness genuine *N*-qubit entanglement for all states that lie within the targeted subspaces. These benchmarks are optimized for testing controllable qubit arrays with nearest-neighbor coupling. As such, we provide efficient circuits for preparing cluster states that maximally violate these benchmarks with controlled-*Z* entangling gates, using a constant gate depth of 4 (up to hardware-specific decompositions of the controlled-*Z* gate^{28,29,30,31,32,33}). Though our benchmarks efficiently verify genuine *N*-qubit entanglement using cluster states, many of the benchmarks may be applied to other stabilizer states and we expect similar benchmarks to exist for all stabilizer states.

The benchmarks we present here generalize earlier work that was experimentally tested with *N* = 3, 4 photons,^{34} where they were compared to previously proposed state-dependent methods for efficiently verifying the fidelity of particular entangled *N*-qubit preparations.^{35,36} These prior methods have already been used to verify multi-qubit entanglement in state-of-the-art experiments with 12 qubits^{37} and 18 qubits,^{38} since the exponential scaling required for traditional state tomography is increasingly prohibitive. Notably, for large *N* our GHZ-based benchmarks produce a tighter preparation-fidelity bound than these existing methods and similarly produce entanglement witnesses with better scaling.

## Results

### Nonclassicality benchmarks

Our benchmarks consist of measurable correlators that are compared to derived upper bounds; violation of these bounds characterizes nonclassicality. Each such benchmark corresponds to a specific prepare-and-measure circuit on *N*-qubits with *M* ≤ *N* + 1 different measurement settings. The *M* observables form a structure called an ID (also called an *identity product*^{39}), which is a set of mutually commuting *N*-qubit Pauli operators whose overall product is the *N*-qubit identity, up to a sign. We express an ID as an *M* × *N* table of single-qubit Pauli operators and the identity {*Z*, *X*, *Y*, *I*}, labeled *O*_{ij} with *i* = 1, …, *M* and *j* = 1, …, *N*. We also define the shortened label \(O_i = \otimes _{j = 1}^NO_{ij}\) to indicate the *N*-qubit observable obtained as the product of the *i*th row of an ID. We omit tensor product symbols for compactness.

To obtain the Bell inequality for each ID,^{34} we choose a particular eigenspace Π represented by a projector of rank 2^{N−M+1}, which is specified by the set of *N*-qubit Pauli observables {*O*_{i}} that form the *M* rows of the ID (see Figs 1 and 2), and a specific choice of their respective eigenvalues {*λ*_{i}}. We then define the *correlator* observable for this chosen eigenspace,

such that its expectation value in a state *ρ* has an upper bound of *β*_{QM} = *M*, saturated by the chosen eigenspace *ρ* = Π

For example, we could prepare the joint eigenstate of the ID of Fig. 1a, with negative eigenvalue *λ*_{1} = −1 for the three-qubit Pauli observable *O*_{1} = *YXY*, and positive eigenvalues *λ*_{2} = *λ*_{3} = *λ*_{4} = +1 for the remaining observables *O*_{2} = *YYZ*, *O*_{3} = *ZXZ*, and *O*_{4} = *ZYY*. Then, 〈*α*〉 = Tr(Π*α*) = 4, since each term in the sum becomes +1.

In the spirit of Bell,^{9,10} if one tries to explain the observed correlation by choosing a complete set of local hidden variables *v*_{Zj}, *v*_{Xj}, *v*_{Yj} ∈ {+1, −1} that predict the outcomes of the single-qubit Pauli measurements, then at least one of the terms in the correlator sum becomes −1, resulting in a smaller upper bound,

Experimental violation of this bound thus indicates nonclassicality in the form of a violation of local realism. Though the locality loophole is always open for neighboring qubits on a chip, this violation is still a useful witness for nonclassical states prepared by the chip, much like for Bell inequalities or Bell–Leggett–Garg inequalities.^{40} The derivation of this bound is reviewed in the “Methods” section.

As an independent result, maximizing the expectation value of the correlator over all biseparable quantum states in the *N*-qubit Hilbert space produces the upper bound,

which happens to coincide with the bound for local hidden variable theories. Experimental violation of the bound thus also witnesses genuine *N*-partite entanglement. In the “Methods” section, we provide the proof that the joint eigenspaces of the IDs in this article are maximally entangled, as well as the derivation of this bound.

In light of the convenient fact that *β*_{bisep} = *β*_{LHVT}, we define the *nonclassicality benchmark score* for a given physical *N*-qubit device as the experimentally determined value,

such that \({\cal{B}} \le 0\) fails to witness either entanglement or the violation of local realism, while \(0 \,{<}\, {\cal{B}} \le 1\) witnesses nonlocal *N*-partite-entangled states. The nonclassicality benchmark score thus serves as a metric of uniquely quantum behavior, with \({\cal{B}} = 1\) indicating maximum nonclassicality that saturates the correlator bound. Each *N*-qubit ID provides a benchmark corresponding to a distinct nonclassical eigenspace of an *N*-qubit physical device, and thus the hierarchy of IDs presented in Fig. 1 provides a corresponding hierarchy of benchmarks.

### Lower bounding the fidelity

The correlator also serves to bound the fidelity from below,^{34}

where *F* = Tr(*ρ*_{exp}Π) ∈ [0, 1] is the fidelity that the experimentally prepared state *ρ*_{exp} lies within the eigenspace Π stabilized by the chosen ID. We provide a general derivation of this bound in the “Methods” section. Importantly, in the limit 〈*α*〉_{exp} → *β*_{QM} = *M*, we have *F*_{ID} → 1, and thus as the fidelity of the preparation is improved, this lower bound obviates the need for full tomography of these preparations.

Taken together, the inequalities of Eqs. (3), (4) and (6) provide a practical and efficient characterization of the prepared *N*-qubit state, as well as a robust benchmark of its nonclassical behavior, using only *M* ≤ *N* + 1 measurement settings. We present minimal benchmark IDs in Fig. 1 for *N* = 3, …, 9, and detail minimal IDs up to *N* = 33 qubits in Supplementary Figs 1 through 5. These minimal IDs saturate the conjectured bound *N* ≤ (*M* − 2)(*M* − 1)/2. We also present a family of maximal benchmark IDs in Fig. 2 for all *N* ≥ 10 that saturate the bound *M* − 1 ≤ *N*.

### Benchmark circuits and simulation

The IDs in this article have been specially chosen so that the prepare-and-measure circuit for each measurement setting requires a gate depth of 4 on any array of *N* physical qubits with only nearest-neighbor controlled-*Z* couplings, making them a scalable and uniform set of benchmarks for implementations of this type. Figure 3 shows the circuits for *N* = 4, 5, from which the generalization to all *N* should be straightforward. In general, each circuit prepares an *N*-qubit linear cluster state, which is contained within the maximally entangled subspace of the corresponding ID.

In order to evaluate the usefulness of these benchmarks in real-world physical implementations, we simulated the performance of these circuits for each of the IDs in Fig. 1. We simulated each circuit over a range of *T*_{1} energy relaxation times, *T*_{2} dephasing times, and angular jitter for the controlled-*Z* gate rotations, using the ranges given in Figs 4 and 5. We also considered the effect of initialization and readout error for each qubit. The ranges of values were chosen to match the reported values of the 9-qubit Google chip,^{31,32} with the experimental values roughly in the center of each simulated range. We ran one version of the simulation using a nominal initialization error for each qubit of *P*_{e} = 2%, and another version where we used the observed initialization errors for each of the nine qubits on the Google chip. Final readout error has been neglected as correctable for ensemble statistics. Selected plots from the simulations are shown in Fig. 4, while scatter plots of the lower fidelity bound, *F*_{ID}, are shown in Fig. 5 for the full ranges of simulated values. Note that in order to minimize the effect of the two worst qubits on the chip (boldface values in Figs 4 and 5), we always used the last *N* qubits on the chip to form our *N*-qubit IDs in the simulation. See the “Methods” section for additional details about how the numerical simulations were performed.

Judging by our simulated data shown in Figs 4 and 5, we expect the nine-qubit Google chip to be able to violate the classicality bounds for all nine qubits. We can see clearly that the qubit initialization error is the dominant source of error as we try to move to larger *N*. This shows that our benchmarking scheme is immediately relevant, since it appears that similar hardware fidelity would only violate the bound for one or two more qubits—but certainly not all 72 on the Bristlecone chip^{41}—once suitable IDs have been found beyond the nine presented here.

## Discussion

The IDs and implementation circuits presented in this article are good benchmark tests for any physical implementation of qubits in a nearest-neighbor-connected array. They work naturally on a chip with more connectivity than this as well. While our simulations targeted a particular recent chip implementation for concreteness, this does not constrain the general usefulness of this protocol for other multi-qubit systems.

Although some other families of IDs with the same properties as those in Figs 1 and 2 are known,^{39,42} the minimal IDs, with the largest possible value of *N* for a given *M*, are not known in general (see the Supplementary Discussion and Supplementary Figs 1 through 5 for the best known cases). Because of their geometric nature, enumerating all of the representative IDs for given values of *N* and *M* is a highly nontrivial problem, related to solving the graph isomorphism problem on *N* × *M* colored vertices, and it is thus limited by computational resources. Furthermore, not every ID can be constructed using only nearest-neighbor couplings in linear circuits as in Fig. 3. The increased connectivity of more modern chips, like the Bristlecone chip from Google, should allow the use of more general IDs, although the circuit depth will likely increase by one or two gates.

Each of the IDs presented here also gives rise to a complete proof of the Kochen–Specker (KS) theorem for contextuality,^{22,43,44} which can be implemented for any initial state with a few alternative circuits for the different measurement contexts. In general, IDs are the natural building blocks of proofs of the KS theorem in the *N*-qubit Pauli group. This is a slightly more complicated setup, which could inspire different contextuality based benchmarks in future work.

Finally, maximally entangled IDs with *M* < *N* + 1 give rise to maximally entangled eigenspaces, each of dimension 2^{N−M+1}, which generalize the codespaces of error-correcting codes,^{45,46} and *L* = *N* − *M* + 1 is the number of *logical qubits* (where *N* is the number of *physical qubits*). All *N*-qubit-stabilizer-based error-correcting codes (including the toric code^{47}) belong to the family of IDs, and while all IDs of this type are error-detecting codes, they cannot all be used to diagnose the syndrome of an error in order to correct it. Many of the well-known error-correcting codes generate an ID which proves the GHZ theorem, and all can be used as entanglement witnesses in the manner of this article.^{48} Nevertheless, these more general maximally entangled subspaces may be of significant interest for other applications in quantum information processing, which warrants further investigation. One straightforward application for these subspaces is to perform benchmarks that measure the physical qubits as described in this paper, while simultaneously benchmarking the performance of the logical qubits in some additional way. The two tests may be performed simultaneously because any general logical *L*-qubit state can be prepared for each benchmark, although the circuit is likely to be longer and more complex than Fig. 3, and the performance will be commensurately worse. It is remarkable to note that if the conjectured bound *N* ≤ (*M* − 2)(*M* − 1)/2 can be saturated, then the number of logical qubits is bounded by *L* ≤ ((*M* − 2)(*M* − 1)/2 − *M* + 1, and thus the ratio *L*/*N* → 1 in the limit *M* → ∞.

## Methods

### Proving the GHZ theorem

All of the IDs in Fig. 1 have sign −1, and for each qubit *j*, the number of entries *O*_{ij} = *Z* in the ID is even, as is the number of entries with *O*_{ij} = *X* and with *O*_{ij} = *Y*. These properties indicate that these IDs give rise to proofs of the GHZ theorem,^{11} which is a logical version of Bell’s nonlocality theorem,^{9,10} without any inequalities. To see this, suppose that a joint eigenstate (i.e., any state in a joint eigenspace) of these observables is prepared. This eigenstate has *M* eigenvalues *λ*_{i} corresponding to the *M* observables, and \(\mathop {\prod}\nolimits_{i = 1}^M {\lambda _i} = - 1\), since the product of these *M* observables is −*I*^{⊗N}. Suppose that each of the *N* qubits are now mutually space-like separated, and each is subjected to random local Pauli measurements, and label their outcomes *λ*_{ij}, when all *N* local measurement settings happen to correspond to observable *i* of the ID. The entanglement correlations that are obeyed by this state are \(\mathop {\prod}\nolimits_{j = 1}^N {\lambda _{ij}} = \lambda _i\). Putting these relations together we have \(\mathop {\prod}\nolimits_{i = 1}^M {\mathop {\prod}\nolimits_{j = 1}^N {\lambda _{ij}} } = - 1\). Now, in order for a local hidden variable theory (LHVT) to explain these entanglement correlations, each qubit *j* must carry local hidden variables *v*_{Zj}, *v*_{Xj}, *v*_{Yj} ∈ {+1, −1} which predict the outcomes *λ*_{ij}, and are pre-arranged to satisfy the entanglement constraints. However, for such hidden variables we would have \(\mathop {\prod}\nolimits_{i = 1}^M {\mathop {\prod}\nolimits_{j = 1}^N {\lambda _{ij}} } = \mathop {\prod}\nolimits_{j = 1}^N {v_{Zj}^{n_j}} v_{Xj}^{m_j}v_{Yj}^{l_j} = + 1\), since *n*_{j}, *m*_{j}, and *l*_{j} are all even for the IDs of this article, and thus is is impossible to choose local hidden variables which can satisfy the entanglement correlations of this state. This logical proof without inequalities can be converted into a Bell inequality for use as a benchmark of *N*-qubit nonlocality, as shown in the main text, by noting that for any complete assignment of local hidden variables *v*_{Zj}, *v*_{Xj}, *v*_{Yj} ∈ {+1, −1} to the ID, at least one of the observables has the wrong eigenvalue.

In general, proving the GHZ theorem does not prove that nonlocal correlations exist between more than just a single pair of qubits among the *N*,^{49,50,51,52} nor does it generally witness genuine *N*-qubit entanglement. In contrast, the benchmark IDs we present in this article prove the GHZ theorem *and* are constructed to be *N*-partite entanglement witnesses,^{53,54} such that their corresponding Bell inequalities can only be violated by genuinely *N*-qubit-entangled states. To go further than the results we present here and prove nonlocal correlations exist between every pair of qubits among the *N*, one must violate the corresponding Svetlichny inequalities^{49,55} instead, but with the cost that the number of required measurement settings grows exponentially with *N*.^{49}

### Bounding the fidelity

An *N*-qubit ID with *M* observables {*O*_{i}} has a complete set of eigenspaces {Π_{k}} satisfying \(\mathop {\sum}\nolimits_k {{\Pi}_k} = I\), each of which can be identified by a unique set of distinct eigenvalues {*λ*_{ik}} of {*O*_{i}}. Only *M* − 1 of the observables in an ID are independent, and if *M* − 1 < *N* the eigenspaces Π_{k} are degenerate, and each contains 2^{N−M+1} mutually orthogonal vectors |*κ*_{jk}〉 which share the eigenvalue *λ*_{ik}, with *j* = 1, …, 2^{N−M+1}, such that {|*κ*_{jk}〉} is a complete orthonormal eigenbasis of the ID. Each of the 2^{M−1} eigenspaces Π_{k} corresponds to a unique correlator \(\alpha _k = \mathop {\sum}\nolimits_{i = 1}^M {\lambda _{ik}} O_i\). Each experimentally obtained quantity 〈*α*_{k}〉 enables us to put a lower bound on the fidelity that an experimentally prepared pure state |*ψ*〉 lies within the eigenspace Π_{k}.^{34}

With no loss of generality, we will henceforth use correlator *α*_{1} and the target eigenspace Π_{1}. We begin by expanding |*ψ*〉 in this eigenbasis as

such that \(\mathop {\sum}\limits_j {\left(|a_j|^2 + \mathop {\sum}\limits_{k = 2}^{2^{M - 1}} | b_{jk}|^2\right)} = 1\).

Since the expansion is in an eigenbasis of *α*_{1}, we find

Note that \(\langle \kappa _{j1}|\alpha _1|\kappa _{j1}\rangle = \mathop {\sum}\nolimits_{k = 1}^M {\lambda _k^2} = M\), since all eigenvalues of |*κ*_{1}〉 match those in the correlator *α*_{1} by construction, and thus square to 1. However, any other |*κ*_{jk}〉 does not lie within Π_{1}, so is characterized by eigenvalues distinct from those characterizing Π_{1}. Moreover, since the product of all eigenvalues for the observables of a given ID is fixed for any eigenstate, only even numbers of eigenvalues can differ from those characterizing Π_{1}, which necessarily causes at least two terms of 〈*κ*_{jk}|*α*_{1}|*κ*_{jk}〉 to become −1, resulting in an upper bound of 〈*κ*_{jk}|*α*_{1}|*κ*_{jk}〉 ≤ *M* − 4 for those eigenstates. Using these two observations we obtain,

where \(F = \mathop {\sum}\nolimits_j {|a_j|^2}\), and we have used \(\mathop {\sum}\nolimits_j {(|a_j|^2 + \mathop {\sum}\nolimits_{k = 2}^{2^{M - 1}} | b_{jk}|^2)} = 1\). We can rewrite this relation as

Noting that the left hand side of this equation is the fidelity *F* for the preparation |*ψ*〉 to lie within the eigenspace Π_{1}, the right hand side *F*_{ID} gives a lower bound *F* ≥ *F*_{ID} for the fidelity. For IDs with *M* = *N* + 1, the target subspace Π_{1} contains only one eigenvector, so the fidelity *F* is also a state preparation fidelity for the particular target eigenstate |*κ*_{1}〉. For IDs with *M* < *N* + 1, the target subspace Π_{1} is degenerate, so the fidelity *F* is the fidelity for |*ψ*〉 to lie within that subspace.

Next we generalize the above derivation to the case of mixed states. For a general convex combination of *m* pure states,

where \({\sum} {c_l} = 1\), we can expand each |*ψ*_{l}〉 using appropriate eigenbases of the ID as in Eq. (7) and follow the same arguments to obtain

where *F*_{l} ≡ 〈*ψ*_{l}|Π_{1}|*ψ*_{l}〉. We can rewrite this as

As in the pure state case, the left-hand side is the fidelity *F* for the mixed state *ρ* to lie within the target subspace Π_{1}, while the same expression for the right-hand side *F*_{ID} places a lower bound on this fidelity.

### Witnessing genuine N-partite entanglement

An *N*-qubit ID provides an entanglement witness if it is maximally entangled.^{39,56} Entanglement is usually discussed in reference to the separability of states. However, there is a way to reason about the entanglement of a set of observables directly without reference to states. We define a maximally entangled set of *N*-qubit observables as one with the property that there exists no bipartition of the *N* qubits into subsets of *R* and *N* − *R*, such that all of the observables in each subset \(\mathop { \otimes }\nolimits_{k \in [1,R]} O_{ik}\) mutually commute. It follows from this definition that the joint eigenstates of this set are maximally entangled *N*-qubit stabilizer states.

To see this, consider that every stabilizer state (space) of *N* qubits has a stabilizer group of *b* = 2^{g} mutually commuting Pauli observables {*S*_{i}} and corresponding eigenvalues {*λ*_{i}}, and its density operator can be written as

where *g* is the number of independent generators in the set, and *d* = 2^{N} is the dimension of the Hilbert space. Note that if *g* < *N*, then *ρ* projects onto a subspace of rank *r* = 2^{N−g} > 1, and that *g* = *M* − 1 for a minimal ID, which is just a specific subset of one or more complete stabilizer groups. If a stabilizer state is the tensor product of two smaller stabilizer states on subsystems *A* and *B*, it follows that its density operator can be written as

For the bipartition of the system into *A* and *B*, all of the stabilizer operators \(S_i^A = \mathop { \otimes }\nolimits_{k \in A} O_{ik}\) mutually commute by definition. It follows that one can find such a mutually commuting bipartition for any separable state, and therefore if no such bipartition exists, then the set of observables is maximally entangled. All of the IDs presented in this article are maximally entangled in this way, which results in a witness inequality with the same bound as the Bell inequality.

All states within a maximally entangled eigenspace of an ID are maximally entangled, meaning that for all of them, the maximum squared-Schmid-coefficient across all bipartitions is 1/2. For such an eigenstate |*ψ*〉, a standard entanglement witness is \({\cal{W}} = 1/2 - |\psi \rangle \langle \psi |\), and an experimental measurement of \(\langle {\cal{W}}\rangle \,{<}\, 0\) is a witness of genuine *N*-partite entanglement.^{54} Noting that a superposition state *a*|*ψ*〉 + *b*|*ψ*_{⊥}〉 can only violate this bound for *F* = |*a*|^{2} > 1/2, we obtain *F*_{ID} ≤ *F* ≤ 1/2 for all biseparable states. Plugging this into *F*_{ID} = (〈*α*〉_{exp} − *M* + 4)/4 yields 〈*α*〉_{bisep} ≤ *M* − 2, which is Eq. (4).

### Numerical simulation details

In the simulation, the state is first degraded by initialization error. That is, ideally the *N* qubits are prepared in an initial ground state \(\otimes _{i = 1}^N|0\rangle\). However, each qubit has an error probability \(P_{\mathrm{e}}^{(i)}\) of being initially excited, which produces a mixed initial bit state \((1 - P_{\mathrm{e}}^{(i)})|0\rangle \langle 0| + P_{\mathrm{e}}^{(i)}|1\rangle \langle 1| = (1 - 2P_{\mathrm{e}}^{(i)})|0\rangle \langle 0| + P_{\mathrm{e}}^{(i)}I\), and thus a degraded initial state \(\rho = \otimes _{i = 1}^n[(1 - 2P_{\mathrm{e}}^{(i)})|0\rangle \langle 0| + P_{\mathrm{e}}^{(i)}I]\) with ground state fidelity \(\mathop {\prod}\nolimits_{i = 1}^n {(1 - 2P_{\mathrm{e}}^{(i)})}\). The final readout error for an ensemble average can be corrected if the readout misidentification probabilities \(P_{\mathrm{e}}^i\) are known, and thus we have neglected the role of the readout error.

Each gate in Fig. 3 is then applied to the initial state *ρ*. For the Hadamard gate, it is sufficient to use a *Y*_{90} rotation, exp(−*iYπ*/4). We decompose the controlled-*Z* gate into an implementable *ZZ*_{90} entangling gate and single-qubit corrections: exp(*iπ*/4)[exp(*iZπ*/4) ⊗ exp(*iZπ*/4)]exp(−*iZZπ*/4). We degraded each gate by *T*_{1} energy relaxation and *T*_{2} dephasing processes for the corresponding gate times Δ*t*. For the energy relaxation time *T*_{1}, the first-order corrections for each individual qubit are accumulated and then applied to *ρ*. For each qubit \(\Delta \rho _i = (a_i^\dagger \rho a_i - \frac{1}{2}\{ \rho ,a_i^\dagger a_i\} )\Delta t/T_1^i\), where *a*_{i} is the lowering operator of the *i*th qubit tensored with identity for the other qubits, and \(\rho \to \rho + \mathop {\sum}\nolimits_i^N \Delta \rho _i\). This linear-order Lindblad-form update is sufficient, since \(\Delta t/T_1^i \ll 1\). For the dephasing time *T*_{2}, we directly construct the matrix

for efficiency and apply gate dephasing using element-wise multiplication (MATLAB syntax.*), as *ρ* → *ρ*.* *D*.

For simulating gate infidelity, we assume that the single-qubit gate fidelities are high enough for their errors to be neglected, and so simulate only a range of fidelities for the two-qubit controlled-*Z* gates. As a crude model for infidelity of a controlled-*Z* gate, we add a random angular jitter *δφ* only to the *ZZ* rotation step, exp[−*iZZ*(*π*/2 + *δφ*)/2], and average over the effect of this jitter using a raised cosine distribution with a width *w*, d*P*(*δφ*) = *d*(*δφ*)[1 + cos(*πδφ*/*w*)]/(2*w*), where *δφ* ∈ [−*w*, *w*] has compact angular support. This yields the averaged state update,

where *ζ*_{i} is the tensor product of Pauli *Z* for the two qubits the controlled-*Z* is acting on, and identity for all of the other qubits. The limit as *w* → 0 restores the unperturbed gate. This crude error model includes only one possible physical mechanism of infidelity for the controlled-*Z* gate, but gives an indication of the gate sensitivity to imprecise angular control. Since the initialization error dominates the infidelity, the effect of the angular jitter is small.

## Data availability

The data that support our findings are available from the authors on reasonable request.

## Code availability

The MATLAB code used to generate our data is available from the authors on reasonable request.

## References

- 1.
Friis, N., Vitagliano, G., Malik, M. & Huber, M. Entanglement certification from theory to experiment.

*Nat. Rev. Phys.***1**, 72–87 (2019). - 2.
Gheorghiu, A., Kapourniotis, T. & Kashefi, E. Verification of quantum computation: an overview of existing approaches.

*Theory Comput. Syst.***63**, 715–808 (2019). - 3.
Vedral, V. The elusive source of quantum speedup.

*Found. Phys.***40**, 1141–1154 (2010). - 4.
Hill, S. & Wootters, W. K. Entanglement of a pair of quantum bits.

*Phys. Rev. Lett.***78**, 5022 (1997). - 5.
Wootters, W. K. Entanglement of formation of an arbitrary state of two qubits.

*Phys. Rev. Lett.***80**, 2245 (1998). - 6.
Wootters, W. K. Entanglement of formation and concurrence.

*Quantum Inf. Comput.***1**, 27–44 (2001). - 7.
Wong, A. & Christensen, N. Potential multiparticle entanglement measure.

*Phys. Rev. A***63**, 044301 (2001). - 8.
Einstein, A., Podolsky, B. & Rosen, N. Can quantum-mechanical description of physical reality be considered complete?

*Phys. Rev.***47**, 777 (1935). - 9.
Bell, J. On the Einstein–Podolsky–Rosen paradox.

*Physics***1**, 195–200 (1964). - 10.
Bell, J. On the problem of hidden variables in quantum mechanics.

*Rev. Mod. Phys.***38**, 447–452 (1966). - 11.
Greenberger, D. M., Horne, M. A. & Zeilinger, A. Going beyond Bell’s theorem. In

*Bell’s Theorem, Quantum Theory and Conceptions of the Universe*, 69–72 (Springer, Kluwer Dordrecht, 1989). - 12.
Greenberger, D. M., Horne, M. A., Shimony, A. & Zeilinger, A. Bell’s theorem without inequalities.

*Am. J. Phys.***58**, 1131–1143 (1990). - 13.
Bravyi, S., Gosset, D. & König, R. Quantum advantage with shallow circuits.

*Science***362**, 308–311 (2018). - 14.
Lanyon, B., Barbieri, M., Almeida, M. & White, A. Experimental quantum computing without entanglement.

*Phys. Rev. Lett.***101**, 200501 (2008). - 15.
Ferraro, A., Aolita, L., Cavalcanti, D., Cucchietti, F. & Acin, A. Almost all quantum states have nonclassical correlations.

*Phys. Rev. A***81**, 052318 (2010). - 16.
Modi, K., Brodutch, A., Cable, H., Paterek, T. & Vedral, V. The classical-quantum boundary for correlations: discord and related measures.

*Rev. Mod. Phys.***84**, 1655–1707 (2012). - 17.
Bennett, C. H. et al. Unextendible product bases and bound entanglement.

*Phys. Rev. Lett.***82**, 5385–5388 (1999). - 18.
Bennett, C. H. et al. Quantum nonlocality without entanglement.

*Phys. Rev. A***59**, 1070–1091 (1999). - 19.
Meyer, D. A. Sophisticated quantum search without entanglement.

*Phys. Rev. Lett.***85**, 2014–2017 (2000). - 20.
Dakić, B., Vedral, V. & Brukner, Č. Necessary and sufficient condition for nonzero quantum discord.

*Phys. Rev. Lett.***105**, 190502 (2010). - 21.
Bera, A. et al. Quantum discord and its allies: a review of recent progress.

*Rep. Prog. Phys.***81**, 024001 (2017). - 22.
Kochen, S. & Specker, E. The problem of hidden variables in quantum mechanics.

*J. Math. Mech.***17**, 59–87 (1967). - 23.
Galvao, E. F. Discrete Wigner functions and quantum computational speedup.

*Phys. Rev. A***71**, 042302 (2005). - 24.
Howard, M., Wallman, J., Veitch, V. & Emerson, J. Contextuality supplies the ‘magic’ for quantum computation.

*Nature***510**, 351 (2014). - 25.
Wigner, E. P. On hidden variables and quantum mechanical probabilities.

*Am. J. Phys.***38**, 1005–1009 (1970). - 26.
Klyachko, A. A., Can, M. A., Binicioğlu, S. & Shumovsky, A. S. Simple test for hidden variables in spin-1 systems.

*Phys. Rev. Lett.***101**, 020403 (2008). - 27.
Friis, N. et al. Observation of entangled states of a fully controlled 20-qubit system.

*Phys. Rev. X***8**, 021012 (2018). - 28.
Chow, J. M. et al. Simple all-microwave entangling gate for fixed-frequency superconducting qubits.

*Phys. Rev. Lett.***107**, 080502 (2011). - 29.
Ghosh, J. et al. High-fidelity controlled-

*σ*_{z}gate for resonator-based superconducting quantum computers.*Phys. Rev. A***87**, 022309 (2013). - 30.
Martinis, J. M. & Geller, M. R. Fast adiabatic qubit gates using only

*σ*_{z}control.*Phys. Rev. A***90**, 022307 (2014). - 31.
Barends, R. et al. Superconducting quantum circuits at the surface code threshold for fault tolerance.

*Nature***508**, 500–503 (2014). - 32.
Kelly, J. et al. State preservation by repetitive error detection in a superconducting quantum circuit.

*Nature***519**, 66 (2015). - 33.
Chow, J. M. et al. Implementing a strand of a scalable fault-tolerant quantum computing fabric.

*Nat. Commun.***5**, ncomms5015 (2014). - 34.
Greganti, C., Roehsner, M.-C., Barz, S., Waegell, M. & Walther, P. Practical and efficient experimental characterization of multiqubit stabilizer states.

*Phys. Rev. A***91**, 022325 (2015). - 35.
Gühne, O., Lu, C.-Y., Gao, W.-B. & Pan, J.-W. Toolbox for entanglement detection and fidelity estimation.

*Phys. Rev. A***76**, 030305(R) (2007). - 36.
Wunderlich, H., Vallone, G., Mataloni, P. & Plenio, M. B. Optimal verification of entanglement in a photonic cluster state experiment.

*New J. Phys.***13**, 033033 (2011). - 37.
Gong, M. et al. Genuine 12-qubit entanglement on a superconducting quantum processor.

*Phys. Rev. Lett.***122**, 110501 (2019). - 38.
Wang, X.-L. et al. 18-qubit entanglement with six photons’ three degrees of freedom.

*Phys. Rev. Lett.***120**, 260502 (2018). - 39.
Waegell, M. Primitive nonclassical structures of the

*N*-qubit Pauli Group.*Phys. Rev. A***89**, 012321 (2014). - 40.
White, T. C. et al. Preserving entanglement during weak measurement demonstrated with a violation of the Bell–Leggett–Garg inequality.

*npj Quantum Inf.***2**, 15022 (2016). - 41.
Google Blog. http://www.googblogs.com/a-preview-of-bristlecone-googles-new-quantum-processor. Accessed 18 June 2018.

- 42.
Waegell, M.

*Nonclassical Structures Within the N-qubit Pauli Group*. Ph.D. Thesis. Preprint at arXiv:1307.6264 (2013). - 43.
Waegell, M. & Aravind, P. Proofs of the Kochen–Specker theorem based on a system of three qubits.

*J. Phys. A***45**, 405301 (2012). - 44.
Waegell, M. & Aravind, P. Proofs of the Kochen–Specker theorem based on the

*N*-qubit Pauli group.*Phys. Rev. A***88**, 012102 (2013). - 45.
Knill, E. & Laflamme, R. Theory of quantum error-correcting codes.

*Phys. Rev. A***55**(2), 900 (1997). - 46.
Nielsen, M. A. & Chuang, I. L.

*Quantum Computation and Quantum Information*. (Cambridge University Press, New York, 2010). - 47.
Kitaev, A. Y. Fault-tolerant quantum computation by anyons.

*Ann. Phys.***303**, 2–30 (2003). - 48.
DiVincenzo, D. P. & Peres, A. Quantum code words contradict local realism.

*Phys. Rev. A***55**, 4089 (1997). - 49.
Collins, D., Gisin, N., Popescu, S., Roberts, D. & Scarani, V. Bell-type inequalities to detect true

*n*-body nonseparability.*Phys. Rev. Lett.***88**, 170405 (2002). - 50.
Svetlichny, G. Distinguishing three-body from two-body nonseparability by a Bell-type inequality.

*Phys. Rev. D***35**, 3066 (1987). - 51.
Seevinck, M. & Svetlichny, G. Bell-type inequalities for partial separability in

*N*-particle systems and quantum mechanical violations.*Phys. Rev. Lett.***89**, 060401 (2002). - 52.
Mitchell, P., Popescu, S. & Roberts, D. Conditions for the confirmation of three-particle nonlocality.

*Phys. Rev. A***70**, 060101 (2004). - 53.
Tóth, G. & Gühne, O. Detecting genuine multipartite entanglement with two local measurements.

*Phys. Rev. Lett.***94**, 060501 (2005). - 54.
Tóth, G. & Gühne, O. Entanglement detection in the stabilizer formalism.

*Phys. Rev. A***72**, 022340 (2005). - 55.
Lavoie, J., Kaltenbaek, R. & Resch, K. J. Experimental violation of Svetlichny’s inequality.

*New J. Phys.***11**, 073051 (2009). - 56.
Waegell, M. A bonding model of entanglement for

*N*-qubit graph states.*Int. J. Quantum Inf.***12**, 1430005 (2014).

## Acknowledgements

We thank Josh Mutus and Daniel Sank for helpful commentary, as well as Eric Freda for helping to create some of the figures in this paper. M.W. was partially supported by the Fetzer Franklin Fund of the John E. Fetzer Memorial Trust. J.D. was partially supported by the Army Research Office (ARO) grant No. W911NF-15-1-0496, as well as No. W911NF-18-1-0178.

## Author information

### Affiliations

### Contributions

M.W. developed the IDs for the benchmarks in this article, developed the benchmark inequalities, coded the simulations, and wrote the manuscript. J.D. developed the theory for the simulations, and co-wrote the manuscript.

### Corresponding author

Correspondence to Justin Dressel.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

**Publisher’s note:** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Waegell, M., Dressel, J. Benchmarks of nonclassicality for qubit arrays.
*npj Quantum Inf* **5, **66 (2019). https://doi.org/10.1038/s41534-019-0181-8

Received:

Accepted:

Published: