Graph-theoretic approach to Bell experiments with low detection efficiency

Bell inequality tests where the detection efficiency is below a certain threshold $\eta_{\rm{crit}}$ can be simulated with local hidden-variable models. Here, we introduce a method to identify Bell tests requiring low $\eta_{\rm{crit}}$ and relatively low dimension $d$ of the local quantum systems. The method has two steps. First, we show a family of bipartite Bell inequalities for which, for correlations produced by maximally entangled states, $\eta_{\rm{crit}}$ can be upper bounded by a function of some invariants of graphs, and use it to identify correlations that require small $\eta_{\rm{crit}}$. We present examples in which, for maximally entangled states, $\eta_{\rm{crit}} \le 0.516$ for $d=16$, $\eta_{\rm{crit}} \le 0.407$ for $d=28$, and $\eta_{\rm{crit}} \le 0.326$ for $d=32$. We also show evidence that the upper bound for $\eta_{\rm{crit}}$ can be lowered down to $0.415$ for $d=16$ and present a method to make the upper bound of $\eta_{\rm{crit}}$ arbitrarily small by increasing the dimension and the number of settings. All these upper bounds for $\eta_{\rm{crit}}$ are valid (as it is the case in the literature) assuming no noise. The second step is based on the observation that, using the initial state and measurement settings identified in the first step, we can construct Bell inequalities with smaller $\eta_{\rm{crit}}$ and better noise robustness. For that, we use a modified version of Gilbert's algorithm that takes advantage of the automorphisms of the graphs used in the first step. We illustrate its power by explicitly developing an example in which $\eta_{\rm{crit}}$ is $12.38\%$ lower and the required visibility is $14.62\%$ lower than the upper bounds obtained in the first step. The tools presented here may allow for developing high-dimensional loophole-free Bell tests and loophole-free Bell nonlocality over long distances.

Bell inequality tests where the detection efficiency is below a certain threshold η crit can be simulated with local hiddenvariable models. Here, we introduce a method to identify Bell tests requiring low η crit and relatively low dimension d of the local quantum systems. The method has two steps. First, we show a family of bipartite Bell inequalities for which, for correlations produced by maximally entangled states, η crit can be upper bounded by a function of some invariants of graphs, and use it to identify correlations that require small η crit . We present examples in which, for maximally entangled states, η crit ≤ 0.516 for d = 16, η crit ≤ 0.407 for d = 28, and η crit ≤ 0.326 for d = 32. We also show evidence that the upper bound for η crit can be lowered down to 0.415 for d = 16 and present a method to make the upper bound of η crit arbitrarily small by increasing the dimension and the number of settings. All these upper bounds for η crit are valid (as it is the case in the literature) assuming no noise. The second step is based on the observation that, using the initial state and measurement settings identified in the first step, we can construct Bell inequalities with smaller η crit and better noise robustness. For that, we use a modified version of Gilbert's algorithm that takes advantage of the automorphisms of the graphs used in the first step. We illus-

Introduction
Bell nonlocality [1,2], that is, the violation of inequalities satisfied by any local hidden-variable (LHV) model, called Bell inequalities, is one of the most fascinating features of quantum mechanics and a crucial mean to accomplish tasks that are impossible with classical resources.
The detection efficiency η in an experimental test of a Bell inequality is the ratio between the number of systems detected by one party and the number of pairs emitted by the source. η depends not only on the efficiency of the detectors, but also on all the losses occurring during the distribution of the state. Pearle [3] and Wigner [4] noticed that experimental correlations in Bell inequality tests where the detection efficiency is below a certain threshold η crit can be simulated by LHV models. Therefore, if η is not high enough, the quantum advantage in many Bell inequality-based protocols (e.g., for randomness expansion [5,6,8,7] and secure key distribution [9,10,11,12,13]) vanishes. Avoiding this so-called "detection loophole" requires surpassing η crit . However, η crit depends on the quan-tum correlations (i.e., the state prepared and the measurements performed) and the targeted Bell inequality.
In this work, we identify quantum correlations and Bell inequalities requiring the smallest η crit reported, to our knowledge, in the literature for symmetric Bell tests (i.e., those in which all detectors have the same detection efficiency). The correlations are produced by maximally entangled states of experimentally accessible dimensions (e.g., d = 16) and two-outcome measurements. In addition, we describe a method that provides arbitrarily small η crit but requires higher dimensions.
The importance of these results lies on the fact that they pave the way to extend the groundbreaking loophole-free Bell tests performed on quantum systems of dimension d = 2 (i.e., qubits) and distances between 60 and 1300 m [17,14,15,16] to quantum systems of higher dimensions and longer distances.

Structure of the paper
In Sec. 2, we collect the smallest values of η crit reported in the literature and explain how they have been obtained. We also recall a standard form of expressing Bell functionals that will be used in several places.
Finding states, measurements, and Bell inequalities leading to small values of η crit is difficult. One of the reasons is that, as we will see, these values occur for Bell inequalities with many settings for which computing the local bound is, in general, intractable [18]. Another reason is the difficulty of, given a Bell inequality, finding the state and measurements producing maximal quantum violations.
In Sec. 3, we introduce a method that overcomes both problems, as it connects the local bound of a family of bipartite Bell inequalities to the independence number of a graph, and quantum realizations that maximally violate the Bell inequalities to orthogonal representations of the graph. This allows us to identify examples of quantum correlations and Bell inequalities with unprecedentedly low η crit .
In Sec. 4, we present a method based on graph theory to obtain explicit states and measurements making η crit arbitrarily close to zero.
There are, however, two problems that make the examples obtained up to that point not use-ful in practice. One is that, in some cases, they require too many settings. In Sec. 5, we present a method for searching for examples with low η crit and smaller number of settings.
The other problem is that, by construction, the quantum violations of the graph-based Bell inequalities are very sensitive to noise. In Sec. 6, we explain why and present a method to address this problem. The method applies to any of the (highly-symmetric) examples identified with the techniques in Sec. 3 and produces a Bell inequality for the same correlations (i.e., the same state and measurements) with smaller η crit and higher resistance to noise.
Finally, in Sec. 7, we discuss how the different methods presented in this work can help us to design loophole-free Bell tests between high-dimensional quantum systems and achieve loophole-free Bell nonlocality over longer distances.

