{'fraction_non_alphanumeric': 0.042476374612819855, 'fraction_numerical': 0.016079073529701896, 'mean_word_length': 4.358705994291151, 'pattern_counts': {'":': 2, '<': 2, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Covariance Bell inequalities

We introduce Bell inequalities based on covariance, one of the most common measures of correlation. Explicit examples are discussed, and violations in quantum theory are demonstrated. A crucial feature of these covariance Bell inequalities is their nonlinearity; this has nontrivial consequences for the derivation of their local bound, which is not reached by deterministic local correlations. For our simplest inequality, we derive analytically tight bounds for both local and quantum correlations. An interesting application of covariance Bell inequalities is that they can act as"shared randomness witnesses": specifically, the value of the Bell expression gives device-independent lower bounds on both the dimension and the entropy of the shared random variable in a local model.

We introduce Bell inequalities based on covariance, one of the most common measures of correlation. Explicit examples are discussed, and violations in quantum theory are demonstrated. A crucial feature of these covariance Bell inequalities is their nonlinearity; this has nontrivial consequences for the derivation of their local bound, which is not reached by deterministic local correlations. For our simplest inequality, we derive analytically tight bounds for both local and quantum correlations. An interesting application of covariance Bell inequalities is that they can act as "shared randomness witnesses": specifically, the value of the Bell expression gives device-independent lower bounds on both the dimension and the entropy of the shared random variable in a local model.
Bell inequalities limit the strength of possible correlations for any model satisfying a natural definition of locality formulated by Bell [1]. Thus, the violation of a Bell inequality indicates that no local model (in the sense of Bell) can reproduce the observed data, which is therefore said to be (Bell) nonlocal. This can be the case in quantum theory where, by performing well-chosen local measurements on an entangled quantum system, one may obtain nonlocal quantum correlations.
Beyond their fundamental interest, Bell inequalities are widely used tools, in particular in quantum information science [2]. Indeed, a Bell inequality violation represents a simple and strong test for certifying the presence of entanglement. Importantly this test is device-independent, in the sense that, assuming quantum theory, a Bell inequality violation implies the presence of entanglement without any assumption on the measuring devices, nor on the Hilbert space dimension. Moreover, the violation of a Bell inequality can also be used to certify the presence of genuine quantum randomness [3,4], or the security of a cryptographic key [5].
Consider two separate observers, performing local measurement on a shared physical system. The experiment results in some data, namely the joint conditional probabilities of observing a pair of outputs (measurement results) given a pair of inputs (choice of measurement settings). As they capture the strength of correlations in the data, it is intuitive that Bell inequalities are constructed based on some measure of correlation. For instance, the simplest and most famous Bell inequality of Clauser-Horne-Shimony-Holt (CHSH) [6] is a linear combination of simple correlation functions (see below). As these correlation functions are themselves linear combinations of the joint conditional probabilities, the CHSH inequality is a so-called linear Bell inequality. More generally, it is known that the set of distributions that are Bell local can be fully characterized via linear Bell inequalities [7], and great efforts have been dedicated to find such inequalities, see e.g. Refs. [8][9][10][11][12][13].
It is however natural to ask if other measures of correlations can be used for devising Bell inequalities. Beyond the purely conceptual interest, this could be relevant in a practical context in which the full data is not available, but only certain specific (not necessarily linear) functions of the joint probabilities are. Moreover, it would be interesting to devise new types of Bell inequalities for the case of continuous measurement outcomes, for which the standard approach for constructing linear inequalities does not work anymore.
Here we introduce a novel class of nonlinear Bell inequalities based on the covariance of measurement results, a natural measure of correlations that is widely used in many different areas of science. We propose a general way to construct such Bell inequalities for covariances, and present, in the simplest case, a method for computing their local bound-a nontrivial problem due to the nonlinearity of the Bell expression. We show on a few explicit examples that our inequalities can detect quantum nonlocality. Moreover, we show that covariance Bell inequalities can be used to characterize shared randomness in a Bell test, providing device-independent lower bounds on the dimension and the entropy of the shared random variable in any local model. Standard Bell inequalities.-Consider an experiment in which two parties, Alice and Bob, can both locally test different properties of a shared physical system. Let us label by x the measurement choice of Alice and y that of Bob, with the corresponding outcomes defining the random variables A x and B y , which take the values a and b, respectively. We will only consider non-signalling scenarios, in which the statistics of A x do not depend on the choice of y, and similarly the statistics of B y do not depend on x.
The statistics of the whole experiment, and thereby the correlations between Alice and Bob's measurement outcomes, are characterized by the joint conditional probability distribution P (a, b|x, y) = P (A x = a, B y = b). Such a distribution is called local (in the sense of Bell) if it admits a decomposition of the form P (a, b|x, y) = ρ(λ) P A (a|x, λ) P B (b|y, λ) dλ, (1) where λ represents the possible values a shared classical variable Λ (shared randomness), distributed with the density function ρ(λ). The local response functions, defined by the distributions P A (a|x, λ) and P B (b|y, λ) represent the local behavior of Alice and Bob's subsystems.
The set of local distributions-the "local set"-is constrained by linear Bell inequalities of the form with some real coefficients α ab|xy , and where the "local bound" β is the maximal value of the quantity B over all local distributions. For any given (finite) number of possible measurement settings and outcomes, the local set forms a polytope, and is thus fully characterized by a finite set of such linear Bell inequalities [7]. As a concrete example, consider the case of two measurements for each party, labelled by x, y ∈ {0, 1}, with binary outcomes a, b ∈ {+1, −1}. Here we have the wellknown CHSH inequality [6] CHSH where the correlation functions A x B y are simply defined as the expectation values of the products of outcomes, A x B y = a,b a b P (a, b|x, y). Like many other linear Bell inequalities, the CHSH inequality can detect quantum nonlocal correlations, obtained by performing well chosen local measurements on a shared entangled state.
A Bell inequality for covariances.-Instead of using the correlation functions A x B y , other quantities can also be considered to characterize local distributions; indeed, Bell inequalities were for instance constructed for entropic quantities [14][15][16]. In this work we focus on another natural and widely used measure of correlation, namely the covariance. As mentioned previously, this may be of practical interest for situations where the full data is not available, and only covariances can be estimated. An advantage of using covariances is also that, like entropies, they are naturally defined for any number of possible measurement outcomes, and even for continuous outcomes. Unlike entropies however, they depend on the specific values given to the measurement outcomes; this allows one, in particular, to distinguish correlations versus anticorrelations.
The covariance of the two output variables A x and B y is defined as with A x B y defined as above, and similarly with A x = a,b a P (a, b|x, y) and B y = a,b b P (a, b|x, y) (for continuous values, the sums can simply be replaced by integrals, and the probabilities by probability density functions; note also that because of the non-signalling assumption, A x does not depend on y, and B y does not depend on x). We emphasize that because of the product term in Eq. (4), the covariance is a nonlinear function of the joint probabilities P (a, b|x, y).
We start by again considering the case of two measurements per party (x, y ∈ {0, 1}), but with now outcomes A x and B y that can take any values a, b in the interval [−1, +1]; this implies in particular that −1 ≤ cov(A x , B y ) ≤ 1 (note that if a, b are taken in any other bounded interval, they can, together with the corresponding covariance, simply be rescaled so that they lie in [−1, +1]). Our goal is to bound the set of possible values of the four covariances cov(A x , B y ) for local distributionsthe "local set" for covariances. To get some intuition, and inspired by the form of CHSH in Eq. (3), one may look for instance at the projection of this local set onto the 2-dimensional (covCHSH, covCHSH ) plane, with and with covCHSH defined similarly, except that cov(A 0 , B 1 ) and cov(A 1 , B 0 ) come with minus signs. By optimizing the values of covCHSH ( ) numerically (but with reliable enough results), we obtained the local set represented in Fig. 1.
One immediately sees that contrary to the standard local polytope in the probability space, the local set in the covariance space is nonconvex, and that (unsurprisingly) it cannot be fully described by a finite number of Bell inequalities based on linear combinations of the covariances. Its full characterization thus looks much more complicated than that of the standard local polytope. Nevertheless, one can still derive some Bell inequalities for covariances that provide an outer approximation of the local set. As illustrated on Fig. 1, an example of such covariance Bell inequalities is the following: In order to prove that this inequality indeed holds for any local distribution, it is in fact sufficient to restrict to distributions with binary outputs ±1. Those can be written as convex mixtures of finitely many deterministic (local) distributions, and one can then optimize the expression covCHSH over the corresponding weights. To take into account the constraint that these weights must be nonnegative and sum up to 1, one can introduce Karush-Kuhn-Tucker (KKT) multipliers [26], which provide necessary conditions for a solution to be optimal. By considering decompositions onto different sets of deterministic distributions with nonzero weights, these KKT Projection of the local set for covariances (shaded region) onto the upper-right quadrant of the (covCHSH, covCHSH ) plane; the other three quadrants are obtained by symmetry, see inset. All local distributions give values in the local set and satisfy the covariance Bell inequality covCHSH ≤ 16 7 . This inequality is saturated by the distributions that project onto POpt; those require mixing at least 3 deterministic strategies, while mixing 2 allows one to obtain for instance the point P2 (see main text). Quantum distributions can reach the dashed green circle and can thus violate the covariance Bell inequality, with PQ corresponding to a distribution that also maximally violates the CHSH inequality. The no-signaling set is limited by the solid red line (as it satisfies covCHSH + covCHSH = 2[cov(A0, B0) − cov(A1, B1)] ≤ 4), where PP R corresponds to a PR nonlocal box.
conditions simplify to a number of linear systems, which can easily be solved. The full details of the proof are given (together with an alternative approach) in Appendix A.
It is instructive to look more closely in the proof at decompositions with a given number d of deterministic distributions with nonzero weights. First note that for d = 1, i.e., for deterministic distributions, all covariances are 0, and therefore one also obtains covCHSH = 0. To obtain a nonzero value, one thus needs to consider mixtures of at least 2 distributions. For d = 2, one finds that the maximal possible value is covCHSH = 2, obtained for instance by the distribution P 2 = 1 2 (+ + / + −) + (− − / − +) (which also gives covCHSH = 2, see Fig. 1)-where the notation (A 0 A 1 /B 0 B 1 ) denotes a strategy in which Alice and Bob deterministically output A x and B y for inputs x and y, respectively. In order to reach the local upper bound in Eq. (6), one needs to go to d = 3; the distribution P Opt = 3 7 (+ + / + +) + 2 7 (− + / − −) + 2 7 (− − / − +), for instance, gives covCHSH = 16 7 (and covCHSH = 16 49 , see Fig. 1). One thus sees that reaching a given value of covCHSH requires mixing a certain number of deterministic strategies; this is an interesting feature, which will allow one to use the covariance inequality as a shared randomness witness (see below). One may also look at possible violations of the covariance Bell inequality (6). One finds that it can indeed detect quantum nonlocality: that is, one can obtain covCHSH > 16 7 by performing local measurements on an entangled state. For example, the quantum correlations that reach the maximal quantum value (the "Tsirelson bound" [27]) of CHSH=2 √ 2 have vanishing marginals A x = B y = 0, and therefore also give covCHSH=2 √ 2 > 16 7 (point P Q on Fig. 1). In fact, this is the largest possible quantum violation, as one can prove that all quantum correlations must satisfy the inequality This is shown in Appendix B, where we also give a tighter characterization of the quantum set in terms of covariances. Note that in contrast to the local bound, marginals do not play any role in reaching the Tsirelson bound for covCHSH. Nevertheless, the nonlinearity of the Bell expression covCHSH also has interesting consequences in the quantum case. For instance, one can find two pure entangled states such that none of the states can individually violate the inequality (6), whereas a mixture of the two states can violate it; see Appendix C for details. Note, finally, that given the range of output variables, we have |cov(A x , B y )| ≤ 1, and therefore the algebraic maximum possible value of covCHSH is 4 (just like for CHSH). This value can be reached by the non-signalling distribution known as the Popescu-Rohrlich (PR) nonlocal box [28] (point P P R on Fig. 1), which again has vanishing marginals and also reaches the algebraic maximum of the CHSH expression.
Constructing other covariance Bell inequalities.-One can follow similar ideas to the ones developed above and derive other Bell inequalities based on covariances.
In the case of ternary inputs x, y ∈ {0, 1, 2} and binary outputs a, b ∈ {+1, −1} for instance, the local set in the space of expectation values A x B y is again fully characterized by CHSH-like inequalities; however, when considering the full probability space, i.e., including the marginals A x , B y , one gets a new inequivalent family of Bell inequalities of the form [9, 10, 29] Inspired by the previous example of CHSH, one may look at the local bound when the expectation values A x B y are replaced by the covariances cov(A x , B y ). Marginal terms, viewed e.g. as A x = A x 1 1 B (where 1 1 B is the identity measurement operator for Bob, that always outputs b = 1) then simply drop out, as cov(A x , 1 We thus get the covariance Bell inequality (that allows for any outputs a, b ∈ [−1, +1]) Here the local bound was obtained through numerical optimization (up to machine precision); nevertheless, the reproducibility and reliability of the numerical results make us quite confident that the bound is correct. In Appendix D we present local distributions that reach it, and discuss quantum and super-quantum (non-signalling) violations.
More generally, one may consider constructing covariance Bell inequalities following the above recipe, starting from an arbitrary linear Bell inequality with binary outcomes. Note that instead of simply dropping the marginal terms, one could as well keep them, or replace them with other functions, e.g. with variances.
Generalising even further our approach for covariance Bell inequalities, one can also investigate Bell inequalities based on Pearson correlators, which can be thought of as normalised covariances. The Pearson correlator for two variables A x and B y with variances . Following a similar construction as above, we get, for the case of binary inputs and now also restricting to binary outputs, the Bell inequality where the local bound was again obtained through numerical optimization. It must be emphasized that unlike for covariances, the local set for Pearson correlators is not the same when considering binary outputs or more possible outputs; for instance, with ternary outputs in {+1, 0, −1}, one can locally reach the value rCHSH = 2 √ 2, which turns out to also be the Tsirelson bound for rCHSH (whether we restrict to binary outputs or not), as proven already in Ref. [30] (we also give a proof of this in Appendix B). In Appendix D we present local distributions that reach these two local bounds of 5 2 and 2 √ 2, and discuss quantum and super-quantum violations of them. Of course, similar Bell inequalities with Pearson correlators could also be constructed, following a similar recipe as suggested above, starting e.g. from I 3322 or any other linear Bell inequality with binary outcomes.
Shared randomness witnesses.-Let us come back now to covCHSH. As emphasized before, the value of covCHSH that can be obtained locally depends on the number of deterministic strategies involved in the local 16 strategy being used. This readily allows one to obtain a lower bound on the classical dimension d of the shared variable Λ (i.e., the number of different values it can take), or equivalently its max-entropy H max (Λ) ≡ log 2 d: from the discussion above, it follows that as soon as One may also quantify the amount of shared randomness in terms of the Shannon entropy of Λ, H(Λ) ≡ − λ q λ log 2 q λ (defined here, for simplicity, for the case of a discrete variable Λ that takes the value λ with probability P (Λ = λ) = q λ ). For a given value of covCHSH between 0 and 16 7 , one can also obtain a lower bound on H(Λ) by minimizing it for all local strategies. As it turns out, it suffices to optimise H(Λ) over decompositions onto deterministic strategies with binary outputs ±1-intuitively, local randomness does not help increase covCHSH. The details of our optimization are given in Appendix E, and the results we obtained are plotted on Fig. 2. Unsurprisingly, we find that min H(Λ) increases with the value of covCHSH. As soon as covCHSH > 0, one requires H(Λ) > 0; for covCHSH = 2, one must have H(Λ) ≥ 1 (recall that covCHSH = 2 can be reached by mixing two deterministic strategies with equal weights); finally, reaching the local bound of covCHSH = 16 7 requires at least as much shared randomness as in the distribution P Opt given 1.56. Thus covCHSH acts as a device-independent witness for characterizing the dimension and the entropy of the shared randomness of a local strategy in a Bell experiment. This complements recent works on device-independent tests of the dimension of quantum systems [31], and of the dimension [32] and entropy [33] of classical communications.
Discussion.-In this Letter we introduced Bell inequalities based on covariances, a natural measure of correlations, rather than on linear combinations of probabilities. We presented the simplest example of such a covariance Bell inequality with binary inputs, that echoes the well-known CHSH inequality, and investigated some of its properties. Proving analytically the local bound is not straightforward here, due to the nonlinearity of the Bell expression, but we could nevertheless provide a method to do so. Its quantum bound was also proven analytically.
Beyond this simplest example, we proposed a general recipe to construct, from any standard Bell inequality with binary outcomes, new Bell inequalities for covariances as well as for Pearson correlators. While our analytical method for proving the local bound generalizes in principle to any covariance Bell inequality obtained with our construction, in practice it becomes intractable for larger numbers of inputs. Nevertheless, for the examples we presented the local bounds could reliably be obtained numerically. It would be interesting to find a more efficient way to prove local bounds, as well as quantum bounds, for covariance-based Bell inequalities-or even to find other ways to characterize the local and quantum sets of admissible covariances (note that a tighter characterization of the quantum set than Eq. (7) can already be given, see Appendix B). One possible idea would be to look for some hierarchy of criteria-similar in spirit to that of Navascués-Pironio-Acín (NPA) for quantum correlations-that covariances must satisfy; indeed, one finds that covariances and Pearson correlators appear naturally in the NPA hierarchy [34].
An interesting feature of our covariance Bell inequalities is that they serve as a shared randomness witness. Indeed, in contrast with standard linear Bell inequalities where the local bound can always be attained by a single deterministic strategy, reaching the local bound-or in fact, any nontrivial value-for a Bell expression defined in terms of covariances requires, for a local strategy, to make use of shared randomness. We showed explicitly, on our simplest example, how the value of the Bell expression allows one to place device-independent lower bounds on the amount of shared randomness in a local model (both in terms of its dimension and its entropy). Such witnesses may help addressing certain problems in quantum nonlocality related to shared randomness [35][36][37], in particular finding what is the minimal amount of shared randomness necessary to simulate the correlations of entangled states admitting a local model [38]. Our example with binary inputs allows one to certify the use of relatively little shared randomness (e.g. a dimension of at least 3); it would be interesting to find (families of) covariance Bell inequalities that can certify larger amounts of shared randomness. While covariance Bell inequalities were found to provide a natural way to provide device-independent witnesses for shared randomness, such witnesses could also be studied in other frameworks, with other types of Bell inequalities that require shared randomness to be saturated-e.g. with entropic inequalities [14][15][16].
From a more practical perspective, our covariance Bell inequality could be useful in experimental situations where access to measurement data is limited, e.g. if only covariances can be measured, and where standard Bell inequalities cannot be used. This could be relevant to certain mesoscopic electronics experimental setups. With such applications in mind, it would also be interesting to also investigate similar covariance inequalities to the ones constructed here for other types of quantum nonlocality, e.g. for entanglement [39] or quantum steering [40] (we note that inequalities were constructed in these contexts for covariance matrices, although following very different approaches [41][42][43][44][45]).
Finally, Bell inequalities based on covariances could be useful for the study of nonlocal correlations in networks. When a network features several sources that are assumed to be independent, the set of local distributions (or rather, "N -local distributions" for a network with N independent sources) is typically nonconvex, and nonlinear Bell inequalities are necessary to give an effective description of the (N -)local set [21][22][23][24][25]. In fact, some recent work [46] has already made use of covariances in the context of quantum networks, however not constructing explicit Bell inequalities. The ideas developed here could also find some nice applications in providing ways to obtain new types of Bell inequalities, and possibly shared randomness witnesses, for networks.
Appendix A: Proofs of the covariance Bell inequality (6) Obtaining the local bound for a standard (linear) Bell inequality is rather straightforward, as one can simply focus on deterministic strategies. However, such an approach does not work for covariance Bell inequalities because of their nonlinearity.
In this Appendix we give the details of the proof of the inequality (6), as sketched in the main text. We then present an alternative proof that also uses Karush-Kuhn-Tucker (KKT) multipliers and conditions [26], although in a different way. While the former can in principle be adapted to any other covariance Bell inequality (but may not actually be practical because of the very high number of cases to consider for increased numbers of parameters), the latter exploits specific properties of the CHSH (2input / 2-output) scenario and uses fewer variables in the optimization; it is however less instructive with respect to the shared randomness required for obtaining a given value of covCHSH with a local model, and adapting it to another scenario will first require finding the right properties to exploit.

Optimizing over the weights of deterministic distributions
The proof here will be divided into three parts. The first one consists in showing that, without loss of generality, we can focus on a situation where only binary outputs are considered. The second part describes how standard methods for solving (quadratic) constrained problems can be applied. Finally, the third part shows how our quadratic problem can be simplified to a number of linear ones, and solved. x , B ( ) y ), are the same for the two local distributions P and P . 2 Thus, any values of the covariances cov(A x , B y ) (for the various inputs x, y) obtained by a local distribution with inputs in [−1, +1] can also be obtained by a local distribution with inputs in {+1, −1} (and vice-versa, obviously). The local set for covariances is the same in both cases, and to characterize it it thus suffices to restrict to local distributions with binary outputs ±1.

b. KKT conditions
Our goal is now to find the largest possible value of the quantity covCHSH for any local strategy with binary inputs and outputs. Such a local distribution can be represented by a 16-dimensional vector P , the components of which are the 16 joint probabilities P (a, b|x, y) 3 -and which in fact, because of the normalization and nonsignaling constraints, live in a space of dimension only dim P = 8. 4 Moreover, P admits a convex decomposition in terms of the vertices of the local polytope of the form P = k q k P det k with q k ≥ 0 , k q k = 1, and where the vectors P det k represent the 16 deterministic local strategies. (Note already that due to Carathéodory's theorem [47], for any local distribution P it will in fact be sufficient to consider at most dim P + 1 = 9 deterministic strategies in the decomposition.) Evaluating covCHSH, we get x refers to Alice's output for the measurement x given that strategy P det i is used, and similarly for B j y -so that in particular, C kk = CHSH( P det k ) is the CHSH value obtained for the deterministic strategy P det k . We shall now maximize covCHSH({q k } k ) with respect to the variables q k -which, because of the second term in Eq. (A1), is a nonlinear optimization problem. To account for the constraints that q k ≥ 0 and k q k = 1, we introduce KKT multipliers (i.e., Lagrange-like multipliers) λ k and µ, and define the following Lagrangian: Given the regularity of the problem, with the constraints being affine functions of the variables, the (local) maxima must then necessarily fulfill the KKT conditions [26]:

c. Reduction to linear systems of equations and resolution
Because of the constraint λ k q k = 0, the above system of equations is nonlinear. One can however reduce it to a number of different linear systems of equations by imposing that a given subset of weigths q k take nonzero values, and by considering separately the case of each possible subset. For those q k in the given subset under consideration, the last line of Eq. (A3) simply becomes λ k = 0, q k > 0, while for the other q k 's, it becomes q k = 0, λ k ≥ 0-with in both cases, λ k = −C kk + i q i (C ik + C ki ) + µ according to the first line of Eq. (A3). For a given number d of nonzero weights, the system (A3) then reduces to d + 1 linear equality constraints and 16 (also linear) inequality constraints (with d strict and 16 − d nonstrict inequalities) for the remaining d + 1 nontrivial variables q k and µ.
Note that if only d = 1 weight q k is nonzero (and therefore equal to 1), then the distribution P (a, b|x, y) is deterministic, which implies that all covariances-and hence covCHSH-are zero. Furthermore, as already mentioned previously, due to Carathéodory's theorem it is sufficient to only consider subsets with at most d = 9 (out of 16) nonzero q k 's-indeed, if a maximum is reached by some decomposition involving more than 9 deterministic distributions, then it is also reached by another decomposition giving the same distribution, but involving no more than 9 deterministic distributions. We used Mathematica to solve, for each value of d between 2 and 9, the 16 d different linear systems of equations corresponding to all the different subsets containing d nonzero weights (which makes a total of 9 d=2 16 d = 50 626 linear systems to consider). More specifically, we first found the solutions that satisfy all equality constraints and then checked which ones also satisfy the inequality constraints. To obtain the local bound of our covariance Bell inequality (6), there then remains to check what is the largest possible value of covCHSH for all these feasible solutions.  Table I. Optimal decompositions of the form P = 3 7 P det k 1 + For d = 2, all 16 2 = 120 systems of equations have solutions that satisfy all equality constraints (out of which, 56 have unique solutions and 64 are still underdetermined), but only 4 out of them have (unique) solutions that also satisfy the inequality constraints. Those 4 solutions all give covCHSH = 2, which is the maximal value that one can reach by mixing only 2 local deterministic distributions.
With d = 3 nonzero weights q k , again all 16 3 = 560 systems of equations have solutions that satisfy all equality constraints (432 with unique solutions and 128 still underdetermined), but only 8 of them have (unique) solutions that also satisfy the inequality constraints. Those solutions are listed in Table I; they all have the similar form P = 3 7 P det k1 + 2 7 P det k2 + 2 7 P det k3 , and all give the value covCHSH = 16 7 . As it turns out, this value of 16 7 obtained by suitably mixing 3 deterministic local distributions cannot be increased by mixing more distributions. For d = 4 for instance, we find that out of the 16 4 = 1 820 systems of equations, only 1 516 have solutions that satisfy all equality constraints, out of which only 14 have solutions that also satisfy the inequality constraints. 6 of these (still underdetermined) solutions give a local maximum of covCHSH = 2, while the other 8 (unique) solutionsall of the form P = 3 (one solution being obtained for instance by taking P det k1 = (++/++), P det k2 = (−+/−−), P det k3 = (+−/−+) and P det k4 = (− − / − +))-give covCHSH = 9 4 . The results for all values of d from 2 to 9 are summarized in Table II. For d = 6 and 8, we also get local maxima of covCHSH = 2, while for d = 5, 7 and 9, no solutions are found for any of the corresponding systems of KKT conditions. As one can see, the maximal value of covCHSH obtained for all cases is thus 16 7 ; this concludes the proof that this is indeed the value of the local bound in our covariance Bell inequality (6).
It should be clarified that although Table II gives local maxima of 2 or 9 4 for d ≥ 4, this does not mean that those are the maximum values of covCHSH when mixing d ≥ 4 deterministic local distributions. Indeed, the table gives local maxima obtained in a set delimited by strict inequalities q k > 0, while the suprema over these sets may be obtained for some q k → 0. In fact, covCHSH can get arbitrarily close to 16 7 with a mixture of d ≥ 4 deterministic local distributions by mixing an optimal decomposition with 3 distributions from Table I, with a tiny amount of d − 3 other distributions.
Another observation of interest is that all solutions of the KKT conditions that give a local maximum value of covCHSH = 2 (for d = 2, 4, 6, 8, as listed in the table) are of the general form P = q 1 (+ + / + +) 3 , q 4 ≥ 0 and 2(q 1 + q 2 + q 3 + q 4 ) = 1: for d = 2, three of the coefficients q k are zero (which, for each remaining nonzero q k , gives a unique solution to the corresponding system of equations); for d = 4, two of the coefficients q k are zero; for d = 6, one of the coefficients q k is zero; and for d = 8, all coefficients q k are nonzero (which indeed makes the solutions in these last 3 cases underdetermined). As one can see, in this general decomposition each deterministic distribution comes with its "opposite", in which all outputs are flipped, with the same weight. This implies in particular that all marginal expectation values A x and B y are zero, that the covariances cov(A x , B y ) are equal to the expectation values A x B y , and therefore that the expression of covCHSH simply reduces to that of CHSH (i.e., the nonlinear part vanishes)-which is indeed bounded by 2 for local distributions. This highlights the crucial role played by the nonlinear terms A x B y in covCHSH: these are precisely the terms that allow the local bound of covCHSH to be greater than that of CHSH; and in order to reach a value of covCHSH larger than 2 with a local distribution, one needs at least one pair of settings x, y for which A x B y = 0.

Optimizing over the expectation values AxBy , Ax and By
We now present a second possible approach for the proof of Eq. (6), which builds on the observation that the local bound 16 7 on covCHSH follows from just imposing the local bound 2 on CHSH (which must be respected by any local distribution), and that probabilities are nonnegative. More precisely, as previously we note that one can restrict to binary outputs a, b = ±1; as it turns out, it will then suffice to impose, together with CHSH ≤ 2, that P (a, b|x, y) ≥ 0 for all x, y, a, b satisfying ab = (−1) xy+1 .
Instead of writing covCHSH as a function of the weights of deterministic distributions in a local decomposition, here we will view it directly as a function of the expectation values A x B y , A x and B y . Our goal is thus to maximize the value of covCHSH under the above constraints-which can also all be expressed in terms of those expectation values, by writing in particular P (a, b|x, y) = 1 4 (1 + a A x + b B y + ab A x B y ). As previously, let us introduce KKT multipliers λ and λ xyab (for the 8 combinations of x, y, a, b such that ab = (−1) xy+1 ), and define the Lagrangian The KKT necessary conditions for optimality are λ xyab ab = 0 ∀x, y,  in all cases and λ xyab as given in Eq. (A6)), giving covCHSH = 16 7 and defining the same distributions as in Table I. The first 3 lines define 8 linear equality constraints for the 8 multipliers λ xyab , which can be solved and give We are then left with just the last couple of lines of Eq. (A5), so that either λ = 0 or CHSH = 2, and for each x, y, a, b such that ab = (−1) xy+1 , either λ xyab = 0 or P (a, b|x, y) = 0. We can then consider the 2 1+8 = 512 corresponding cases separately, and solve for each case the resulting linear system of 9 equations for the 9 variables A x B y , A x , B y and λ.
Using Mathematica we found feasible solutions for those equations in 320 of the 512 cases. However, one still needs to check if these solutions satisfy the remaining inequality constraints in Eq. (A5); only in 207 of those cases could we find solutions that indeed satisfy all KKT conditions. Among all these solutions, we found that the maximal value of covCHSH was 16 7 , which again proves that this is the local bound of our covariance Bell inequality (6). This value of 16 7 was obtained for the 8 solutions listed in Table III, which indeed define the same 8 distributions as those listed (in the same order) in Table I.

Generalizing our proofs to other covariance Bell inequalities
The two versions of the proof of inequality (6) presented above could in principle be generalized to calculate the local bound of any covariance Bell inequality constructed from a linear Bell inequality with binary outcomes, following the recipe we suggest in the main text. However, as the number of inputs, and therefore the dimension of the relevant probability space, increase, the number of different cases to consider in the proof may become too large to be tractable in a reasonable time.
For the case of cov3322 with ternary inputs for instance, after reducing to binary outputs and taking into account normalization and non-signalling constraints, the relevant probability space is of dimension dim P = 15. Following the first approach for the proof above, local distributions can be decomposed onto the 2 6 deterministic local distributions, and the number of different cases to consider (corresponding to the number of subsets of d nonzero weights q k , with 2 ≤ d ≤ dim P + 1) is 16 d=2 2 6 d ≥ 7 × 10 14 , a number far too large for all cases to be considered separately.
One may hope that following our second approach for the proof, instead, may reduce the number of cases to be considered down to a tractable one. The first thing to check here would be which constraints (locality constraints in terms of CHSH or I 3322 inequalities, together with nonnegativity of the probabilities constraints) are sufficient to impose in order to obtain the local bound on cov3322. We did not follow this approach any further, and leave as an open question, whether this would be tractable enough to provide an analytical proof of inequality (9).
Instead, to obtain the local bound of inequality (9), we resorted to numerical optimization, by optimizing over the 2 6 = 64 weights q k in a local decomposition of P = k q k P det k . Although the optimization problem is nonconvex and involves quite a few free parameters, we found that the result of the numerical optimization was stable enough when starting from different starting points, which makes us confident that the local bound of 9 2 in inequality (9) is indeed correct.
We note, finally, that the same proof techniques as above do not work for Bell inequalities with Pearson correlators like inequality (10). The first point to be noticed is that, as emphasized before, the local sets for binary outputs a, b ∈ {+1, −1} and for more outputs a, b ∈ [−1, +1] are not the same-indeed we found different local bounds for binary and ternary outputs. Even restricting to a fixed number of inputs and trying to follow our approach with KKT multipliers, the Lagrangians we would write in either of the two proof versions would not be nicely quadratic functions of the weights q k in a local decomposition of the form P = q k P det k (as in Eq. (A2)), or of the expectation values A x B y , A x and B y (as in Eq. (A4)), so that the KKT necessary conditions for linearity would not simplify to linear systems of equations. Instead of pursuing such an approach, we again resorted here to numerical optimizations. As before, the numerical results we obtained were stable enough to make us confident that the local bounds we give are correct.

Appendix B: Tsirelson bounds and quantum violations for covCHSH and rCHSH
In this Appendix we give the proofs that the Tsirelson bounds for both covCHSH and rCHSH are the same as for CHSH, namely 2 √ 2. The proofs presented here are inspired by that of Landau (for rCHSH) in Ref. [30].

Tsirelson bound for covCHSH
First note that by Neumark's dilation theorem, any quantum correlation can be obtained by projective measurements on pure states in Hilbert spaces of large enough dimensions.
Consider a bipartite state |ψ ∈ H AB = H A ⊗ H B and projective measurement operatorsÂ x for Alice andB y for Bob (with the random variables A x , B y corresponding to the results of those measurements). Let us then define the ket vectors |α x = (Â x ⊗ 1 B − Â x ψ 1 AB ) |ψ and |β y = (1 A ⊗B y − B y ψ 1 AB ) |ψ , where 1 X denotes the identity operator acting on the Hilbert space H X and where Â x ψ = ψ|Â x ⊗ 1 B |ψ and B y ψ = ψ| 1 A ⊗ B y |ψ . With these definitions, we have and similarly, Restricting to measurement operators with eigenvalues in [−1, +1], 5 this implies in particular that We thus obtain which is necessarily satisfied by any quantum correlation. This bound can be reached by adequate measurements on a maximally entangled state, see Appendix B 3 below. 5 We note that the restriction to bounded operators with eigenvalues in [−1, +1] is in fact not necessary in the proof, as it is sufficient to just impose σ(Ax), σ(By) ≤ 1 (for any state |ψ ) for the Tsirelson bound on covCHSH to follow.
Let us mention here that following further the proof of Ref. [30], one can actually also refine the characterization of the quantum set in terms of covariances. Indeed, defining the ket vectors |γ 0 = |α 0 , |γ 1 = |α 1 , |γ 2 = |β 0 , |γ 3 = |β 1 and the matrix Γ with coefficients Γ ij = γ i |γ j (for 0 ≤ i, j, ≤ 3), one necessarily has that Γ is positive semidefinite (as Γ = M † M with M = i |γ i i|, where {|i } is the computational basis). That is, taking Eqs. (B1)-(B2) into account, one must have Given that the variances are upper-bounded by 1, one also hasΓ ≥ 0, with the matrixΓ obtained from Γ above by replacing all diagonal terms by 1. Now, it can be shown (following the same arguments as in Ref. [30], see also Ref. [34]) that the condition that there exists (real or complex) coefficients Γ 01 and Γ 23 such thatΓ ≥ 0 requires (as well as the symmetrical inequalities obtained by permuting the measurement inputs and/or flipping the sign of the measurement outcomes), which must therefore necessarily be satisfied by quantum correlations, and strengthens the condition that covCHSH ≤ 2 √ 2.

Tsirelson bound for rCHSH
To obtain the Tsirelson bound for rCHSH, we follow a very similar approach to the one above, considering now normalized ket vectors |α x = |α x /|||α x || and β y = |β y /|||β y || (if |α x or |β y are null vectors, we define |α x or β y to be any unit vector orthogonal to all other ones). With these, we now have Because of the normalization of |α x , β y and r(A x , B y ) (via the division by the variances σ(A x ), σ(B y )), we do not need to restrict here to measurement operators with eigenvalues in [−1, +1] (or such that σ(A x ), σ(B y ) ≤ 1).
With the same calculations as in Eq. (B4), we obtain, for any choice of (bounded) measurement operatorsÂ x ,B y , This bound can again be reached quantum mechanically, see below.
As just mentioned, here no restriction is imposed on the measurement outcomes (provided only that σ(A x ), σ(B y ) < ∞). The bound above also holds for local distributions (which can always be realized quantum mechanically) when measurement outcomes are not necessarily restricted to be binary; as we show explicitly in Appendix D 2 b, it can also be reached locally with ternary outcomes. It is quite remarkable that the local and the Tsirelson bounds coincide in this case.
Let us finally mention again that, as it was done in Ref. [30] (see also Ref. [34]), a tighter characterization of the quantum set in terms of Pearson correlators can also be given: any quantum correlation satisfies arcsin r(A 0 , B 0 ) + arcsin r(A 0 , B 1 ) + arcsin r(A 1 , B 0 ) − arcsin r(A 1 , B 1 ) ≤ π (B9) (as well as the symmetrical inequalities). (6) and (10) The Tsirelson bounds for covCHSH and rCHSH can be reached by the same quantum mechanical correlations as those that reach the maximal quantum value of CHSH = 2 √ 2. For instance, consider that Alice and Bob share a two-qubit maximally entangled state |φ + = 1 √ 2 (|0, 0 + |1, 1 ) and perform the local measure-

Explicit quantum violations of inequalities
whereσ z andσ x denote the Pauli matrices. In that case the marginal expectation values A x and B y vanish, so that covCHSH and rCHSH simply reduce to CHSH, and we indeed obtain covCHSH = rCHSH = CHSH = 2 √ 2. By then rotating for instance Bob's measurement settings together around the y axis of the Bloch sphere, one obtains the full circle drawn on Fig. 1. Appendix C: Higher quantum violations of Ineq. (6) with mixed states: a consequence of nonlinearity In this Appendix we discuss an example illustrating the fact that the nonlinearity of the Bell inequality (6) has nontrivial consequences also in the quantum case. Specifically, consider two pure entangled states of the form with θ ∈ ]0, π/2], and let us then define the equal mixture of these states: We numerically estimated the largest value of the Bell expression (5), optimizing over all local qubit measurements (including positive-operator valued measures) by Alice and Bob, for various values of the parameter θ. The result is presented in Fig. 3. We found, up to numerical precision, that for the states |φ θ and |ψ θ the value of covCHSH was maximal when using the Pauli measure-mentsÂ 0 =σ x ,Â 1 =σ y ,B 0 =σ x−σy √ 2 andB 1 =σ x+σy √ 2 , giving covCHSH = 2 √ 2 sin θ (orange dashed curve on Fig. 3), while the optimal measurements on the state ρ θ were found to beÂ 0 =σ z ,Â 1 =σ x ,B 0 =σ z +sin θσx √ 1+sin 2 θ andB 1 =σ z −sin θσx √ 1+sin 2 θ , giving covCHSH = 2 1 + sin 2 θ (blue curve on Fig. 3). This gives violations of inequality (6) for θ > arcsin 16/7 2 √ 2 0.94 in the first case, and for θ > arcsin ( 16/7 2 ) 2 − 1 0.59 in the second case. We thus find that in the range of parameters 0.59 θ 0.94, none of the two pure states can individually violate the covariance Bell inequality (6), whereas the mixture (C3) does violate it. This effect is possible only via the nonlinearity of the covariance Bell inequality.
Note that the pure states |φ θ and |ψ θ and the mixture ρ give in fact the same correlation functions A x B y for any (projective) Pauli measurementsÂ x =σ Ax andB y = σ By for Alice and Bob. The difference resides in the marginals A x and B y , which are opposite for |φ θ and |ψ θ and are therefore unbiased for the equal mixture ρ θ .
Let us finally mention that we also investigated quantum violations of inequality (6) using mixed entangled states of rank 3 and higher (up to dimension 6 × 6). We always found that the optimal violations were obtained with pure or rank-2 states. It thus seems that mixing more than 2 pure entangled states does not help increase the violations.
In this Appendix we present some local strategies that reach the local bounds of our Bell inequalities (9) and (10), and show how these can be violated quantum mechanically and by non-signalling correlations. Recall that the local bounds were obtained numerically; however, we are confident that the numerics are trustworthy enough, and therefore that the local strategies we present below are indeed optimal.

a. Optimal local strategies
To obtain the local bound for cov3322 we ran a numerical optimization several times and conclude from the stability of the result that it must be 9 2 , as in inequality (9).
There are 4 different local distributions that give the value cov3322 = 9 2 , and that decompose onto three deterministic correlations with weights b. Violations of inequality (9) Inequality (9) can be violated by quantum correlations. For example, taking a two-qubit maximally entangled state |φ + = 1 √ 2 (|0, 0 + |1, 1 ) and suitable measurements (see below), one can obtain cov3322= 5, which is also the highest value for I 3322 (Eq. (8)) obtainable with qubits and projective measurements [9,10,29] (note that in that case, all marginal terms vanish and cov3322 effectively reduces to I 3322 ). We have performed an extensive numerical search, considering entangled states of dimension up to 5 × 5, and could not find any larger quantum violation than cov3322=5. It thus remains an open question, whether higher dimensional entangled states could lead to larger violations, as it is the case for the standard I 3322 inequality [48].
Considering again the families of states |φ θ , |ψ θ and ρ θ of Eqs. (C1)-(C3), the largest values of cov3322 we found (numerically, up to machine precision) are cov3322 = 5 sin θ for |φ θ or |ψ θ (obtained e.g. for A 0 =B 1 =σ x ,Â 1 =B 2 = cos π 3σ x + sin π 3σ y ,Â 2 = −B 0 = cos 2π 3σ x + sin 2π 3σ y ) and cov3322 = 4 + sin 2 θ for ρ θ (obtained e.g. forÂ 0 =B 0 = 1 − sin 2 θ 4σ z + sin θ 2σ x ,Â 1 =B 1 = 1 − sin 2 θ 4σ z − sin θ 2σ x ,Â 2 =B 2 =σ x ). These violate inequality (9) for θ > arcsin 9/2 5 1.12 and θ > arcsin 9 2 − 4 = π 4 , respectively. As it was the case with covCHSH, we thus find a range of parameters (for π 4 < θ 1.12) for which neither |φ θ nor |ψ θ violates inequality (9), but their equal mixture does-which is a consequence of the nonlinearity of cov3322. Similarly to covCHSH this property does not seem to extend to mixtures of more than two pure states, that is, the violation of rank-3 states (or higher) does not appear to be larger than when mixing only two pure states. It is also interesting to note that within the families under consideration, cov3322 is violated by a smaller range of states than covCHSH. This is in contrast to the relationship between the standard CHSH and I 3322 linear Bell inequalities, where all entangled (possibly mixed) quantum states violating (a symmetry of) the former also violate the latter [10]. 6 Note, finally, that the algebraic maximum value of cov3322 = 8 can be attained by the non-signalling distributions such that remaining a free parameter) and with all marginals A x = B y = 0. Such distributions also reach the maximal non-signalling value of I 3322 = 8. For the case of binary outputs (taking e.g. a, b = ±1) we find, again numerically, that the local bound for rCHSH is 5 2 , as in inequality (10). This bound can be reached by the 8 distributions that decompose as mixtures of the same triplets of deterministic distributions P det k1 , P det k2 , P det k3 as those in Table I of Appendix A (i.e., those that allow one to reach the local bound of the covariance inequality (6)), but taking here uniform mixtures, P = 1 3 P det k1 + 1 3 P det k2 + 1 3 P det k3 . E.g., for the first one: P =   (9) is possible with those measurement settings.