Correlations for computation and computation for correlations

Quantum correlations are central to the foundations of quantum physics and form the basis of quantum technologies. Here, our goal is to connect quantum correlations and computation: using quantum correlations as a resource for computation—and vice versa, using computation to test quantum correlations. We derive Bell-type inequalities that test the capacity of quantum states for computing Boolean functions within a specific model of computation and experimentally investigate them using 4-photon Greenberger–Horne–Zeilinger (GHZ) states. Furthermore, we show how the resource states can be used to specifically compute Boolean functions—which can be used to test and verify the non-classicality of the underlying quantum states. The connection between quantum correlation and computability shown here has applications in quantum technologies, and is important for networked computing being performed by measurements on distributed multipartite quantum states.

Since the beginning of quantum theory, the puzzling and non-local nature of entanglement has been a major topic of research in theoretical [1][2][3][4] and experimental physics [5][6][7][8] with the demonstration of loophole-free Bell tests being a key achievement [9][10][11][12].Besides its fundamental nature, entanglement is one of the key ingredients of quantum technologies and forms the basis for quantum communication and quantum computing.In quantum communication, Bell inequalities and testing correlations have practical applications and ensure the security of protocols and devices [13,14].Quantum computing shows speed-ups in certain computational tasks and it is believed that it will have tremendous impact [15].Although, an advantage of quantum computers over classical computers has been shown recently for the first time [16], current quantum devices are not yet at a stage where they can solve large-scale problems.However, beyond full-power quantum computing, achieving an advantage in some form of non-classical computation is highly desirable [17].The main goal of this work is to demonstrate a quantum advantage in computing with simple quantum resources and to develop tools that quantify the usefulness of the resources (see Fig. 1).While the most common model of quantum computation is the circuit model, measurement-based quantum computing [15,18], is computationally equivalent.Here, one first generates a universal entangled quantum state and the computation is carried out by successive, adaptive measurements on that state-measurement results are processed by a classical control and determine the settings of future measurements [19].Crucially, the classical control only needs computation with XOR and NOT gates, called linear side-processing.In this setting, adaptivity of the measurements is crucial: removing it disables determinism and makes universal quantum computing impossible [20].However, it has been shown that non-adaptive measure- ments on entangled states are a resource for universal classical computation.For example, three-qubit GHZ states and linear computation (XOR gates) are sufficient to implement (universal) NAND gates [21].More generally, a linear side-processor (XOR computer) combined with non-adaptive measurements on entangled resources is sufficient to realize nonlinear Boolean functions and thus allows universal classical computation [22].This model is also referred to as NMQC ⊕ -non-adaptive measurement-based quantum computing with linear sideprocessing [22].In this setting, computing a Boolean function deterministically requires a number of qubits that scales exponentially with the length of the input bit string [23].However, in the case of probabilistic computation of Boolean functions there is an advantage using even small-scale quantum resources.Here, we build on this advantage and show the computation of non-linear Boolean functions with quantum resources (see Fig. 1).We link the violation of certain a. Concept of our setting to compute a Boolean function f (x) as described in the main text.The input x is transformed into a bit string s which determines the measurement settings Mj(sj) on the physical resource.The outcomes of these measurements mj determine the results of the computation: z := l j=1 mj is generated by the parity of the outcomes from the quantum measurements.After linearly generating the bit-string sj from the input bit-string x, a measurement of the observables Mj(sj) controlled by the value sj are performed, whose outcomes mj are again linearly processed to finish the computation.b.Truth table for the three functions considered in this work with input string x = (x1, x2, x3) and the bit string s = (s1, s2, s3, s4) (see main text for details).
Bell-like inequalities to the capacity of quantum states for being a resource for computation.We experimentally generate GHZ states, the optimal states for this task [24,25], and demonstrate the violation of different Bell inequalities that are related to computing certain non-trivial Boolean functions.