Previous works 2.1 Existing values of η crit
For symmetric Bell tests and perfect visibility (as defined later), η crit = 0.828 using maximally entangled states [19] for the simplest Bell inequality (the one with two dichotomic settings per party): the Clauser-Horne-Shimony-Holt (CHSH) inequality [20]. Eberhard [21] noticed that η crit can be further reduced using nonmaximally entangled states and, in particular, that it can be lowered down to 0.667 for the Clauser-Horne (CH) inequality [22].
For Bell inequalities with four settings and maximally entangled states, η crit is not better than for CHSH (with one exception that allows a slightly lower value; η crit = 0.821) [23,24].
Although loophole-free Bell tests [17,14,15,16] have proven that it is possible to produce correlations between local quantum systems of dimension d = 2 that do not admit LHV models, the value of η crit required in these experiments (≥ 0.720 due to the noise) prevents real-life applications and, in particular, applications outside laboratories with well controlled losses, or involving longer distances (e.g., > 5 km). It is in this sense that the requirement of η crit > 0.667 (without noise, η crit > 0.720 with noise) acts as a bottleneck that blocks many real-life applications.
Massar [25] discovered that high-dimensional systems can tolerate a detection efficiency that decreases with the dimension d of the local quantum system. However, he only found an improvement over the qubit case for d > 1600. Vértesi,Pironio,and Brunner [26] lowered η crit down to 0.770 for maximally entangled states and to 0.618 for nonmaximally entangled states using d = 4.
Márton, Bene, and Vértesi [27] have studied the case of N copies of the two-qubit maximally entangled state and local Pauli measurements which act in the corresponding qubit subsystems. They obtained the following upper bounds for η crit : 0.809 for N = 2 (which is equivalent to d = 4), 0.740 for N = 3 (which is equivalent to d = 8), and 0.693 for N = 4 (which is equivalent to d = 16). More recently, Miklin et al. have reported a method that allows us to reduce η crit down to ≈ 0.469 for d = 512 [28].
In this article, we focus on the case of two parties and symmetric detection efficiency, since we see it as the closest one for realistic applications. However, it should be mentioned that another way of obtaining low η crit is by considering Bell experiments involving ≥ 3 spatially separated parties [29,30,31]. Still, the difficulty for preparing and distributing the required states makes the resulting values η crit unpractical for actual applications. In addition, it should also be pointed out that η crit can be reduced for some detectors at the expense of requiring η crit ≈ 1 for other detectors [32,33,34,35].

Calculating η crit
Here, we summarize the different ways for calculating η crit that can be found in the literature for the case that the propagation losses and detection inefficiencies are the same for all the detectors. For a more detailed discussion, see Ref. [36].
In an ideal Bell test, every run would end up with the two particles emitted by the source being detected, one at one party's site and the other at the other party's. However, in a real Bell test this may not be the case. As pointed out before, reasons for that are the existence of propagation losses and the imperfection of the detectors. Consequently, a detection at one site may not be accompanied with a detection at the other site and also, in some runs, both particles may be undetected.
In some cases, in addition to the local losses and imperfect detectors, the particles are not emitted at well-known times, then the number of emitted pairs, and thus the number of runs of the Bell test, will be unknown. Below we summarize how η crit can be calculated in each case.
Case I. The number of runs is known. This is the case in event-ready experiments [37,17,16] and in the proposals [38,39,40,41] and experiments [42] with heralded detection.
Case I. Strategy I. We can associate the nodetection with a new outcome of the measurement and find a new Bell inequality with the same number of settings but one more outcome per setting than in the original Bell inequality. Then, the experiment will be free of the detection loophole as soon as the new inequality is violated. The problem is that finding this new Bell inequality may be difficult.
For example, if we add a new outcome to all the measurements in the (2, m, 2) Bell scenario (i.e., the one with 2 parties, m settings per party, and 2 outcomes), then we end up in the (2, m, 3) Bell scenario. Then, the number of deterministic LHV assignments changes from 2 2m to 3 2m . Meanwhile, the dimension of the LHV assignments changes from 2m + m 2 to 4m + 4m 2 . To make clear the difficulties that finding such Bell inequalities involve, notice that, so far, we do not know the Bell inequalities for any (2, m, 3) Bell scenario.
Case I. Strategy II. We can associate the nodetection with one of the outcomes of each measurement and use the original Bell inequality. Then, the experiment will be loophole-free as soon as the original Bell inequality is violated.
To obtain η crit in this case, we can act as follows. In an ideal Bell test in which we could achieve the maximum quantum value Q of a Bell expression I whose bound for LHV models is C, and in which the experimental detection efficiency is η, the experimental value of I would be (1) where Q A is the value of I resulting of what the parties output when Alice has detected the particle but not Bob (and similarly Q B ), and X is the value that the parties output when both Alice and Bob have not detected the particles. Usually, the outputs are chosen such that X = C. The critical detection efficiency using this strategy is This is the strategy used to obtain all the values previously reported except the ones in [21,26]. This will also be the strategy used in this paper.
Case II. Strategy III. This strategy works for the CH Bell inequality [22], for inequalities that can be written in terms of the CH functional [26], and for some Bell inequalities that can be rewritten similarly [55]. The CH functional has a peculiarity that makes it useful. It only contains joint and marginal probabilities of one of the outcomes. Then, there is no need to modify the bound for LHV models when η is not 1. Instead, a lower η makes that the probabilities become lower so that the value of the Bell expression decreases. The joint probabilities decrease faster than the marginal probabilities. This strategy uses the expected values of η and the noise for choosing the nonmaximally entangled state that maximizes the violation [21]. This is the strategy used in [21,26] and adopted in the photonic loophole-free Bell tests [14,15].
Case II. Other strategies. These strategies compute η crit under extra assumptions on the distribution of nondetections. See, e.g., [19]. We do not enter into details here, as the need of extra assumptions is considered a weak point [56,36].

Collins-Gisin parametrization
Following the idea introduced in Ref. [57], we will sometimes use a matrix to specify the functional I associated to a Bell inequality I ≤ C (where C is the bound for LHV models) as where the entries are coefficients for different terms that appear in I, which is assumed to contain only two-outcome (0 and 1) measurements. As an example, c(Π A 1 = 1) indicates the coefficient that multiplies P (Π A 1 = 1) and . This technique allows us to write any Bell functional (even those with measurements with more than two outcomes) as a linear combination of joint and marginal probabilities, but without including one of the outcomes of each measurement. The coefficients of the probabilities involving this outcome can be computed from the normalization and no-signalling conditions.
3 Graph-theoretic approach to Bell nonlocality with low detection efficiency

General results
Here, we first introduce a family of bipartite Bell inequalities, in which each inequality is associated to a graph G, such that the number of settings of each party coincides with the number of vertices of G and the number of outcomes is two. The first interesting point about this family is that the LHV bound of each inequality coincides with the independence number of G. Therefore, we can take advantage of the vast literature on independence numbers of countless families of graphs to write Bell inequalities whose local bounds would be difficult to compute otherwise. Definition 1 (Independent set). An independent set [58] of a graph G is a subset of vertices where any two vertices are nonadjacent.
Hereafter, u ∼ v will indicate that u and v are adjacent.
Definition 2 (Independence number). The independence number [58] of a graph G, denoted by α, is the largest cardinality of any independent set of G.

