More Randomness from the Same Data

Correlations that cannot be reproduced with local variables certify the generation of private randomness. Usually, the violation of a Bell inequality is used to quantify the amount of randomness produced. Here, we show how private randomness generated during a Bell test can be directly quantified from the observed correlations, without the need to process these data into an inequality. The frequency with which the different measurement settings are used during the Bell test can also be taken into account. This improved analysis turns out to be very relevant for Bell tests performed with a finite collection efficiency. In particular, applying our technique to the data of a recent experiment [Christensen et al., Phys. Rev. Lett. 111, 130406 (2013)], we show that about twice as much randomness as previously reported can be potentially extracted from this setup.


I. RANDOMNESS FROM BELL TESTS
A. Introduction Sources of true randomness have numerous applications, be they in algorithms, gambling, sampling, or cryptography [1]. However, the unpredictability of these sources is typically difficult to certify since they may be correlated to external variables, and access to those other variables could render them predictable. Therefore, there is strong motivation for developing sources of randomness that can be certified as being uncorrelated to any outside process or variable, i.e. sources of private randomness. Quantum physics offers this opportunity when a Bell inequality is violated. Since this link between nonlocal correlations and randomness was highlighted [2], it was used for randomness generation or expansion [3][4][5][6] and randomness amplification [7][8][9].
All previous works certify randomness through the amount of violation of one or more Bell inequalities [10]. As such, they only take into account a coarse grained description of the knowledge available in a deviceindependent experiment. Moreover, in the case of randomness generation or expansion, they quantified the amount of randomness by analysing each measurement setting separately (or by computing lower bounds that assume a biased choice of measurement settings). Here, we propose a method to certify rates of randomness generation in the limit of large aquisitions directly from the full expected statistics, i.e. both the outcomes correlations and the frequency with which measurement settings are chosen. We show that this tool provides immediate improvements on the quantification of private randomness by applying it in the context of Bell tests with finite detection efficiency.

B. Working assumptions
Randomness can be studied under different sets of assumptions. The situation we have in mind here is the generic case of an experimental physicist who wants to convince a colleague that his setup is doing its job properly. We thus choose our working assumptions accordingly.
Namely, we consider in this paper that the devices used to produce randomness were acquired from a trusted provider (or built by the trustable experimental physicist himself), meaning that the devices may not operate as hoped for, but they are precluded from being actively malicious: for instance, they don't incorporate an RF transmitter that could leak supposedly private information to the outside world. There is also no adversary Eve in this scenario, but only a skeptic verifier Thomas (the colleague), who wants unquestionable evidence that genuine private randomness is being produced. Thomas does not hold quantum side information about the devices (the honest provider didn't purposely design the devices so that they would remain entangled to a third system); but he may hold a more detailed classical description of the devices than that available to average users and to the provider. If this classical information is sufficient to predict the outcomes produced by the devices, because they act in a deterministic way for instance, then Thomas will conclude that there is no intrinsic randomness. In particular, pseudo-random sources would be detected in this way, since they are totally predictable given their classical description. This trusted-provider assumption was first explicitly stated in [4], and has been used to assess recent experiments on randomness expansion [3,11].
An important concern in randomness analysis is measurement independence, i.e. that measurement settings chosen in each run are independent of the state of the quantum systems measured in that run. Measurement independence can only be guaranteed with some element of trust; it has been assumed in the first studies, then relaxed in several works [7][8][9][12][13][14][15]. In our trustedprovider scenario, full measurement independence holds as a natural consequence, even when the settings are chosen with a public pseudorandom string (and can thus be known by the verifier), because one trusts that the provider didn't build the devices with any particular string of measurement choices in mind. In this context one can thus talk of private randomness genera-tion, because the randomness certified here can be generated without using any initial private randomness. This contrasts with device-independent randomness expansion (DIRE) schemes, which rely on the consumption of initial private randomness [4].
Finally, for simplicity, we also assume in this paper that all measurements are performed a large enough number of times so that the corrections of finite statistics can be safely neglected. In this asymptotic limit and under measurement independence, memory effects do not matter if the observed statistics behave like a supermartingale [16]. Assuming that this will be the case in a practical realization, we can formally restrict ourselves to the case where subsequent runs of the experiment produce independent and identically distributed (i.i.d.) variables. Finite statistics corrections, even accounting for memory effects, could be implemented on top of these results as demonstrated in [3,16,17].