THE SETTING
The basic model of computing by non-adaptive measurements on quantum resources is shown in Fig. 2. Let x ∈ {0, 1} n be the input, we aim to compute the Boolean function f : {0, 1} n → {0, 1} (upper layer).Assume, the input x is generated with probability p(x).
First, the input x is processed by a linear side processor with access to XOR and NOT gates (equivalent to addition modulo 2) only, as in the middle layer.Here, the input bit-string x is transformed into another bit-string s ∈ {0, 1} l with l ≥ n and for each j th bit of s, where a jk ∈ {0, 1} and is summation modulo 2. The values a jk can be seen as elements in an l-by-n binary matrix A (see Fig. 2 a.) and we can write s = (Ax) ⊕ .
The j th bit s j now determines the settings for the measurement M j (s j ) on the j th qubit of the physical resource (bottom layer).For each measurement M j (s j ), we obtain a measurement outcome m j ∈ {0, 1}, associated with the eigenvalues (−1) mj .All outcomes m j are collected in an outcome bit-string m ∈ {0, 1} l .Note that the number of bits in the input x is distinct from the number of parties l in the physical resource.For example, in this work, we will focus on the case of n = 3 and l = 4.
We can now pose the following question: is z := l j=1 m j , the parity of all outcomes, equal to f (x), the designated Boolean function?
To answer this question, one can determine the success probability for obtaining z = f (x) to be with being a weighted sum of expectation values E(x) := p(z = 0|x) − p(z = 1|x).Therefore, if β = 1, then E(x) = (−1) f (x) for all x, and the function f (x) can be computed deterministically.From Eq. (3), we obtain a Bell-like inequality, where the upper limit that is determined by the physical resource used is for classical resources (c) and quantum resources (q).Classical resources could be simply arbitrary measurements on an n-partite separable quantum state, where the statistics are convex mixtures of local probabilities.Alternatively, we can assume a local hidden variable model [21,23], or a non-contextual hidden variable model [22].This can be motivated when we assume that there is no communication between the resources, and operations are local or that local measurement on one qubit commute with local measurements on another, respectively.The crucial point here is that all of these motivations give rise to the same experimental predictions.Equivalently, we can assume the classical outcomes m j are solely determined by the choice s j and shared random variables between the parties (see Appendix for details).Given this notion of classical resource, it has been shown that the only functions f (x) that can be computing deterministically by classical resources are linear Boolean functions [22,23].In this way, classical resources have the same computational power as the linear side-processor.
As mentioned, quantum resources can have an advantage when the function f (x) is non-linear.
One can show that the maximal quantum bound q is achieved by GHZ states and measurement of observables in the X-Y plane of the Bloch sphere M j (s j ) = cos(s j φ j )X + sin(s j φ j )Y for appropriately chosen angles [24].More details on the derivation of the equations above is given in the Appendix.