Definition 3 (Xi number). The xi number of a graph G is
where S α+1 is the set of all subsets of (α +1) vertices of G, where α is the independence number of G, and For example, Ξ = 2 for the circulant graph Ci 10 (2, 3), i.e., the 10-vertex graph in which vertex i is adjacent to vertices i + 2 and i + 3.
Definition 5 (Graph automorphism). An automorphism of a graph G is a permutation σ of the vertex set of G, such that the pair of vertices (i, j) is adjacent (i.e., forms an edge) if and only if the pair (σ(i), σ(j)) is adjacent.
This implies that, if S contains no fewer than (α + 1) vertices, then In addition, Ξ ≥ 1, since there is at least one edge among any set of (α + 1) vertices, given that α is the independence number.
Theorem 1. Given a graph G with vertex set V , edge set E, independence number α, and xi number Ξ, the following is a Bell inequality: where P (Π A i = Π B j = 1) is the probability that Alice obtains the outcome 1 and Bob obtains the outcome 1 when Alice measures the observable Π A i (with possible outcomes 0 and 1) and Bob measures the observable Π B j (with possible outcomes 0 and 1).
Proof. To obtain the upper bound of I for LHV models, we only need to consider deterministic probability assignments. From the definition of I, it is easy to see that the bound cannot be less than α. Therefore, the bound can only be obtained when the events [Π A i = Π B i = 1] have been assigned the value 1 for any i ∈ S, where S contains no fewer than α vertices.
Let us assume that S contains no fewer than α + 1 vertices and let us call v the vertex in S such that |{u|u ∼ v, u ∈ S}| = Ξ(S).
By changing the assignment of the event [Π A v = Π B v = 1] to be 0, the increment of I is −1 + Ξ(S) Ξ . This is because ∀i, j ∈ S, with our current assignment, especially for i = v or j = v. Therefore, in the case that S contains no fewer than (α + 1) vertices, we can always set the assignment of one event [Π A v = Π B v = 1] to be 0, such that the value of I does not decrease. This implies that the upper bound can be obtained in the case that S contains exactly α vertices, which implies that the upper bound can be no more than α. Consequently, the upper bound for LHV models is exactly α.
There is a second reason why the Bell inequalities (8) are interesting for us. The reason is that they allow us to establish a one-to-one connection between a quantum value for I and another graph invariant of G. Moreover, this connection also gives us the initial state and the local observables that provide the quantum value for I. Definition 6 (Orthonormal representation). An orthonormal representation in C d of a graph G with vertex set V is an assignment of a nonzero unit vector |v i ∈ C d to each i ∈ V satisfying that v i |v j = 0 for all pairs i, j of adjacent vertices. Such an assignment does not require that different vertices are assigned different vectors, nor that nonadjacent vertices correspond to nonorthogonal vectors.
An additional unit vector |ψ ∈ C d , called handle, is sometimes specified together with the orthonormal representation.
Notice that in many works in graph theory the usual definition of orthonormal representation assigns orthogonal vectors to nonadjacent -instead of adjacent-vertices. Definition 7 (Orthogonal rank). The orthogonal rank [59] of a graph G, denoted ξ, is the smallest positive integer d for which there is an orthonormal representation in C d of G.
Quantum pure states are represented by rays. Therefore, ξ is also the minimum dimension a quantum system must have so adjacent vertices in G can be assigned orthogonal quantum states (or orthogonal rank-one projectors). However, it can be the case that the same ray is assigned to different vertices.

Definition 8 (Graph of orthogonality). Given a set of vectors S, the graph of orthogonality of S is the graph in which each vector is represented by a vertex and two vertices are adjacent if and only if their corresponding vectors are mutually orthogonal.
Theorem 2. For any graph G, the maximum quantum value of I, defined in Eq.
where |V | is the number of vertices of G and ξ is the orthogonal rank of G. The value I = |V | ξ is achieved by preparing the maximally entangled state |j |j (12) and using as local settings on Alice's side the observables represented by the projectors |v i v i |⊗1, with |v i in an orthonormal representation of dimension ξ of G, and as local settings on Bob's side the observables represented by the projectors Proof. By definition of ξ, the value I = |V | ξ , can be achieved in quantum mechanics using the maximally entangled state (12) and locally measuring the rank-one projectors corresponding to an orthonormal representation of dimension ξ of G in Alice's side and its complex conjugate in Bob's side.
Theorems 1 and 2 allow us to link an upper bound of the critical detection efficiency η crit for the quantum violation of the Bell inequality (8) produced with maximally entangled states with invariants of the graph that originates the Bell inequality.

Theorem 3. For any Bell inequality of the form
where α, |V |, and ξ are the independence number, the number of vertices, and the orthogonal rank of G, respectively.
Proof. Recall that the Collins-Gisin parametrization allows us to write any Bell expression as a linear combination of joint and marginal probabilities, without including one of the outcomes of each measurement. Then, a strategy in case of no detection is to associate the no-detection with the outcome 0, which is assumed to be the one that does not appear explicitly in the Bell expression. Following this strategy, the probabilities in the Bell expression transforms as follows: If the Bell expression contains no marginal items, as it is the case in the Bell functional in (8), then, in Eq. (2), Q A = Q B = 0. If no detection is associated to the outcome 0, then X = 0. Consequently, the quantum value in the ideal case becomes η 2 Q. Then, in this case, where C is the upper bound of I for LHV models. Then, using Theorems 1 and 2, we obtain Eq. (13).

Examples of nonlocal correlations with low η crit
Here, we use Theorem 3 to identify quantum correlations and Bell inequalities with low η crit .

Definitions
Definition 9 (Pauli observables). The set P n of Pauli observables for a system of n ≥ 2 qubits consists of the nontrivial quantum observables represented by n-term tensor products of the Pauli matrices σ x , σ y , σ z , and I (the 2 × 2 identity matrix).
The cardinality of P n is |P n | = 4 n − 1, since P n does not contain the 2 n × 2 n identity matrix.
Definition 10 (Pauli states). The set P n (C) of Pauli states for a system of n ≥ 2 qubits consists of the common eigenstates of all the maximal subsets of P n containing only mutually compatible observables (i.e., represented by mutually commuting matrices) of maximal size.
The Pauli states are also called the "quantum states arising from the Pauli group" [64]. The eigenvectors of each subset of maximal size of P n containing only mutually compatible observables provide an unique orthogonal basis of vectors with d = 2 n vectors. There are L = n j=1 (2 j + 1) such subsets, and P n (C) is the union of the L disjoint orthogonal bases. Accordingly, |P n (C)| = Ld.
Hereafter, we denote by P n (R) the subset of P n (C) represented by vectors with all components in R. |P n (R)| = n j=1 (2 j + 2).