II. RANDOMNESS FROM OBSERVED STATISTICS
It is common, and convenient, to estimate the amount of private randomness that can be extracted from some correlations in terms of a Bell inequality violation [3]. Indeed, violation of a Bell inequality certifies that no preestablished strategy can reproduce the observed correlations, and thus, that no one can perfectly predict them. However, a Bell inequality violation only constitutes a partial knowledge of all the statistics produced during a Bell type experiment. Since in general the full correlation statistics can be known, we ask here how much randomness can be certified based on this more complete knowledge.

A. Full observed correlations
Just as quantum states can exhibit two kinds of randomness, the intrinsic randomness of pure states, and the randomness of mixed states [18], correlations can also exhibit these two kinds of randomness [19], the intrinsic randomness being uncorrelated to outside systems, and thus private. For instance, any extremal quantum correlations P (a, b|x, y), which cannot be decomposed as a convex mixture of other correlations, hold intrinsic randomness: the maximum probability with which an external observer is able to guess the outcomes observed by the parties when they perform measurements (x, y) is indeed given by the probabilities P (ab|xy) themselves through: The associated randomness is then H min (AB|XY ) = − log 2 (G xy ). Here a, b denote outcomes that two parties, Alice and Bob can observe when they perform measurements x, y on their respective systems. Conversely, when some correlations P (ab|xy) can be decomposed as a convex mixture of other quantum correlations, one cannot a priori exclude that part of the outcomes' indeterminacy is simply due to classical lack of knowledge of Alice and Bob. In the trusted-provider assumptions mentioned earlier, which ensures that the provider of the boxes used by Alice and Bob keeps no state entangled with the devices in his factory, the quantum state shared by the parties and the verifier Thomas takes the form of a quantum-classical (q-c) state: Here λ is a classical variable potentially known to the verifier which can help him refine his guessing strategy.
It provides the most detailed information when the ρ (λ) AB are pure states. In particular, the verifier does not hold a purification of ρ AB , all his side-information is classical. Moreover, as discussed above, ρ ABT can be assumed to be identical for each run. Given the form of the state ρ ABT , the correlation observed by the parties can be written as For an arbitrary set of correlations (i.e. possibly not extremal ones) the average probability with which Thomas can guess the outcomes observed by Alice and Bob correctly, given his knowledge of the inputs x, y and of λ, is thus given by the maximum of over all convex decompositions (3) that reproduce, on average, the observed correlations P (ab|xy). At first, it is not clear whether such an expression could be optimized easily, because it might involve an arbitrary number of λ's. The following proposition is useful in this respect (proof in Appendix A). Proposition 1. Without loss of generality, the maximum value of λ q λ max a,b x,y,µ f (x, y, µ)P λ (a(x, y, µ), b(x, y, µ)|xy) (5) over all decompositions of the form (3) can be achieved by considering one term in this decomposition per possible argument of the inner maximization. Here µ is a discrete variable, and f (x, y, µ), a(x, y, µ), b(x, y, µ) are functions defined on the support of f (x, y, µ).
To clarify, the arguments of the maximization are each value that the outcomes can take, given each value the inputs x, y, and perhaps some other variable µ, can take. So, in the specific case of evaluating equation (4), the support of f (x, y, µ) consists of one point, and the summation over x, y, and µ is effectively already subsumed into P λ . Then if the number of possible outcomes for Alice's measurements is given by |a|, and similarly |b| denotes Bob's number of possible outcomes, this proposition ensures that no more than |a| · |b| terms need to be considered in the decomposition (3) when optimizing (4). Setting λ = (α, β), with α = {0 . . . |a| − 1}, β = {0 . . . |b| − 1} one can thus use the following program to compute the amount of private randomness that can be extracted from the correlations P (ab|xy) when settings x, y are used: where the sum over α, β indicates that there is one value of λ for each value of α and β, and we have absorbed the weights q αβ into the normalization of the probability distributions P αβ . Notice that this expression uses the observed distribution P (ab|xy) directly rather than the value of a Bell inequality.