INEQUALITIES FOR COMPUTATION.
We consider several functions, which are listed in Fig. 2 b.We choose one function and derive the corresponding inequality in details; we list the results for the other functions.
Let us start with the function: which leads us to the truth table shown in Fig. 2 b and which is closely related to the n-tuple AND function in Ref. [23].First, the input bit string x is transformed by a linear side processor into measurement instructions s We will use this pre-processing for all examples of 3-bit Boolean functions in this work.Now, our aim is to derive an inequality that tells us whether a certain physical resource is suitable for computing h 3 (x).In order to do this, we make use of Eq. ( 3) and choose the uniform distribution p(x) = 1/8: with (−1) f (x) according to the truth table in Fig. 2 b.
For the quantum case measurements are made on a four-qubit GHZ state.We have that for s j equal to 0 or 1 the corresponding observables are given by the Pauli operators X or Y respectively, meaning that e.g.(s 1 , s 2 , s 3 , s 4 ) = (0, 0, 1, 1) corresponds to a measurement of XXY Y and we obtain the inequality shown in Fig. 4 a.We obtain the classical and quantum bounds: This means that if a physical resource violates the classical bound of this inequality, it is better suited for computing the function h 3 (x) than classical resources, meaning it has a higher success probability to obtain the correct result.Quantum resources can deterministically compute this function if they have at least four qubits; for three qubits or less l = n = 3, the bound q is equal to 1/ √ 2 [23].
Another function we consider is the three-bit OR function which is only 0 for x 1 = x 2 = x 3 = 0 and 1 otherwise.With the distribution p(x = (0, 0, 0)) = 3/10 and p(x = (0, 0, 0)) = 1/10, and measurement bases X/Y as above, we obtain: where the value for q has been calculated according to Fig. 4 a.A similar example is the function for which we obtain with a distribution p(x) ∈ {1/16, 3/16} (see Fig.
Finally, we aim at computing the two-bit AND function Choosing and a uniform distribution p(x), we obtain the bounds This computation is equivalent to the computation of a NAND using a three-qubit GHZ state is shown in [21].All these inequalities show that a quantum resource can violate the classical bounds for all Boolean functions considered here (see also Fig. 4).This means that the probability to compute the correct result is higher than with classical resources according to Eq. ( 2).For details on the derivations, see Appendix.

COMPUTATION FOR TESTING CORRELATIONS
In the previous section, we used Bell-like inequalities to test whether certain physical resources are suitable for computing certain Boolean functions.Now, we would like to use computation to probe the non-classicality of the resource state.In other words, we perform computation in our model (see Fig. 1) and if we obtain the correct result with a certain probability, given by the inequalities above, we know our resource has to be non-classical in a particular, formal way.
Here, the first value in each row indicates the maximum probability to obtain the correct results when the function is computed using classical resources, the second value indicates the probability for computing with quantum resources.
If we perform computation in our model and achieve a success probability higher than the classical probabilities given in Eqs. ( 15)-( 18), we know that our resource state is non-classical.In particular, we see that the deterministic computation of non-linear Boolean functions is a signature of non-classicality.

EXPERIMENT
For exploring relation between computation and Bell inequalities experimentally, we generate four-photon GHZ states using an all-optical setup that is shown and described in Fig. 3.The state we obtain in our experiment is If we in turn use the GHZ state generated in the experiment to perform computation, we can quantify the probability to get the correct output.The corresponding probabilities are shown in Fig. 4 c.This confirms that, for all probabilities, we lie above the classical values, which verifies that our physical resource must be quantum.In addition the gray dashed line in Fig. 4 highlights the limits of the computation on 3 qubits.The discrepancy to the quantum bounds arises due to experimental imperfections.First of all, our resource state is not perfect.The quality of the 4-photon entanglement is limited by purity of the generated two-photon entangled states (two photon fidelity F ∼ = 0.96) as well as by the interference of the photons in modes 2 and 3 where we measured a Hong-Ou-Mandel dip visibility of V = 0.80 ± 0.02.In addition, imperfections in the polarisation states, polarisation drifts, and higher-order emissions (1.2 ± 0.1% of the coincidence rate for each SPDC) reduce the quality of the generated GHZ state.

CONCLUSION
In this work, we link a deeply fundamental questionthe violation of a Bell inequality-to computing classical functions.We investigate this connection from two angles: verifying correlations through Bell tests quantifies the ability of a certain physical resource for computation.Furthermore, doing computation can be used as a tool to test non-classicality itself.We demonstrate this connection in a quantum optics experiment and show that already a four-qubit quantum states can provide an advantage.
The beauty of this connection between classicality and linear Boolean functions is that no matter how large the classical resource, its computational power does not change.However, as we increase the number of qubits in a quantum resource the computational power increases.An interesting question is to study further types of classical resources in our setting.We could, for example, allow communication between measurement sites, for ex-ample, as in studies of non-locality [27,28].Given these or other additional powers, the question is how the success probabilities of the enhanced classical resources compare to quantum resources.In addition, what do the computed Boolean functions imply about the amount of non-classicality of the resource?
The relation between non-classicality and computing investigated here is related to the connection of Bell inequalities and quantum games [29].It is also related to work on contextuality and the use of single-qubit operations for classical computation [30][31][32][33].
Even, if no fully fledged quantum computer is available, our work demonstrates the advantages of quantum resources for computation.In particular, our work has implications for quantum networks.Although, our approach here has been computational and not cryptographic, the quantum advantage in our work can be applied to a cryptographic setting if the shared resource state is distributed among agents in a network.For example, our methods could be directly used to self-test GHZ states [34] and generate randomness [35], both in a device-independent manner.Furthermore our quantum advantages for computation can be turned into an advantage for communication complexity [36].Thus, our work is a further example how the power of modern quantum technologies lies in fundamental quantum physics.

Derivation of the inequalities
In the following, we show in detail how to derive the Bell inequalities for the Boolean functions f : x n → x given in the main manuscript: The function The first example is the function f (x) = x 1 (x 2 ⊕ x 3 ⊕ 1) ⊕ x 2 (x 3 ⊕ 1) ⊕ x 3 and all input strings x are uniformly distributed p(x) = 2 −3 .The function satisfies f (0, 0, 0) = f (1, 1, 1) = 0, else it will yield the result 1 as shown in the Table of Fig. 2 of the main section.Accordingly, from Eq. ( 21) we get the relation For computing the largest classical bound, we maximize the sum in Eq. ( 22) over all possible values with E(x 1 , x 2 , x 3 ) = E(x 1 )E(x 2 )E(x 3 ) and the expectation values confined to E(x i ) = (±1) for i ∈ {1, 2, 3}.In Eq. ( 22) we obtain a maximal classical value of 1 2 .The value for the quantum bound depends on the number of sites l ≥ n.In our measurements we have l = 4 and the measurement choices are encoded by the following linear map Therefore, choosing for s = 0 observable X and for s = 1 observable Y the inequality Eq. ( 22) becomes The maximum in Eq. ( 24) is obtained exactly by |GHZ (4) = (|0, 0, 0, 0 + |1, 1, 1, 1 )/ √ 2, naturally the values of all other states will be within the region bounded by this GHZ state.Note that this value of 1 for the quantum bound is the maximum allowed algebraically.
The second example is the OR function.At this point it is also worthwhile to rewrite the function in algebraic normal form (ANF) so it can obviously be seen as non-linear: The distribution for this function is chosen as p(x) = 1 10 , except for p(0, 0, 0) = 3 10 .We thus obtain the inequality In the same way as above we can compute the classical bound to be 4 10 and the quantum bound This bound can be readily confirmed to be the maximum allowed for all possible quantum resources (both states and measurements) using the methods described by Werner, Wolf, Żukowski and Brukner [24,25].
The function NAND2(x) In the work of Anders and Browne [21], it was demonstrated that a three-qubit GHZ state can be used to compute the NAND function of two bits, which we can write as NAND 2 (x) = x 1 x 2 ⊕ 1.Since this is just a function on two bits, things will be somewhat simplified.The distribution over these two bits is 2 −2 for all values of x := (x 1 , x 2 ).The inequality can be written as: The classical bound for this inequality is 1/2.In our setting for l = 4 parties we can also compute the function NAND 2 (x) with the following linear map to generate the four inputs to the parties: Now we can modify the set-up so that the third and fourth parties measure Y for s j = 0, and X for s j = 1.Equivalently, we could have applied a NOT to the values of s j , as is described in the main paper.Thus the inequality in Eq. 30 can be rewritten as: The bound on the right-hand-side is attained with the GHZ state (|0, 0, 0, 0 + |1, 1, 1, 1 )/ √ 2, as above; this bound is also the maximum allowed algebraically.

Bounds on Three-Qubit Entanglement
Here we derive bounds on the inequalities above when the four parties are limited to sharing tri-partite quantum resources.In this case three of the four parties can share a quantum state and the fourth party's outcome is local, i.e. determined by the measurement choice s j and shared randomness between the parties.Therefore, for each inequality, we can choose the party whose outcome m j will be a deterministic function (−1) rj sj , where r j ∈ {0, 1}.Then we can optimise over all measurements and states for the other three parties with the same pre-processing as outlined above for each function.To summarise, for all the functions above, and pre-processing outlined above, we can limit one of the four parties to having a deterministic outcome in the inequalities.In addition to this, we can adapt the numerical techniques in [24,25], to find the optimal violation for the remaining three parties.The optimal violation for the remaining three parties will be attained by a three-qubit GHZ state.This optimisation can be done for each choice of the party that does not share quantum resources with the other three.For the function f (x) = x 1 (x 2 ⊕ x 3 ⊕ 1) ⊕ x 2 (x 3 ⊕ 1) ⊕ x 3 , the bound on β for the inequality (22) for tripartite quantum resources is β ≤ 1/ √ 2. Notably this bound relates to the maximal quantum violation of the Svetlichny inequality [37], as discussed in [23].For the function OR 3 (x), the bound on β for (26) for tripartite quantum resources is β ≤ 2/3.For inequality (28), the bound β ≤ 0.70235 holds.For the function NAND 2 (x), the function can be computed deterministically by three qubits, as shown in [21].

Further experimental details and data analysis
For the experiment as illustrated in Fig. 3 of the main manuscript a 4 W fs-pulsed Ti:sapphire laser at 780 nm is first frequency doubled and then directed onto a nonlinear β-barium-borate (BBO) crystal which produces spatially separated single photons by type-II spontaneous parametric down-conversion (SPDC).The two BBO crystals produce a polarization entangled state After the entangled photon pairs are emitted in conic sections the photons in each spatial mode pass a combination of half-wave plate (HWP) and another BBO-crystal which compensate previously induced walk-off effects and allow to adjust the relative angle ϕ in Eq. (33).By fixing ϕ = π, a product of two Bell-states |ψ − 12 |ψ − 34 is obtained, which upon superposition of modes 2 and 3 on a polarizing beam splitter (PBS) becomes

FIG. 1 .
FIG. 1. Illustration of the dual link between quantum states and computing Boolean functions: We can derive Bell-like inequalities to test whether certain quantum states can be used as a resource for computation.Vice versa, we can use the computation of Boolean functions as a test of quantum correlations.
4 a), and again, measurement observables X and Y .