Definition 13 (Lovász's number). The Lovász number of a graph G is
where the maximum is taken over all orthonormal representations {|v i } i∈V of G and handles |ψ (i.e., normalized vectors) in any dimension.
By the definition of ϑ(G), there is a quantum realization that achieves I = ϑ(G) for the I associated to G using Eq. (8).

Definition 14 (Fractional packing number).
The fractional packing number of a graph G [60,61,62] is where the maximum is taken over all p i ≥ 0 and for all cliques C of G, under the restriction It will be useful that ϑ(G) ≤ α * (G).
Definition 15 (Hadamard or orthogonality graphs Omega). For n ∈ N, an orthogonality Geometrically, the vectors assigned to the vertices of the Hadamard graph Ω n correspond to the directions of the vertices of an n-dimensional hypercube centered at the origin. Newman states may be seen as a subset of such hypercube directions. Therefore, a Newman graph Y n is an induced subgraph of an orthogonality graph Ω n .
Definition 16 (Induced subgraph). Given a graph G with vertex set V and edge set E, and a subset of vertices S ⊂ V , the subgraph of G induced by S is the graph with vertex set S, and edge set consisting of all the edges (u, v) ∈ E such that u, v ∈ S [58].

Definition 17
(Hadamard matrix). A Hadamard matrix of order n is a real n × n square matrix H n in which all its entries are either +1 or −1, and whose rows are mutually orthogonal.
The order n of a Hadamard matrix must be 1, 2, or a multiple of 4. Therefore, if n is an even number, each pair of rows in a Hadamard matrix represents two mutually orthogonal ±1-vectors in dimension n. The same is true for its columns considered as ±1-vectors. Therefore, taking any pair of rows (alternatively, columns), the number of matching entries must be equal to the number of mismatching entries, exactly n/2.

Definition 18 (Lexicographic product of graphs). The lexicographic product of two graphs
The lexicographic product is associative but not commutative (a fact emphasized by the notation).

Pauli-4320
The graph of orthogonality of P 4 (R) has α = 72 and ϑ = α * = |V | ξ = 270. Therefore, by preparing the maximally entangled state (12) of local dimension ξ = 2 4 = 16 and allowing the parties to choose between the 4320 two-outcome measurements represented by |v i v i |, with |v i ∈ P 4 (R), they produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that η which is an unprecedentedly low upper bound for this dimension (see Sec. 2.1). Notice that 4320 local choices are not too many for a realistic Bell test. For example, a photonic loophole-free Bell test may have 3502784150 trials [14], which is enough for a Bell test in which each party has to chose between 4320 settings, as it gives 187.7 trials for each possible combination of settings (x, y), which is more than three times the number of trials per (x, y) in the first loophole-free Bell test [17]. Recall that all measurements have two outcomes, as in the test of the Clauser-Horne-Shimony-Holt Bell inequality [20]. Therefore, only two detectors per party are necessary.

Pauli-36720
We conjecture that the graph of orthogonality of P 4 (C) has α = 396. This conjecture is based on the fact that, after months of computations, 396 is the largest value that we have found (and we have found it many times, which suggests that our search is sufficiently dense). The computation is based on a greedy-type algorithm taking into account the symmetry of the graph as well as known upper bounds for the independence number by means of spectral graph theory. Given a graph G, we proceed as follows. (i) Compute the automorphism group of G and the corresponding orbits. These orbits will yield a partition of the vertex set {1, . . . , |V (G)|}. (ii) From each orbit O k we select a vertex v k ∈ O k . This vertex then has two options: It can either be part of a maximal independent vertex set or it is not, i.e., v k ∈ I(G) or v k / ∈ I(G). If v k ∈ I, then remove v k and all neighbours of v k . This produces a tuple (G 1 , 1) containing a new graph G 1 and 1, as we have removed a vertex from the independent set of the original graph. On the other hand, if v k / ∈ I(G), we can remove the whole orbit O k of G with v k ∈ O k what yields another graph G 2 . As we have not removed a member of I, we store the tuple (G 2 , 0). In total, this produces a sequence of graphs with a strictly decreasing number of vertices. Once the size of all graphs is lower than a threshold κ for which α can be computed directly, the decomposition stops yielding a set However, the problem with this approach is (revealing the hardness of the problem of computing α) that the number of graphs in the decomposition grows exponentially. If one has a sufficiently high lower bound for α(G) given a priori, one only needs to collect those graphs appearing in the decomposition process whose independence number is larger than this a priori bound.
In addition, ϑ = α * = |V | ξ = 2295. Therefore, if the above conjecture is correct, then, by preparing the maximally entangled state (12) of local dimension ξ = 2 4 = 16 and allowing the parties to choose between the 36720 twooutcome measurements represented by |v i v i |, with |v i ∈ P 4 (C), they can produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that

Newman-2 26
As it is proven in Sec. 3.2.6, the graph of orthogonality of N 28 has α = 397594 and ϑ = α * = |V | ξ = 16777216 7 ≈ 2.3967 × 10 6 . Therefore, by preparing the maximally entangled state (12) of local dimension ξ = 28 and allowing the parties to choose between the 2 26 two-outcome measure-ments represented by |v i v i |, with |v i ∈ N 28 , they can produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that η N 28 crit ≤ 0.407. (22) Arguably, 2 26 two-outcome measurements are too many for a real Bell test. The aim of this and the next example is to show that, by digging in the literature, one can find sets of vectors (or graphs), leading to gedanken Bell tests with very low η crit .

Newman-2 30
As it is proven in Sec. 3.2.6, the graph of orthogonality of N 32 has α = 3572224 and ϑ = α * = |V | ξ = 2 25 . Therefore, by preparing the maximally entangled state (12) of local dimension ξ = 32 and allowing the parties to choose between the 2 30 two-outcome measurements represented by |v i v i |, with |v i ∈ N 32 , they produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that

Independence number and quantum value for the Newman graphs
The independence number of the Newman graph Y n can be obtained by exploiting a connection [65] between Y n and the orthogonality graphs Ω n , also known as Hadamard graphs or Deutch-Jozsa graphs. The graphs Ω n were introduced by Ito [70,71] as a tool to provide an algebraic graph theoretic background for Hadamard matrices. Hadamard graphs appear in relation to some quantum communication protocols and some proofs of the Kochen-Specker theorem [72,73,74,75,76]. By definition, the graph Y n is a subgraph of Ω n induced by a specific subset of its vertices.
For our purposes, the only interesting graphs Ω n are those for which n = 4k, k ∈ N. Otherwise, Ω n is empty for n odd, or bipartite for n = 2 mod 4 [65]. Restricting ourselves to such interesting graphs Ω n=4k , the first observation is that Ω n is the disjoint union of two isomorphic graphs, where Ω e n is the graph defined by the vertices corresponding to vectors with an even number of components 1, and Ω o n is the graph defined by the vertices corresponding to vectors with an odd number of components 1. Therefore, the independence numbers are related as follows: and the orthogonal ranks are related as follows: The second step is noticing that Ω e n is the lexicographic product of Y n with the complement of the complete graph on two vertices, Therefore (see Theorem 5), and The orthogonal rank of Ω n is n [77,78]. Therefore, and the assignment of n-dimensional rays with components −1 and 1 to the vertices Y n such that adjacent vertices are assigned orthogonal rays yields an orthogonal representation of Y n of minimum dimension. On the other hand, α(Ω n ) is known for n = 4p k , for k ≥ 1 where p is an odd prime [79], and also for n = 2 k for k ≥ 2 [80]. In both cases, It still remains a conjecture whether Eq.
In addition, Y n has |V | = 2 n−2 vertices and |E| = 2 n−4 n n/2 edges. Let us show that, for the two considered Newman graphs, the orthogonal rank (i.e., the minimal dimension of the physical realization) equals their clique number (size of the largest clique).
In order to prove that Newman's graphs Y 28 and Y 32 contain cliques of size 28 and 32, respectively, note that such cliques correspond to sets of pairwise orthogonal ±1-rays of cardinality 28 in dimension 28, or cardinality 32 in dimension 32, in which the number of −1 components is an even (alternatively, odd) number. This fact allows us to rephrase this problem in a slightly different and more convenient way, using Hadamard matrices: our goal is to construct adequate Hadamard matrices H n of orders n = 28 and n = 32. Each row in H n is a ±1-vector in dimension n and, by definition, the n rows in H n constitute a set of n pairwise orthogonal ±1vectors in dimension n. In fact, these vectors are rays since no two rows can have the same entries with opposite signs, due to orthogonality. If necessary, we can transform H n into another equivalent n × n Hadamard matrix by negating rows or columns, or by interchanging rows or columns, so that the number of −1 components of the row vectors is an even (alternatively, odd) number. Notice that, in the end, the resulting set of vectors corresponds to a maximum clique of size n in the Newman graph Y n .
According to Hadamard's conjecture, a Hadamard matrix H n of order n = 4k exists for every positive integer k. At the present time, after applying the construction methods due to Sylvester, Paley, Williamson and others, the smallest order for which no Hadamard matrix is known is n = 668. And there are many orders n > 668 for which H n is known. This means that all Newman graphs Ω n=4k with n < 668 satisfy that ω(Y n ) = n.
There is a well known recursive procedure to construct Hadamard matrices H n of order n = 2 k , k ∈ N, the so called Sylvester's construction [81]. Applying this procedure, H 32 can be obtained. This matrix fulfills the condition that the number of −1 entries in each row is an even number, hence providing a clique of size 32 for the Newman graph Y 32 .
Specifically, from H 32 , we arrive at the following clique of size 32: the set of rays of the form 1, 1, 1 A Hadamard matrix H 28 is more convoluted. It can be obtained through the so-called Paley's construction (Lemma 2 in Ref. [82]). There are 487 inequivalent matrices H 28 . Examples of them can be found in the literature. To exhibit a specific instance of a clique of size 28 induced in Y 28 we look for a matrix H 28 such that the number of −1 entries in each row is again an even number. Such a matrix (using 0, 1 entries instead of ±1) can be found, v.g., in Fig. 1 in Ref. [83]: The set of row vectors obtained by replacing therein each 0 entry with −1 constitutes the desired clique.
Finally, we will prove that for Newman graphs Y n with n = 28 and n = 32, the quantum value of I given by Eq. Yn) . First, note that both Ω e n andK 2 are vertex-transitive. Given that Ω e n = Y n [K 2 ], we know that Y n is also vertex-transitive, since the lexicographic product of two graphs is vertextransitive if and only if both graph factors are vertex-transitive [84].
On one hand, it is known [77] that Since ϑ is multiplicative in the lexicographic product (see Theorem 5), we have ϑ( 2 , because Ω n = Ω e Ω o . As a consequence, On the other hand, the fractional packing number in a vertex-transitive graph G satisfies α * (G) = |V (G)| ω(G) , where |V (G)| is the number of vertices and ω(G) is the clique number of G. Given that |Y n | = 2 n−2 and knowing that the clique number for Y 28 and Y 32 is ω(Y 28 ) = 28 and ω(Y 32 ) = 32 (as proved before), and by vertextransitivity, we obtain that the quantum values of I can be and respectively.
3.2.7 Newman-2 26 and Newman-2 30 are stateindependent contextuality sets Definition 19 (SI-C set). A State-independent contextuality (SI-C) set [85] in dimension d ≥ 3 is a set of projectors that produces noncontextual correlations (i.e. that violate some noncontextualty inequality) for any initial quantum state of dimension d.
SI-C sets play a fundamental role in our method for identifying correlations with low η crit , as any SI-C set produces a quantum violation of a graph-based Bell inequality of the form (8). However, there are sets that are not SI-C sets and produce a quantum violation of a Bell inequality of the form (8) [85].

Theorem 4. Newman-2 26 is a SI-C set in dimension d = 28 and Newman-2 30 is a SI-C set in dimension d = 32.
In order to prove Theorem 4, we will first state and prove the following lemma, in which in a mild abuse of notation, we will use Ω e n and Ω o k to refer not only to the Hadamard graphs but also to the sets of vectors constituting their orthogonal representations: where 0| n = (0, . . . , 0) and all the vectors v|'s are unnormalized.
Proof. We prove the lemma by induction. It's straightforward to verify that those claims hold for n = 3. Let us assume now that they also hold for n = k. and Ω o k+1 , so that This implies that where the last equality holds because Ω e k and Ω o k have same number of elements, i.e., 2 k−1 .
On the other hand: Similarly, we can prove Thus, our claims hold for any n ≥ 3.

Now, Theorem 4 is straightforward:
Proof. Let N n be the set of rays constituting an orthonormal representation for the Newman graph Y n . From Lemma 1, and by definition, where v|'s are normalized vectors, u|'s are unnormalized. In the case 2 n−2 /n > α(Y n ), the set N n is a SI-C set. In particular, this is true for N 28 and N 32 , as claimed. It is also true for N n with n = 12, 16, 20, 36, 44, 52, 64, 68, 100, 108, 128, 196, 256, 324, 484, 500, 512, since these are the values for which Eq. (31) can be proven, satisfy α(Y n ) < |V (Y n )|/ω(Y n ), and are smaller than 668, which is the smallest value for which no Hadamard matrix is known.
For these sets of Newman states, η crit tends to zero as n grows. In particular, for n = 512, η crit < 1.6 × 10 −14 .

Experimental realization
One way of preparing and measuring Pauli and Newman states of dimension d is by using single photons (or neutrons or atoms or any type of radiation) in a Reck et al. d-input d-outcome multiport [66] or in its simplification by Clements et al. [67]. For state preparation, we may take further advantage from the fact that any unitary can be achieved no matter in which input the photon is injected. Therefore, we can use a specific input and remove all the elements in the paths not used. More interestingly is the possibility of simultaneously injecting several indistinguishable particles (either bosons or fermions) in different ports of a multiport interfeometer. This would allow us to achieve high d using more compact setups. In this case, the problem of preparing and measuring Pauli and Newman states is still open, but can be addressed by taking advantage of the criteria for the suppression of certain output events in particular interferometers [68,69]. For example, Newman states seem to be achievable using Sylvester interferometers [69].

Arbitrarily small detection efficiency
Here we show that, beyond specific examples, there are constructive methods such that, if there are no restrictions on the number of local settings or the local dimension of the quantum system, we can identify quantum correlations and a corresponding Bell inequality with respect to which the critical detection efficiency (above which no LHV model can be constructed) is as close to zero as desired.

Theorem 5. If G•H is the graph obtained either by the OR product or the lexicographic product of the graphs G and H, then α(G • H) = α(G)α(H) and ϑ(G • H) = ϑ(G)ϑ(H).
That α and ϑ are both multiplicative in the OR product is proven in, e.g., [86] (Sec. 21) and [87] (Lemma 2.9). The same fact with respect to the lexicographic product is proven in, e.g., [88] and [89]. (8) associated to a graph G n , denoting the OR or lexicographic product of n copies of the graph G, local models are impossible if the detection efficiency is

Theorem 6. For any Bell inequality of the form
where α, |V |, and ξ are the independence number, the number of vertices, and the orthogonal rank of G, respectively.

By definition, G[H] is a spanning subgraph of G H. More explicitly, V (G[H]) = V (G H) and E(G[H]) ⊂ E(G H). Therefore, by taking G H and deleting some specific edges, we obtain G[H].
This implies that using the lexicographic product is more convenient, as a smaller number of edges in the final graph means that the violation of the Bell inequality (8) is, as we will see, more resistant to noise.

Example: Pauli-240 n
The graph of orthogonality of P 3 (R) has α = 16 and ϑ = α * = 30. Therefore, by preparing the maximally entangled state (12) of local dimension ξ = 2 3 = 8 and allowing each of the parties to choose between the 240 two-outcome measurements represented by |v i v i |, with |v i ∈ P 3 (R), they can produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that η crit ≤ 0.730. Therefore, with a system of local dimension 8 2 , and locally measuring the observables associated to the vertices of the lexicographic product of P 3 (R) with itself, And with a system of local dimension 8 3 , The interest of this method is that it tends faster to η crit = 0 using smaller d than in any previous method. The downside is that, at least applied to the examples provided here, it requires too many settings.

How to search for examples with low η crit and a smaller number of settings
Most of the examples we have presented so far require too many settings to be tested in actual experiments. This leads to the question of whether we can achieve low η crit using a moderate number (e.g., < 100) of settings. The aim of this section is showing that, arguably, the answer is affirmative. However, finding them will require some extra work.

First strategy: Vertex-transitive graphs
So far, our strategy for finding examples with low η crit was inspired by (the graphs of orthogonality of) sets of states common in quantum mechanics and quantum information (Pauli and Newman states). Interestingly, all our examples are sets of states whose graph of orthogonality is a vertextransitive graph. In addition, vertex transitivity will be an important property for the second part of the paper, where optimizations of the Bell inequalities will be carried out. In fact, for a large number of settings, optimization will only be feasible for vertex-transitive graphs.

Definition 22 (Vertex-transitive graph). A graph is vertex-transitive if, for every pair of vertices, there exists an automorphism of the graph mapping one to the other.
Consequently, in searching for a systematic method to identify additional examples with low η crit (for maximally entangled states and before any optimization), it makes sense to focus on vertex-transitive graphs.
Vertex-transitive graphs have been investigated for decades. As a fruit of these efforts (see, e.g., [84,91,90]), there are databases with all vertex-transitive graphs with up to 47 vertices [92], all vertex-transitive graphs of degree 3 (i.e., each vertex is adjacent to three others) up to 1280 vertices [93], all circulant graphs up to 60 vertices, and all circulant graphs with degrees at most 20 up to 65 vertices, at most 16 up to 70 vertices, and at most 12 up to 100 vertices [94]. Therefore, we can use these databases to compute η crit for all these graphs and their complements and then select those that are interesting. where ω(G), ϑ(G), ξ(G), and χ(G) are, respectively, the clique number, the Lovász number of the complement of G, the orthogonal rank, and the chromatic number [86,95]. The clique number ω is a trivial lower bound for ξ. The problem is that ξ cannot be computed efficiently. However, in all the examples with low η crit that we have identified, ξ = ω. Therefore, we can use the databases and compute, for each |V |, the minimum of α |V |/ω . This gives a lower bound for η crit that can be expected (for maximally entangled states and before any optimization) for the corresponding set of graphs. The results of these computations for all vertex-transitive graphs up to 47 vertices are presented in Table 1. Table 1 shows that the aforementioned lower bound for η crit decreases as the number of vertices increases. Moreover, it suggests that (for maximally entangled states and before any optimization) there are examples with η crit < 0.5 and |V | < 100 vertices.

For any graph G, ω(G)
We can use existing computational tools [96] to estimate the exact ξ. To find a orthogonal representation in R d (or in C d ) with minimal ξ of the promising graphs, we can write each vector in the orthogonal representation as a unit vector using d (or 2d) real variables, and rotating the orthogonal representation into some canonical position to reduce the number of variables. Then, we take into account that the automorphisms of the graph (which can be easily computed) lead to geometric symmetries in the orthogonal representation. Then, using numerical optimization software, we run the minimization problem where the objective is to minimize the sum of squares of inner products for R d (or the sum of squares of absolute values of inner products for C d ), where the sum is taken over those pairs of vectors that are supposed to be orthogonal in the orthogonal representation. Notice that the automorphisms of the graph dramatically reduce the number of variables in the optimization problem because now we need only one vector per each orbit of a symmetry group. This works with many dozens of variables quite well. Maple and other software can run this in arbitrary precision from which one may recover analytical expressions for the solutions.

Second strategy:
Nonvertex-transitive graphs So far, we have focused on graphs that are vertex transitive. The reasons for this are that vertextransitive graphs are relatively easy to identify and have a lot of symmetry. The latter is crucial for the optimization discussed in the second step of the method.
However, in [97], it is shown that there are other graphs leading to quantum correlations based on maximally entangled states violating a Bell inequality: Those admitting an orthonormal representation in dimension ξ and nonneg- w) is the independence number of the corresponding weighted graph. In addition, in [85], it is shown that a condition for these graphs is that the fractional chromatic number satisfies χ f > ξ. Interestingly, this condition, which is not sufficient for the graphs to have associated SI-C sets (see Theorem 1 in [85]) is, in fact, sufficient for having quantum correlations based on maximally entangled states violating a Bell inequality.
Therefore, another strategy to find examples with low η crit would be the following: Find graphs with χ f > ξ. For each of them, find w, such that n i=1 w i /ξ > α(G, w). Then, in a similar way as for Theorem 3, we can prove for these graphs and weights, Interestingly, since these weights are often natural numbers (e.g., for the Yu-Oh set [98], the weights are 2 for 4 of the vectors and 3 for the other 9 vectors [97]), one can see the weighted graphs (G, w) as nonweighted graphs G with an extended number of vertices (e.g., for the Yu-Oh set, G would have 4 × 2 + 9 × 3 = 35 vertices). Then, for finding candidates that may have a low η crit , we can use databases of nonweighted graphs of 13 or more vertices (as it is known that the graphs for which χ f > ξ must have, at least, 13 vertices [99]) and there identify, first, graphs with χ f > ω, where ω is the clique number, which is easier to compute than ξ. Since ω ≤ ξ, this is a necessary condition. Later on, one can use existing computational tools [96] to obtain ξ.