B. Taking the input distribution into account
So far we considered the randomness that can be certified in presence of correlations P (ab|xy) when a given set of settings (x, y) are used. This analysis can be straightforwardly generalized to the situation in which the inputs are chosen with some arbitrary probability p(x, y) by noting that the average guessing probability in this case reads where a xy ∈ {0, . . . , |a| − 1} and b xy ∈ {0, . . . , |b| − 1} for all x = {0, . . . , |x| − 1} and y = {0, . . . , |y| − 1} denote the outcomes considered for each of the settings x, y. Thanks to proposition 1 it is sufficient to consider only at most (|a||b|) |x||y| λ's when optimizing (7) over all decompositions of the form (3) (since the support of f (x, y, µ) = p(xy) in proposition 1 is |x||y| distinct points). The amount of private randomness that can be certified when some correlations are observed by choosing settings according to the distribution p(x, y) can thus be quantified by the following program: where the weights are again absorbed into the normalizations of P αβ and we have α = {α 00 , . . . α |x|−1,|y|−1 } with α xy ∈ {0, . . . , |a| − 1} and likewise for β and β xy , i.e. bold greek letters α and β denote vectors taking one of |a| |x||y| or |b| |x||y| possible values (as indexed by the components α xy and β xy ). The idea behind this program is that Thomas could know the relative frequencies of the inputs and happen to hold a description of the best decomposition for this case. However he does not have active access to the boxes: under measurement independence, the decomposition cannot depend on the particular measurement that is performed in each run, and so the decomposition (3) must be identical for all choices of settings x, y.

C. Getting practical bounds and certificate
In order to perform the optimizations (8) (of which (6) is a special case) one needs to describe accurately the set of quantum correlations. Since no method is known for this, we upperbound the guessing probability G by relaxing the constraint that P αβ (ab|xy) be quantum, to let it belong to some level of the NPA hierarchy [20,21]. This turns equations (6) and (8) into semidefinite programs which can be efficiently computed numerically, with the guarantee of approaching the exact quantum value as the level of hierarchy increases.
Alternatively, one could also replace this condition by requiring only that the correlations P αβ (ab|xy) be nonsignalling. In this case the optimization takes the form of a single linear program, and describes the randomness exatractable from correlations in a world described by a generalized no-signalling theory rather than quantum theory.
Apart from computing the amount of randomness that can be extracted with respect to a verifier in different contexts, one can show that these programs also provide, through their dual, the description of a certificate for this conclusion. This certificate takes the form of a Bell expression, whose expectation value on the tested correlations P (ab|xy) can only be observed in presence of the amount of randomness found by the program itself. To see this (full details can be found in Appendix B), we note that the optimization (8) can be straightforwardly adapted to estimate the amount of randomness that can be certified from a Bell inequality violation. Namely, if I = abxy c abxy P (ab|xy) is a Bell expression then the maximum guessing probability achievable by a verifier when the Bell value v is observed is given by: Note that a similar program using only one value of α and β was already presented in [3] to evaluate the randomness associated to a Bell inequality violation with a biased choice of inputs. However, its application relies on the concavity of the obtained function (or on its concave hull) [18], which is not always guaranteed (see Appendix C for an example of non-concave function obtained in this way). The application of that program thus requires in general knowledge of the function for all violation v. Here, program (9) takes care of the concavity requirements through the use of several λ's. It thus directly produces the guessing probability relevant for randomness estimation.

A. Role of the inputs distribution
To illustrate the role of the inputs distribution in randomness certification, we compare in figure 1 the randomness that can be certified in presence of a CHSH violation through (9) when one pair of settings is preferentially chosen, or when all settings are chosen with equal probability [31]. Significantly more randomness (about twice as much) can be certified in presence of nonmaximal CHSH violation if the settings are chosen uniformly. This can be understood by considering that when the randomness is extracted from a fixed choice of settings, one cannot exclude that the decomposition (3) is most adapted for the verifier to guess the outcomes observed when those settings are precisely used. However such a decomposition need not be optimal to guess the outcomes observed when performing other measurements. Since the decomposition is the same independently of which settings are used, it follows that the average guessing probability over the different settings is reduced.