FIG. 3 .
FIG. 3. Experimental setup.A fs-pulsed Ti:sapphire laser at 780 nm is first frequency doubled and then passes through two nonlinear β-barium-borate (BBO) crystals, each of which produces spatially separated single photons by type-II spontaneous parametric down-conversion (SPDC) in states: |ψ − = (|H, V − |V, H ) / √ 2. Half-wave plates (HWP) and additional BBOcrystals compensate walk-off effects and allow to adjust the relative phase.The photons in modes 2 and 3 of the two states |ψ − 12 |ψ − 34 are sent to a polarizing beam splitter (PBS).Upon postselection to one photon in each of the output port, we obtain the state |GHZ = (|H, V, V, H − |V, H, H, V ) / √ 2.

FIG. 4 .
FIG.4.a. Overview of the tested multi-partite Bell inequalities with their corresponding Boolean functions.b -c.Classical, quantum, and experimentally obtained bounds for computing Boolean functions shown in the panels below.For both the bounds in Fig.4b.and the probabilities Fig.4 c. the gray area of the bars indicate the regions completely obtainable with linear operations on classical resources.The colored regions with the measurement points on top indicate that these limits have been surpassed in each case by β h 3 (x) : 16σ, β OR 3 (x) : 10σ, β OR 3 (x)⊕x 1 x 3 : 8σ and , β NAND 2 (x) : 11σ.Ergo, the correct computation of the non-linear Boolean function is more probable with quantum resources.The underlying white bars indicate the optimal quantum limits for 4 qubit measurements, while the gray dashed lines mark the quantum bound for three-qubits, hence we see that with increased entangled resources the limit moves away form the classical bound unless it is already deterministic.