Noise and how to obtain better Bell inequalities
Here, we first show that, in all the examples with low η crit presented so far, the values shown for η crit are very sensitive to noise (Theorem 8). The good news is that all the upper bounds for η crit have been obtained with respect to a graph-based Bell inequality of the form in Eq. (8). However, for fixed correlations, we can optimize our Bell inequalities and obtain a lower value for η crit , which can also be more robust to noise. This optimization is discussed in Sec. 6.2 and uses the high symmetry of the measurements (their graph of orthogonality is vertex-transitive) producing the correlations.

Noise and graph-based Bell inequalities
In most discussions on the critical detection efficiency (e.g., [21,29,30]), the effect of noise is modeled with the assumption that the effective state is of the form where |ψ is the targeted state, W is the visibility of the state, 1 is the identity, and d is the dimension of the local system. In this work, we will follow this practice. However, it must be pointed out that, in some cases [100], the effective state is not of the form (49) and it is important to take this into account [101]. where Proof. Notice that Q mix is the violation of (8) for the maximally mixed state.

Theorem 8. For a Bell inequality of the form (8) associated to a graph G(V, E) with vertex set
V and edge set E and states of the form (49), the critical detection efficiency η crit is given by Proof. The quantum violation of the Bell inequality (8) with state (49) and perfect detection efficiency is given by where Q ≥ |V | d is the expected quantum violation and Q mix is the value for the maximally mixed state, which is given by (51). Then, the critical detection efficiency in Eq. (13) becomes Eq. (52).
Theorem 8 implies that, for the graph-based Bell inequalities (8), η crit rapidly increases with the number of edges unless W is very close to 1. Therefore, although experimental values of W can be as high as 0.980 for d = 3 and 0.943 for d = 17 [102], it would be desirable to find Bell inequalities for which the same correlations (i.e., the same state and the same measurements) have a value for η crit (and for W crit ) that is much less sensitive to noise. This problem is addressed in the next section.