B. Application to finite efficiency Bell tests
In practice, certifying private randomness generation in a Bell experiment requires a reasonable separation between the measured subsystems, as well as closure of the detection loophole. Without these conditions fulfilled, the possibility remains for the verifier to find a way of   FIG. 2: Lossy Bell tests with different numbers of detectors and possible outcomes. a) With two detectors on each side, it is possible to attribute a distinct outcome to the result of each successful measurement, while identifying no-detection events. This is the most general treatment of lossy Bell test, but it requires the usage of three outcomes on each side. b) In order to recover two outcomes only, the no-detection events must be associated with one of the detector. b') The same statistics as produced in case b) can be obtained by using only one detector on each side. In this case, a click triggers the first outcome while the second outcome is produced in case of no-detection.
guessing the outcomes observed during the experiment, which then cannot be guaranteed private [22].
These constraints on parties separation and on their detection efficiency are still very demanding experimentally today. With photonic systems for instance, overall detection efficiencies which are sufficient to close the detection loophole have just been recently demonstrated [11,23]. It is thus experimentally relevant to ask what is the best way to certify private randomness in presence of finite efficiency detectors.  (6) and (8).
For η 90% the amount of randomness displayed by curve 2 can be certified with inequality (10). Curve 3, based on the full 3-outcomes statistics was computed with (8). Bounds were computed with the Sedumi solver [25] at local level 1 of the NPA hierarchy for uniform choice of settings, and with a higher level for based inputs [20,26].
In the simplest Bell experiment in which two parties can each use two binary measurements, finite detection efficiency can be dealt with in several ways (see Fig. 2). Either a third outcome is introduced for both Alice and Bob and all photons that go undetected are assigned to the third outcome, or all undetected photons are assigned to one of the two existing outcomes. The first solution is more general, but requires the usage of three-outcome Bell inequalities and two efficient detectors each for Alice and Bob, while the second solution can be treated in the two-outcome paradigm and has the advantage of only requiring one detector on each side. Here we consider the two cases, with all detectors having the same efficiency Eberhard [24] showed that whenever η > 2/3, it is possible to violate the CHSH inequality by measuring partially-entangled states of the form |ψ = cos θ |00 + sin θ |11 with settings of the form A 0 = cos α 1 σ z − sin α 1 σ x , A 1 = cos α 2 σ z + sin α 2 σ x , B 0 = cos α 1 σ z + sin α 1 σ x , B 1 = cos α 2 σ z − sin α 2 σ x where θ, α 1 , α 2 are functions of η. Here we analyse how much randomness can be extracted in presence of these correlations. The results are summarized in figure 3.
As shown in the figure, different amounts of randomness can be certified depending of the approach used.
The optimal bounds are obtained when choosing measurement settings uniformly. In this case the CHSH inequality is the optimal randomness witness whenever the efficiency is η 80%.
To demonstrate the improvement provided by our method in presence of finite detection efficiency, we applied it to the correlations reported in [11]. The program (8) certifies a rate of 0.00014567 bits per run, i.e. two times more than mentioned in that paper. Notice that, because of statistical fluctuations, the frequencies computed from the raw data are non-quantum and even signaling; this artefact can be corrected with a minor reformatting. (see appendix D for details).