PBS 23 |ψ − 12 |ψ − 34 = 1 √ 2 |GHZ + |χ . ( 34 ) 2 .
The final state is thus a superposition of a four photon GHZ state |GHZ = (|H, V, V, H − |V, H, H, V ) / √ 2 and |χ = i (|H, HV, 0, H + |V, 0, HV, V ) / √ Any 4-fold coincidence measured at the 8 avalanche photodiodes (APDs) is thus only obtained by the GHZ state.To check the quality of the experimental state ρ exp we conducted a regular quantum state tomography by recording the 34 combinations of the expected values Tr(O 1 O 2 O 3 O 4 ρ exp ), O i = {X i , Y i , Z i } being the Pauli operators.To calculate a state fidelity we first get an estimation of the distribution ρ exp from the measured data by maximizing a likelihood function and then compare to the optimal state F = GHZ |ρ exp |GHZ .The data was obtained at 500 mW pump power with a maximal 4-fold coincidence rate of ca. 1 Hz in the eigenbasis of the projectors.We obtained a value of F = 0.824 ± 0.014 with the the state tomography shown in Fig.5.The error has been estimated from a Monte Carlo simulation, i.e. random sampling from a Poisson distribution and iterating the fidelity calculation 100 times.The expected values E(x) that were recorded for the violation of the respective inequalities are exhibited in Fig.5e.

FIG. 5 .
FIG. 5. Panels a-d.show the measured real and imaginary part of the quantum state ρexp calculated by a maximum likelihood estimation from the measured 4-fold coincidence counts as well as their ideal cases.e. Calculated expected values obtained by the probability measurements of 4 2 = 16 combinations to measure H or V polarized photons.The data was measured at 150 mW pump power.