Introduction
The graph-based Bell inequality (8) only takes into account probabilities P (Π A i = a, Π B j = b) in which either i = j or i and j are adjacent in the graph G. However, in a Bell test Alice and Bob independently choose their measurements in such a way that the choice on one of them is spacelike separated from the recording of the measurement outcome on the other. Therefore, while every observable Π A i of Alice is compatible with every observable Π B j of Bob, inequality (8) does not use most of the joint probability distributions All the not used distributions are thus wasted.
An interesting question is the following: What if we use the same state and measurements used in the violation of the graph-based Bell inequality (8) and consider all the joint probability distributions P (Π A i = a, Π B j = b)? Can we then obtain a better Bell inequality?
"Better" may mean having higher resistance to noise (i.e., lower W crit ), having lower critical detection efficiency η crit , or both, depending on what we are interested in. For designing a loophole-free Bell test, what we need is that the experimental values for the visibility and the detection efficiency, W exp and η exp , respectively, are both above their respective critical values. That is, we need W exp > W crit and η exp > η crit .
In the next sections we show how to compute W crit and η crit for states of interest. Intentionally, in the first example, we focus on an instance which does not offer neither a low W crit nor a low η crit , but which will guide us to attack more interesting examples.

Pauli-24
Fig . 1 shows the graph of orthogonality of the 24 (not normalized) states in P 2 (R). This graph has α = 5 and ϑ = α * = 6. Therefore, by preparing the maximally entangled state (12) of local dimension ξ = 2 2 = 4 and allowing each of the parties to choose between the 24 twooutcome measurements represented by |v i v i |, with |v i ∈ P 2 (R), Alice and Bob can produce a violation of the Bell inequality (8) which, using Theorem 3, allows us to conclude that η P 2 (R) crit ≤ 0.913 (54) and, using Theorem 7, allows us to conclude that