C. A new Bell expression.
Let us now go one step back and fix a highly biased inputs distribution (i.e. let's consider extracting randomness from a fixed set of inputs). When η < 1, the CHSH inequality does not certify the largest amount of randomness. The most randomness is obtained by considering the three-outcomes correlations, but already the bounds computed from the two-outcomes correlations show an improvement.
As it turns out, for efficiencies smaller than ∼ 90%, we can provide a Bell inequality that is optimal, in the sense that its amount of violation certifies the optimal amount of randomness. This inequality is found using the dual of (6) to be where the right hand side of the expression is the bound for local correlations (computed independently of the SDP dual). Note that this inequality is not a facet of the local polytope, since this scenario only has one nontrivial family of facets, given by the CHSH inequalities [27]. Yet, it is better adapted for randomness extraction in this situation than the CHSH inequality.
In appendix E we give a brief description of this inequality, and in particular give an analytical estimate of the intrinsic randomness that can be certified on the marginal correlations for this inequality. This analysis reveals that available analytical techniques useful to certify randomness in the marginal outcomes [3], are not adapted to this inequality. The reason for this is that they treat all inputs identically, but a symmetry between the inputs is broken in inequality (10) whenever γ = 1. In particular, they assume that measurements can be chosen along σ z , whereas maximal violation of this inequality with non-maximally entangled state of the form cos θ |00 +sin θ |11 can require measurement settings not aligned with the z axis of the Bloch sphere.

IV. CONCLUSIONS
Private randomness is a valuable resource. We have presented here a way to bound the private randomness generated during a Bell test by directly using knowledge of the full outcomes correlations and of the inputs' choice distribution. Our analysis is concerned with large data sets and makes some arguably reasonable assumptions about the devices used in the Bell experiment, but does not require a characterization of these devices. Working directly from the observed correlations allows us to find tighter bounds on the min-entropy of the output than previously known, thus certifying more randomness from identical experiments. We demonstrate this explicitly for the results of [11], effectively doubling the expected private randomness production rate.
This approach also furnishes new Bell inequalities through semi-definite duality to bound the guessing probability. These inequalities may not be facets of the local polytope (inequality (10) is not), but they are the ones suited to randomness extraction for the form of the correlations supplied.
Even though we focused here on bipartite Bell experiments, our result generalizes directly to scenarios involving arbitrary alphabet size of inputs and outputs and any number of parties. The tools presented here can also be applied under different sets of assumptions. For instance, they can provide bounds in presence of an untrusted provider keeping a purification of the boxes if the inputs are made public only after the purification decohered.
It would be relevant to extend the bounds presented here to the case of finite statistics, including devices with memory, possibly using methods similar to [3,16,17]. This work also shows that new ways of obtaining analytical bounds on the randomness need to be developped to certify optimal rates of randomness generation analytically.
Note added. While writing this article we became aware of a similar work by O. Nieto-Silleras, S. Pironio and J. Silman [28].

(A4)
Thus, it suffices to consider only as many strategies λ as the number of arguments to the maximization.

Appendix B: A Bell expression to certify optimal randomness extraction
Here we show that whenever the primal and dual objective functions for the dual of the SDP relaxations of Eq. (8) (of which (6) is a special case) coincide, variables of the dual provide the description of a Bell expression which can be used to certify that no one can guess the outcomes observed by the parties with a probability higher than that given by the relaxation's primal.
For this, let us write the SDP relaxation of Eq. (8), as well as its dual program [29]. For any hierarchy level, this can be done by considering for each probability distribution P αβ a matrix of the form Γ αβ = i F i x i αβ , where F i are constant matrices and x i αβ are a finite number of variables [20,21]. For convenience, we also introduce the constant matrix F (ab|xy) to pick up the terms in the Γ matrices associated to the probabilities, i.e. P αβ (ab|xy) = Tr(F (ab|xy)Γ αβ ), as well as the indicative function f i (ab|xy) = Tr(F (ab|xy)F i ). The relaxation and its dual then read: Primal: Eq. (B2) is the dual of Eq. (B1) in the sense that the value of its objective function for any set of variables (c abxy , M αβ ) satisfying its constraints sets an upper bound on the optimal value of the primal's optimization. In practice, solving these programs typically yields identical values for both objective functions, thus certifying their optimality. This was the case for all programs solved for this paper.
Let us now show that when the two objective functions coincide the coefficients c abxy define a Bell expression, whose value achieved by the tested probabilities P (ab|xy), can only be achieved when the guessing probability is bounded by the optimum of the above primal. For this, we also write an SDP relaxation of equation (9). Bounding the maximum solution of this program for any quantum correlations achieving the value v for the Bell expression defined by c abxy will conclude the proof. This relaxation is done as above by associating to each probability distribution P αβ a matrix Γ αβ = i F i y i αβ . The obtained semi-definite program then reads: So let us bound G(v) for the coefficients c abxy of the above dual, by using the other variables of this dual at optimum. For this we write where we used the fact that the M αβ matrices are negative and the y i αβ variables must satisfy i F i y i αβ ≥ 0 to get to the last line. This concludes the proof.
Appendix C: Concavity of the guessing probability function As mentioned in the main text, it was proposed in [3] to estimate the randomness associated to a Bell inequality violation by upperbounding the guessing probability G xy (v) by the concave hull of the function When relaxing in this optimization the quantum condition to some level of the NPA hierarchy, computing the function f xy (v) amount to solving |a| · |b| semidefinite programs involving a matrix of size N (one optimization for each value of (a, b)), and taking the concave hull of the maximum of the |a| · |b| functions of v found in this way. Let us show that taking this concave hull is not necessarily a trivial step.
For this matter, we consider the function f 0,0 (v) for the γ inequality (10) with γ = 3/4. The bound on this function found at local level 1 of the NPA hierarchy is plotted in figure 4. Clearly it is not concave. In particular, the value found for v = 2.4 is f 00 (2.4) 0.7204, whereas its concave hull for the same v takes the value 0.8075. In fact, the result of the alternative optimization (9) presented in the main text also yields this value. Since one can check that there exists a decomposition of the form (3) in terms of quantum correlations that achieve this guessing probability, it is indeed an optimal value.
Finding the correct guessing probability in this case with this method thus requires one to solve (C1) for both v = 0 and v 2.607 (analytical value unknown), which requires some global knowledge about the f 00 (v) function. In contrast, the method presented in the main text in Eq. (9) directly yields the guessing probability G 00 (2.4) by only considering the value v = 2.4. It requires however, for the same level of the hierarchy, one optimization with |a| · |b| semidefinite blocks of size N (which constitutes a larger problem than the individual ones above). Nonlocal correlations observed with limited detection efficiency (about 75%) are reported in [11] [32]. An estimation of randomness based on these observations is then also provided, with the help of known theoretical techniques. Here we perform a similar analysis by using the method described in the main text. Namely we estimate the amount of private randomness one could expect to extract from the setup used for this experiment in the limit of many runs.
Before applying our tools to this data, we need to slightly process it in order to make it fit with our theoretical description. Indeed, being the result of a finite number of measurements, the frequencies with which the different outcomes were observed violate the no-signalling conditions, i.e. where S A is the number of singles observed at Alice, and N the number of events recorded in presence of some settings (we use here the notation of [11]). All quantum correlations being no-signalling, this violation prevents us from applying the optimizations presented in the main text to these frequencies directly.
Since one expects this signalling character to disappear in the limit of many measurements, we choose to remove this feature by projecting the frequencies onto the no-signalling probability subspace in an orthogonal manner. This can be done by considering the full probability space as R 16 equipped with the standard inner product. Alternatively, this projection can be performed directly in terms of expectation value for the ±1 eigenvalue observables A xy , B xy , as we do now: first we compute the expectation values for each setting (x, y) directly from the counts as and similarly for the other pairs of settings. The projection is then obtained by setting A x = Ax0 + Ax1 2 and B y = B0y + B1y 2 . The no-signalling correlations obtained in this way take value: A 01 B 01 = 0.9911125 A 10 B 10 = 0.9907040, yielding a CHSH violation of ∼ 2.000159. Note that the correlations (D3) could still, in principle, lie outside the set of quantum correlations, thus still preventing a direct application of our technique. We checked however that this was not the case.
In general, other projections could also be chosen to relate the observed signalling statistics to some quantum correlations. By construction, the particular projection used here minimizes the euclidean distance between the projected probabilities and the original ones. This ensures that its result cannot be too far away from the original statistics, as measured by any p-norm. In particular, it must be close to any point belonging both to the quantum set and to a confidence ball of radius in p-norm around the original probabilities.
Running the programs (8) and (9)  . This is about twice as much randomness per run as reported in [11] [33].
(E9) (Note that using the analytic bound, when β = π/4, x = 1/4, and from a numerical analysis, x < 1.6 for all values of β.) Then, we can supply a bound on the maximum value that the inequality (10) can take for any value of β and small values of (γ − 1) as: V Q (Φ(β)) ≤ 2 1 + sin 2 (2β) + 1 + sin 2 (2β) 1 + π sin 4 (2β) 1 + sin 2 (2β) 1 − sin 2 (2β) + 2 sin 2 (2β) 2(1 + sin 2 (2β)) 3/2 1 + sin 4 (2β) − Under the assumption that the expansion is valid in the considered range (this is equivalent to assuming that the derivatives of V with respect to γ are not too large), this method gives a bound on the randomness that a particular observed violation implies, and thus a quick and simple method to calculate a lower bound on the extractable intrinsic randomness of an experiment. Unfortunately, one can check that this quick bound does not reproduce the value obtained numerically using programs presented in the main text, and in particular it does not improve on the bound implied by the CHSH inequality, at least not for values of γ in the range of interest.
The reason for this is as follows. One way to bound the intrinsic min-entropy of one party's outcome, after observing a value of the inequality (10) v, is to find the largest value of β compatible with v such that V Q = v using the bound (E10). Then the guessing probability for any choice of input measurement is G ≤ cos 2 β for 0 ≤ β ≤ π 4 . However, it is not sufficient to use that bound, because it returns a lower amount of marginal intrinsic randomness than does the same technique using instead the CHSH inequality. In actual fact, the amount of generated randomness is always higher than cos 2 β because the γ factor in the inequality breaks symmetry in the system, meaning that the orientation of the state with respect to the measurements does not allow either of Alice or Bob's measurements to be along the z-direction, and achieve the value v with the state |Φ(β) . If none of the measurements are along the z-axis then the marginal randomness must be greater than cos 2 β. Therefore, it is necessary to optimize the randomness over the state angle β and the angle of orientation of Alice's measurement to the z-axis, in order to improve on the bound given in [3] for the CHSH inequality. However this is not taken into account in the presented analysis.