Gilbert's algorithm
While our graph-based Bell inequalities are neither tight (i.e., facets of the local polytope) nor robust to noise, they can be further improved to offer better detection efficiency and noise robustness. This can be achieved by calculating the Bell functional in Eq. (3) using two different methods. The first method is a linear program which optimizes over the entire local polytope to find the best Bell functional [27]. However, this technique requires enumerating and storing all the local deterministic points which are given by the vertices of the local polytope. This becomes an increasingly difficult computational task as the number of measurement settings increases. As an example, the local polytope corresponding to the Bell inequality with 24 settings per party derived from P 2 (R) has 2 48 vertices. This number is too large to be stored on a standard computer. In this paper, we use a second method which is based on Gilbert's distance algorithm [103] and does not require storing all the vertices of the local polytope. However, it should be noted that, for the cases we are interested in (e.g., P 2 (R)), the problem is still intractable using Gilbert's original algorithm. The problem only becomes feasible when symmetries are also taken into account, as explained in Sec. 6.2.4.
Gilbert's algorithm is a well-known numerical method to detect collisions between convex sets. It has been used for improving detection efficiencies of Bell inequalities [27], deciding whether or not a given correlation is nonlocal [104], and entanglement witnessing [105,106]. The algorithm minimizes the distance between a local point on a facet of the local polytope and a nonlocal point specified by the user. The minimization is achieved by iteratively finding a better local point that minimizes this distance. The algorithm terminates when the difference of distances between successive iterations falls below a certain threshold value (typically taken to be extremely small). The resulting Bell functional is then identified as the separating hyperplane between the specified nonlocal point and the local point on the facet found by minimizing the distance. In the following, we will present this algorithm in more detail. The algorithm is based on an oracle which is capable of maximizing over the local polytope P the inner product between a point in R n . Initially, one has to specify the local polytope P ⊂ R n , presented as the convex hull of vertices {c k } k , and a point q ∈ R n associated to the given quantum correlation. Then, the algorithm proceeds as follows. First, it chooses a point s 0 ∈ P. Second, with the given point s k , it uses the oracle to computẽ Third, given s k ands k , it calculates the convex combination of both which minimizes the distance to the quantum point q, that is, Since the objective function in (56) is linear and P convex, the maximizer will be an extreme point of P. In particular,s k will be a vertex of the local polytope P. The optimal value for λ in the k-th iteration, denoted by λ k , can be computed directly and is given by Then, it defines the new starting point to be s k+1 := (1−λ k )s k +λ ksk and it proceeds with the second step. In the standard Gilbert's algorithm, the oracle is implemented by enumerating all the vertices of the local polytope P to compute the inner product in the last equality of Eq. (56). For a geometrical interpretation of the iteration of Gilbert's algorithm, see Fig. 2. This algorithm provides a sequence of Bell functionals, which become better with each iteration. Note that it does not necessarily provide a tight Bell inequality like the first method. Moreover, calculating the local bound of the resultant Bell functional still remains an NP hard problem, which again requires enumerating and storing all the local deterministic points at least for one party 1 . This issue is also shared by the 1 For a given bipartite Bell functional where each mea- oracle in the standard Gilbert's algorithm, since surement has only two outcomes ±1, once we have fixed the deterministic assignment of one party, the optimal value of the Bell functional and the corresponding deterministic assignments of another party are determined. Refer to Sec. 1 in appendix C of Ref. [107] for more details. the evaluation of Eq. (56) is equivalent to find the local bound of one Bell functional.

Gilbert's algorithm with symmetrization
The two problems mentioned at the end of the previous section can be solved simultaneously by replacing the hitherto generic oracle with an oracle that takes into account the symmetries of the problem. This provides an advantage that is crucial for improving the speed of convergence. In this respect, it is important to notice that the vertices of the local polytope (and the polytope itself) are invariant under the following invertible transformations: (i) Swapping the outcomes of a measurement setting for either Alice or Bob.
(ii) Simultaneously permuting the measurement settings of Alice and Bob. (iii) Swapping the measurement settings of Alice and Bob. Here, "invariant" means that the transformations map local correlations to local correlations.
The joint probability distributions obtained by performing measurements on a quantum state are also invariant under some of these transformations. We denote by S a subset of these transformations which keep the quantum joint probability distributions and the local polytope invariant simultaneously.
We consider a matrix similar to the one in Eq. (3) in which the entries are probability distributions instead of coefficients, given as, The corresponding Bell inequality can then be calculated as tr(IM T p ) ≤ λ. Under the transformations S ∈ S we have, wherē and |S| is the cardinality of S. Using this symmetry S, it is sufficient to consider only inequalities that share this symmetry. In particular, for a symmetric inequality, the vertices of the local polytope can be partitioned into different equivalence classes with respect to that symmetry and the local bound can be computed by choosing only one representative out of each class. This drastically reduces the total number of local vertices required, allowing us to enumerate all symmetrized local points and evaluate the local bound.
For convenience, here we focus on the symmetrization applied only to Alice's measurement settings. Each equivalence class consists of vertices which can be transformed into each other by using the aforementioned symmetry transformations, while the same is not true for vertices in different equivalence classes, i.e., the partition generates disjoint sets. This leads to a modified oracle, which is much more efficient than the original one since the number of equivalence classes could much smaller than the number of all vertices. This is indeed the case for P 2 (R). Now, we describe how to obtain the reduced set of vertices on which the optimization in (56) has to run. In the first step, we have to determine the allowed symmetry transformations S, which should be shared by the chosen quantum point q and the local polytope P. As already pointed out, P is invariant under the permutation of parties, the permutation of the measurements for each party, and the permutation of the outcomes for each measurement. By construction, the chosen quantum point q is also invariant under the permutation of parties. Usually, q can change after the permutation of outcomes for each measurement. In general, determining the permutation symmetries of measurements in the point q can be difficult when the number of measurements is large. In the cases considered here, those symmetry transformations correspond to the ones in the automorphism group of the graph associated to the SI-C sets. Therefore, the symmetry transformations used in the Gilbert's algorithm with symmetrization are the ones in the automorphism group and the permu-tation of parties. It remains to explain how the vertices are partitioned into different equivalence classes.
The first important observation is that now we do not need to generate, store, and classify all vertices, since assignments with different number of 1's cannot be equivalent to each other. Hence, we can do the classification inductively. We start with the assignment that only contains 0's. Obviously, this is invariant under all possible permutations. From this, we generate all possible assignments that can be obtained by replacing one 0 by one 1. Within this set, we check whether some of these assignments are equivalent under the given symmetry transformations S, which are presented as permutations. Then, we only keep one representative for each class. This procedure is repeated until no 0 is left in the assignment vector.
Selecting only a single vertex from each equivalence class (and all the vertices of Bob), we find that the total number of deterministic assignments for Alice is 21564 for the Bell inequality corresponding to P 2 (R) (while, without symmetrization, it would be 2 24 ).
We also modify the Gilbert's algorithm to evaluate the Bell functional according to the symmetrization procedure in Eq. (61). Specifically, we symmetrize the local point chosen in each iteration of the program after minimizing its distance from the target nonlocal point, see Fig. 3 for a simple illustration. This results in better convergence times of the algorithm since symmetrization does not increase the distance. 6.2.5 Example: Bell inequality for Pauli-24 that minimizes η crit and W crit As an example, here we present a Bell functional for the correlations produced by the maximal entangled state (12), with ξ = 4, and the measurements associated to the states in P 2 (R) which has lower detection efficiency and larger tolerance to white noise than those of to the graph-based Bell functional (8). The purpose of this example is to show that the values of η crit and W crit obtained in the first step of the method can, in principle, always be improved.
Applying Gilbert's algorithm and the symmetrization technique to the correlations produced by P 2 (R) and maximally entangled states, we have obtained the following Bell inequality: where with M 1 to be a matrix full of 0's, |v to be a vector full of −6's, and For the maximally entangled state (12), the quantum value is In addition, for the correlations produced by P 2 (R) and maximally entangled states, W crit = 7 9 = 0.778, (67) which is 14.62% lower than the upper bound in (55), and η crit = 4 5 = 0.8, which is 12.38% lower than the upper bound in (54). We can prove that W crit and η crit are the smallest possible values for the correlations produced by P 2 (R) and maximally entangled states as follows: First, we collect all the 452929 pairs of deterministic assignments for the two parties which achieve the maximal bound for LHV models. Each of them corresponds to a matrix M p . After symmetrization, there are only 132 different matricesM p , whose convex combination can lead to the corresponding quantum probability matrix either with W = 7/9 or with η = 4/5, as one can verify with linear programming. Inequality (63) is not tight. There is a tight Bell inequality providing the same η crit and W crit than the ones for inequality (63), but it does not have the two blocks of 0's that we have in (65). If we want to keep the 0's, inequality (63) is the only solution.
Notice that symmetries of the initial graph are crucial for finding (65). For example, notice that there are only 6 different parameters in the symmetric inequality for the case of P 2 (R). In comparison, there are 624 parameters in the nonsymmetric inequality for P 2 (R). In the general case, there are 2m + 2 parameters in the symmetric inequality for P m (R) and P m (C). This makes it also possible to find a better inequality without resorting to Gilbert's method. To be more explicit, we can choose t different values for each parameter, then there are t 2m+2 different inequalities. For each inequality, we can verify whether it separates the target quantum point and the LHV polytope or not by considering only the deterministic assignments up to symmetry. As discussed before, when m = 2, there are 21564 different deterministic assignments for Alice up to symmetry. Therefore, for a fixed inequality, this verification can be done very fast. Similarly, we can calculate η crit and W crit for each inequality. As we can see in Eq. (65), we can set some parameters to be 0 for the best η crit and W crit . This trick can speed up the numerical calculation further.

Towards high-dimensional longdistance loophole-free Bell tests
We have shown how to identify quantum correlations between systems of moderate dimension (d ≤ 128) that allow for loophole-free Bell nonlocality with low detection efficiency. Our results imply that, probably, loophole-free Bell nonlocality can be achieved in carefully designed tests involving pairs of systems of these dimensions, which is interesting by itself as it goes beyond previous loophole-free Bell tests, all of them based on qubits. More interestingly, our results also imply that loophole-free Bell nonlocality can be achieved through longer distances than those of previous loophole-free Bell tests. When photons propagate thorough fibers, they experience propagation losses proportional to the propagation distance and which depend on the optical wavelength. This means that in a Bell test over long distances (and unless we add, e.g., heralded qudit amplifiers [39] or split each photon into two [41,42] before the local measurements), the detection efficiency decreases with the distance. For example, with telecom wavelengths, in 10 km of fiber, we may have losses of 0.2 dB/km, which implies multiplying by 0.64 the detection efficiency that we had before adding 10 km of fiber. Therefore, if we have examples of loophole-free Bell nonlocality requiring η crit < 0.5, we can achieve loophole-free nonlocality over 10 km if we have η exp > 0.785 before adding the 10 km of fiber. Such η exp has been achieved in previous photonic loophole-free experiments [14,15], even including (< 200 m of) fibers and the couplings.
In this paper, we have shown how to achieve η crit < 0. 52 Figure 4: η crit as a function of the dimension d of the local system. The previous smallest values are those in [21,26,28] and use nonmaximally entangled states. Pauli (Newman) states refer to the case in which the local measurements are projectors on the Pauli (Newman) states and the initial state is maximally entangled, as described in Sec. 3.2.
ments proposed here (e.g., for d = 16 and Pauli-4320). In addition, we have introduced methods to identify further examples with low η crit requiring smaller number of settings. As shown in Fig. 4, the first step of our method already yields upper bounds for η crit which are substantially smaller than the lowest values previously known for any dimension d ≥ 16. These values indicate that there are quantum correlations which have sufficiently low η crit for loophole-free Bell tests with higher-dimensional quantum systems and, eventually, over longer distances. We have also shown how to improve any of these values and we have described how we are trying to find more, and probably better, examples in the future.
It now remains to be seen how far we can go on the experimental side. In particular, there is one question, to which we do not have the answer: Is there a way to encode high-dimensional entanglement in photons that allows, at the same time, (i) to measure all the necessary one-dimensional projectors locally and switch quickly between them, (ii) distribute the photons over, e.g., 5-10 km achieving visibilities W exp > 0.95, (iii) using superconducting detectors to actually achieve η exp > 0.5? Hopefully, the combination of techniques presented here and the interaction with experimental groups will help us to produce highdimensional loophole-free Bell nonlocality over long distances in the near future.
The code supporting the results reported in this paper is available in [108].