WorksPhysics and Astronomy
Harnessing dimensional leakage for continuous-variable randomness certification
Abstract
Semi-device-independent quantum protocols often rely on strict Hilbert-space dimension assumptions that are difficult to satisfy in realistic implementations, particularly with infinite-dimensional optical fields. The almost-qudit framework addresses this issue by quantifying the leakage of quantum states beyond a target subspace. Although such leakage can severely compromise randomness certification for fixed preparation and measurement inputs, we show that averaging over the full input ensemble can mitigate this vulnerability and extend the range of tolerable leakage. This enhanced robustness enables nonzero randomness certification using low-squeezing single-mode Gaussian states and homodyne detection, thus offering an experimentally accessible continuous-variable implementation.
Introduction
Prepare-and-measure (PM) scenarios [1, 2] provide a versatile framework for quantum information processing when the preparation and measurement devices are not fully characterized. By assuming that the communicated quantum system satisfies physical constraints [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], most notably a bounded Hilbert-space dimension [16, 17, 18, 19], semi-device-independent protocols can certify quantum properties without requiring a detailed model of the underlying devices. These include quantum randomness generation [20, 21, 22, 23, 24, 25, 26], and the certification and characterization of properties of quantum states and measurements [27, 28, 29, 30, 31]. Such protocols are attractive for practical quantum technologies, where a full device-independent analysis may be experimentally demanding [32, 33]. Their reliability, however, frequently rests on the assumption that the physical systems used in the experiment satisfy the prescribed dimension constraint [34].
In realistic implementations, this assumption is rarely exact. Optical fields, for instance, occupy infinite-dimensional Hilbert spaces [35, 36], and even when information is encoded in a nominal qubit or qudit, such as in the polarization or orbital angular momentum of photons, multiphoton contributions, higher-order Fock-state occupations, and other unwanted degrees of freedom can extend beyond the intended subspace. To address this issue, the concept of almost qudits has been introduced [34], in which a quantum state is predominantly supported on a target -dimensional subspace but may contain a small higher-dimensional component. Specifically, a state associated with preparation is an almost qudit if
where projects onto the target -dimensional subspace and quantifies the dimensional leakage. This operational description accommodates physical systems while retaining the central premise of dimension-based semi-device-independent protocols.
The introduction of almost qudits also revealed a severe limitation of these protocols, since even a small dimension leakage can substantially compromise certification procedures [34, 37], including quantum randomness generation and measurement certification. In randomness generation, the problem is particularly pronounced when one seeks to certify the output associated with a specific preparation and measurement setting. An adversary with classical side information can exploit the additional degrees of freedom to reproduce the observed statistics while making the selected output more predictable than an ideal-qudit analysis would suggest. Consequently, the certified randomness can deteriorate rapidly as the dimension leakage increases, even when the system remains predominantly confined to the intended subspace. This sensitivity raises an important question: to what extent does the fragility of existing protocols reflect a fundamental limitation imposed by dimensional leakage, and to what extent does it depend on how the protocol’s performance is evaluated?
In this work, we show that averaging the guessing probability over preparation and measurement inputs can substantially mitigate the effects of dimensional leakage. Unlike fixed-input certification, we exploit the full input ensemble, yielding more robust randomness guarantees and extending the range of leakage parameters compatible with nonzero certified randomness. We further demonstrate that this robustness enables practical continuous-variable (CV) implementations using Gaussian states with reasonably low squeezing and homodyne measurements, which have also been used in other quantum randomness generation schemes [38, 39]. Rather than requiring strictly finite-dimensional states, our framework accommodates their higher-dimensional components, turning the tolerance of dimensional leakage from a potential limitation into a practical advantage for experimentally accessible semi-device-independent randomness generation.
The remainder of the paper is organized as follows. Sec. II introduces the almost-qudit PM scenario. Sec. III presents the randomness certification method and compares the average and fixed-input estimators. Sec. IV explores CV implementations using Gaussian and non-Gaussian states with homodyne and displaced photodetection. Sec. V concludes the paper. The Appendices A, B, and C provide results for additional witnesses and technical derivations.
Almost--dimensional prepare-and-measure scenario
The prepare-and-measure scenario consists of a preparation device that receives an input and sends a physical system to a measurement device. The latter receives an input and returns an outcome . The resulting statistics define a behavior . In a classical description, the communicated system carries a message , implying that
where represents shared classical randomness, independent of the inputs. In a quantum description, the message is replaced by a state and the measurement by a POVM , so that
A separation between classical and quantum correlations requires a restriction on the communicated system. The standard dimension assumption imposes classically and quantum mechanically [16, 20, 21]. Alternative assumptions include bounds on the energy or mean photon number [3, 4, 5], constraints on photon-number statistics [6], on overlaps between preparations [7, 8], on fidelities with reference states [9], or on the information carried by the communicated system [10, 12, 13, 40].
The almost-qudit framework relaxes the dimension assumption by bounding the population outside a -dimensional subspace, while leaving the ambient Hilbert space unrestricted [34], as expressed by Eq. (1) and illustrated schematically in Figure 1(a). Here we assume the same leakage for all preparations, , for simplicity. The -dimensional subspace is defined by a rank- projector , for some orthonormal basis , common to all preparations. For , the dimension-bounded scenario is recovered, while for the preparations may have some population outside the intended -dimensional subspace.
Figure 1. Almost--dimensional prepare-and-measure scenario. (a) Quantum realization. The preparation device receives an input and emits a state in a Hilbert space . The measurement device receives the system and an input , and produces an outcome . For each preparation, the population outside the designated -dimensional subspace, averaged over shared classical randomness, is at most . The dependence of the states, measurements, and subspace on the shared variable is omitted in the diagram. (b) Classical realization. The input is encoded into a message , which, together with the measurement input , determines the output . The shared variable may correlate the devices. For each preparation, the probability that the message lies outside the designated alphabet of at most symbols, averaged over , is at most .
In the presence of shared randomness, Eq. (1) can be extended in two natural ways. One possibility is to require the leakage bound for every realization ,
where is a rank- projector common to all preparations associated with a given . We use, however, a less restrictive alternative, imposing the same condition only on average over the shared randomness,
which allows realizations with larger leakage to be compensated by others with smaller leakage. As in the mean-observable-constrained framework of Ref. [3], the average condition is closer to what can be directly characterized from the observed ensemble, without requiring access to each hidden variable , which motivates its use throughout this work. An important remark is that Eq. (5) allows for particular strategies to exceed the leakage bound for a specific , as long as the average remains bounded by what is observed in the experiment.
The classical counterpart, illustrated in Figure 1(b), is
where is the designated alphabet for a given , common to all preparation inputs , with for every . As in the quantum case, particular realizations may have a larger leakage, as long as the average over remains bounded.
Linear dimension witnesses provide experimentally accessible tests of communication constraints. For four preparations, , and two binary measurements, , we consider the witness [41]
where . For a strict bit constraint, its classical bound is , while the maximal qubit value is . Other witnesses and scenarios are considered in Appendix § 1.3.1, together with their results.
Under the average leakage assumption of Eqs. (5) and (6), these bounds change, since the communicated system is no longer fully restricted to dimension , and become
and
where we derive the classical bound in Appendix § 1.3.2, and the quantum bound follows from the optimal almost-qubit random access code in Ref. [34], whose success probability relates to our witness by . Both bounds recover the usual bit and qubit values at and reach the algebraic maximum at .
Average randomness is more robust to dimension leakage
In the original work introducing the almost-qudit framework [34], as well as in several other semi-device-independent works tailored to randomness certification [3, 6, 9, 13, 21, 26, 42], it is commonly assumed that a fixed-input pair is used for randomness generation, while the remaining inputs are mainly used to estimate the value of the witness. In this setting, for a decomposition of the observed behavior into strategies known to the adversary, we define the guessing probability for the fixed-input pair as
with the corresponding certified randomness quantified by the min-entropy . One of the main reasons to consider such a type of estimator is that the witness and the choice of can be tailored such that the randomness is concentrated on this particular input pair, therefore allowing more randomness to be extracted from it than from other inputs, or from an average over all of them.
We consider, however, another estimator that remains less explored, although some instances of it have already appeared in the literature [22, 25, 43]. We call it the average uniform guessing probability, defined as
which captures the guessing probability when all input pairs are used for randomness generation and are sampled uniformly, with the corresponding min-entropy given by . Notice that, for uniformly sampled inputs, this quantity is simply the average of the fixed-input guessing probabilities over all pairs .
The maximizations over in Eqs. (10) and (11) are not linear, since the most likely outcome may depend on the adversary’s classical information and, for the average estimator, also on the input pair . To remove this maximization, we group together all realizations that lead to the same deterministic guess. For the fixed-input estimator, a branch is labelled by a single guess for , while for the average estimator it is labelled by a complete table . Denoting the total probability of each branch by and defining the subnormalized correlator , the guessing probabilities can be written linearly as
which can now be used as proper linear objective functions in optimization problems.
The goal now is to seek for the largest guessing probability for a given witness value and leakage . To upper bound these values, we use the SDP hierarchy introduced for almost qudits in Ref. [34]. In their construction, the preparations can be taken to be pure and are therefore represented by rank-one projectors , while the measurement effects can be represented by projectors through a Naimark dilation. The -dimensional subspace is represented by a rank- projector . The almost- condition for a normalized preparation is then .
Notice now that, because Eqs. (12) and (13) optimize over guessing branches weighted by , it is convenient to work directly with subnormalized quantities, absorbing this weight into a weighted trace . This gives, in particular, and . For the leakage assumption, we can either assume Eq. (4) or Eq. (5). We use the latter, which in this notation reads
for all , as it imposes a weaker assumption on the adversary.
What we do next is to replace the unknown operator products appearing inside by moment matrices. For each branch we construct a moment matrix whose entries are , with and products of the operators up to the chosen relaxation level. In this way, every quantity involving that appears in the optimization is simply an entry, or a linear combination of entries, of ; for instance, , , and . By construction, . The algebraic relations satisfied by the operators, such as , , , and , together with cyclicity of the trace, translate into linear equalities between different entries of . For the binary-outcome witnesses considered below, we write . Denoting by the guessing-probability objective of either Eq. (10) or Eq. (11), the resulting SDP is
where all terms are understood as linear entries of , while the weights are fixed by . For Eq. (10), denotes a single binary guess, while for Eq. (11) it denotes a complete table of guesses . Since the moment construction relaxes the original quantum problem, its optimum upper bounds the guessing probability and therefore gives the certified lower bound .
We next compare the two guessing probabilities for the witnesses considered here. Since the same qualitative behavior is observed in all cases, we focus in the main text on and leave the results for other scenarios witnesses to the Appendix § 1.3.1. All results are obtained at the second level of the moment hierarchy. For a strict dimension bound, , the two estimators behave similarly close to the maximal quantum violation, as shown in Figure 2(a). As soon as dimension leakage is introduced, while the fixed-input estimator only becomes positive for sufficiently large values of , the average estimator certifies randomness already for much smaller violations and decreases much more smoothly as is increased. For , the fixed-input estimator does not certify randomness over the range shown, while the average estimator still gives a nonzero min-entropy for several values of .
Figure 2. Average versus fixed-input randomness under dimension leakage. (a) Certified min-entropy for the witness as a function of its observed value and for different leakage parameters . Solid curves correspond to the average uniform guessing probability and dashed curves to the fixed-input guessing probability with . (b) Certified min-entropy evaluated at the maximal almost-qubit value as a function of . The solid purple curve shows the average case, while the dashed purple curve shows the fixed-input one.
We must emphasize, however, that there is a trade-off between the two estimators. A fixed-input pair can be chosen such that the witness certifies particularly large randomness for that pair, and can therefore outperform the average estimator under a strict dimension assumption (see the Appendix § 1.3.1 result for the and witnesses). On the other hand, the average estimator is less affected by leakage because increasing the predictability of only the selected pair is no longer enough. Since all input pairs contribute to the guessing probability, the adversary needs to improve the predictability over a larger part of the input set, which gives an intuition for the slower degradation seen in Figure 2(b), where we evaluate the min-entropy of both cases for the maximal almost-qubit value for each leakage.
Another important point to notice in Figure 2(b) is that, for the average case, randomness can in principle still be certified
throughout the region where the quantum and classical bounds in Eqs. (8) and (9) remain separated, up to the point where both reach the algebraic maximum at . For the fixed-input case, the certification disappears much earlier.
Dimension leakage as a resource for continuous-variable implementations
To our knowledge, a single-mode fully Gaussian setup (Gaussian preparations and measurements) has not been shown to detect nonclassicality—and therefore certify randomness—in the hard-truncated -dimensional PM scenario. Allowing leakage makes violations of the classical bound in Eq. (8) possible, but at the same time weakens the randomness bounds. Here we show that the increased robustness of the average estimator allows this tradeoff to be balanced, leading to positive randomness from a fully Gaussian setup.
We also investigate other CV implementations, including Gaussian preparations with displaced photodetection and non-Gaussian preparations with homodyne detection. The former allows us to assess whether non-Gaussian measurements can enhance randomness certification, while the latter explores the role of non-Gaussian preparations, considering both unrestricted states and experimentally implementable superpositions of squeezed cat states.
Gaussian preparations with homodyne detection
We first consider a fully Gaussian implementation, with single-mode Gaussian preparations followed by homodyne detection. Following the phase-space description of [35], we use quadratures satisfying , such that the vacuum covariance matrix is the identity. A single-mode Gaussian preparation is completely characterized by its displacement vector and its covariance matrix . We parametrize it as
where is the thermal occupation, is the squeezing parameter, specifies the squeezing direction, and denotes the usual rotation matrix by an angle . Pure Gaussian states are recovered for .
For measurement input , homodyne detection measures the quadrature , where is the local-oscillator phase. For a Gaussian preparation , the continuous homodyne outcome follows a normal distribution [36] with probability density
with mean and variance , where specifies the measured quadrature. The probability of obtaining an outcome in a measurable interval is therefore , with . To obtain a binary behavior, we assign the interval to outcome and its complement to . The resulting probabilities can then be evaluated analytically as
where denotes the cumulative distribution function of a standard normal distribution. The correlators entering (and also the other inequalities considered in Appendix A) are .
For the almost-qubit condition, the leakage of preparation is the population outside the first two Fock levels, . For a single-mode Gaussian state, the Fock-state populations can be obtained analytically [44]. Since Ref. [44] uses a different quadrature normalization and covariance-matrix convention from the one adopted here, we provide in Appendix C a short derivation directly in our notation. Defining and , the vacuum and single-photon populations are
such that .
We use these expressions to numerically search for large values of at a fixed leakage. Let . For each chosen value of , we consider the nonlinear optimization problem
which we solve numerically using global differential-evolution searches. The resulting points are not guaranteed to give the global Gaussian maximum and we therefore interpret them only as optimized feasible points. This is sufficient for our purpose, since any such point already shows that the corresponding pair , with , can be physically achieved using Gaussian preparations and homodyne measurements.
For each optimized pair , we then solve the SDP in Eq. (15) and obtain a lower bound on . The result of this procedure is shown in Figure 3(a). As the allowed leakage increases, the optimized Gaussian value of also increases, eventually exceeding the corresponding classical almost-qubit bound. However, the certified randomness does not follow the same monotonic behavior. Instead, it is maximized at an intermediate leakage, showing the tradeoff between achieving a larger violation and simultaneously weakening the dimension assumption available to the adversary. The best point found along this curve, marked by the star, occurs at , for which and . Notice that, although larger values of can be reached by increasing , they lead to less certified randomness.
Figure 3. Gaussian preparations with homodyne detection. (a) Optimized as a function of the common leakage , with color indicating the lower bound on and the dashed line the classical almost-qubit bound. The dotted vertical lines delimit the region where , and the star marks the optimal value, at , , and bits. (b) Phase-space representation of the preparations: dots show the displacements, solid curves the contours, the dashed circle the vacuum contour, and the dotted axes the two homodyne quadratures. (c) Preparation and measurement parameters for the same realization, with for all preparations.
The Gaussian implementation is shown in Figure 3(b), with the parameters listed in Figure 3(c). The four preparations are arranged in the four quadrants of phase space, reproducing the sign pattern that underlies the QRAC square [45, 46]. The two homodyne settings measure the and quadratures, with the sign of each outcome determining the binary outcome . It is therefore not exactly the usual QRAC square, but rather its continuous-variable analogue, now implemented with displaced weakly squeezed Gaussian states. The squeezing is also small, (0.97 dB), making the strategy experimentally feasible. We therefore close this section by showing that a fully Gaussian implementation can certify randomness when a controlled amount of dimension leakage is allowed.
Gaussian preparations with displaced photodetection
We next keep the same class of single-mode Gaussian preparations, but replace homodyne detection by a displaced on–off photodetection measurement. Such schemes consist of applying a phase-space displacement followed by photon detection [47, 48, 49]. Although the displacement is a Gaussian operation, photon counting is a non-Gaussian measurement.
For an ideal on–off detector, the no-click and click events are described by and , respectively. If the measurement input specifies a displacement before detection, the effective no-click operator acting on the incoming state is
where the sign of the displacement can be absorbed into its definition, such that we write simply and . Notice that we use the convention for no-click and for click.
The corresponding no-click probability is therefore the overlap of the preparation with a coherent state (see Eq. (36) in Appendix § 1.3.3),
where , , . The correlators can then be obtained as .
We again solve Eq. (22), now with , such that the optimization runs over both the Gaussian preparation parameters and the complex displacement amplitudes . For each optimized pair , we then solve the SDP in Eq. (15). The results are shown in Figure 4, following the same structure as in the previous subsection. Notice that the certified randomness in Figure 4(a) is improved when displaced photodetection is used instead of homodyne detection for the same class of Gaussian preparations. The phase-space representation of the preparations is shown in Figure 4(b), while the corresponding preparation and measurement parameters are listed in Figure 4(c).
Figure 4. Gaussian preparations with displaced photodetection. (a) Certified randomness under dimension leakage. The dashed curve gives the classical bound, the dotted vertical lines delimit the region with , and the star marks the optimal randomness point, at , , and bits. (b) Phase-space representation of the optimized Gaussian preparations. (c) Preparation and measurement parameters at , with for all preparations.
Non-gaussian preparations with homodyne detection
Unrestricted states with a Fock cutoff
To study the role of the preparations, we retain the binary homodyne measurements of Sec. IV A and consider arbitrary pure states. For numerical tractability, we introduce a cutoff at the first eight Fock levels, writing , with . For a target qubit encoded in and , we impose a common leakage for all preparations, .
Since we introduced a Fock cutoff, we can follow the homodyne construction of Ref. [22], now extended to the first eight Fock levels. For each measurement input , the measured quadrature is binned into an interval and its complement, with the corresponding measurement operators represented as finite-dimensional matrices in the truncated Fock basis. For fixed measurement settings and outcome assignments, the witness can be written as
where , are the coefficients of Eq. (7), and is the measurement operator associated with outcome . Since each term depends only on one preparation, the Fock amplitudes can be optimized independently for each , subject to the normalization and leakage constraints. We then optimize the homodyne phases and interval boundaries using differential evolution followed by local refinement, considering both outcome assignments. For each , the resulting value of is used in the SDP of Eq. (15) to certify randomness under the average leakage assumption of Eq. (5).
Figure 5(a) shows that the largest lower bound on the average min-entropy found in the scan occurs at , where and the bound is approximately 0.125 bits per round. At the same point, the fixed-input bound for is numerically zero. For comparison, the best Gaussian realization found with homodyne detection gives 0.0313 bits at (Figure 3(a)). The non-Gaussian realization thus gives about four times the certified average min-entropy at one third of the leakage.
Figure 5. Unrestricted non-Gaussian states with homodyne detection. (a) Certified randomness under dimension leakage. The dashed curve gives the classical bound, the dotted vertical lines delimit the region with , and the star marks the largest-randomness point, at , and bits. (b) Fock-state populations at the starred point, common to all four preparations. (c) Preparation phases , mean photon numbers , and homodyne phases for the same realization. Up to global phases, the four preparations satisfy to numerical precision, with .
Another noteworthy point in Figure 5(a) is that, for , we recover the homodyne result of Ref. [22], where arbitrary preparations within the first two Fock levels were considered. Interestingly—and as suggested by Ref. [22]—even without dimensional leakage, we already certify a positive average min-entropy of approximately 0.067 bits (which can be enhanced to 0.125 bits when a small leakage is allowed).
At the starred point, the four independently optimized states are, up to global phases and numerical precision, related by , with for , respectively (where is given in the caption of Figure 5). These rotations preserve the Fock populations, so the distribution in Figure 5(b) applies to all four states. The vacuum and single-photon populations are approximately 0.473 and 0.502, leaving 0.025 in the higher Fock levels. The corresponding homodyne phases in Figure 5(c) differ by to numerical precision, and the optimized intervals effectively bin each quadrature by its sign. As in the Gaussian case, the preparations exhibit a Q RAC-like square symmetry, now generated by phase rotations of a single non-Gaussian state.
Superpositions of squeezed cat states
Although the unrestricted eight-level optimization above establishes the performance achievable within a truncated Fock space, preparing arbitrary superpositions of Fock states remains experimentally challenging. Motivated by the rotational symmetry and parity structure observed in the previous section, we now restrict the preparations to a physically structured family based on superpositions of even and odd squeezed optical cat states [50, 51, 52].
Similar to the case of unrestricted states with a Fock cutoff, we generate the four preparations from a single seed state through the phase-space rotations , with for , respectively. Because the sign-binned homodyne operators only couple Fock states of opposite parity, a state with definite photon-number parity yields vanishing correlators. But this time we construct as a coherent superposition of orthogonal even () and odd () squeezed cat states,
with , relative phase , and
where is the single-mode squeezing operator with real squeezing parameter , are coherent states with amplitude , and are normalization constants. This formulation is mainly inspired in Ref. [52].
Since and have support exclusively on even and odd Fock numbers, respectively, the vacuum and single-photon populations of each preparation are given by and . Consequently, denoting the component leakages by and , the total leakage of is the convex combination
For any choice of parameters such that lies between and , the weight is uniquely fixed by Eq. (28), ensuring that the exact leakage constraint is satisfied analytically. At , taking reduces and to and , naturally recovering the strict-qubit preparations. For , we numerically optimize over the state parameters and the homodyne angles (with sign-binned outcomes) in a truncated Fock space, and insert each optimized pair into the SDP of Eq. (15) to lower bound .
The results are presented in Figure 6. As shown in the figure, the optimized witness values for the squeezed cat states closely track those of the unrestricted Fock-state search (dash-dotted curve) across the entire leakage range. The largest certified randomness occurs at , where and bits per round. Remarkably, this structured family recovers about 95% of the maximum min-entropy certified by unrestricted eight-level Fock states (0.125 bits at in Figure 5(a)), while outperforming the Gaussian homodyne implementation (0.0313 bits at in Figure 3(a)) by nearly a factor of four.
Figure 6. Superpositions of squeezed cat states with homodyne detection. Optimized as a function of the common leakage , with color indicating the lower bound on and the gray dashed line the classical almost-qubit bound . The black dash-dotted curve shows the witness values obtained for unrestricted states with a cutoff at the first eight Fock levels, and the purple dotted vertical lines delimit the region with . The star marks the optimal randomness point, at , , and bits.
At the starred point, all four preparations share the same photon-number distribution and a mean photon number of . The vacuum and single-photon populations are approximately 0.453 and 0.506, in that order, while the leaked population () remains almost entirely confined to the two- and three-photon levels (), with negligible contributions for , a behavior similar to Figure 5(b). On the measurement side, the optimal homodyne phases are given by the orthogonal settings and , with outcome assigned to the intervals and , respectively, and to their complements.
Discussion
We have investigated non-classicality and randomness certification against dimensional leakage in the almost-qubit prepare-and-measure scenario. Our results show that the choice of randomness estimator plays a crucial role. While leakage can severely compromise certification based on a fixed preparation-measurement pair, averaging the guessing probability over the full input ensemble can mitigate that. The intuition is that an adversary can exploit additional dimensions to increase the predictability of a selected input pair, whereas the average estimator accounts for predictability across all preparation and measurement inputs.
We have further shown that this robustness can enable continuous-variable implementations using experimentally accessible resources. In particular, single-mode Gaussian states measured by homodyne detection can certify nonzero average randomness even with relatively low squeezing. Replacing homodyne detection with displaced on-off photodetection increases the certified randomness in the Gaussian setting considered, but introduces a non-Gaussian measurement.
Non-Gaussian preparations with homodyne detection yield even larger certified randomness. While unrestricted states within the first eight Fock levels provide the best results, experimentally motivated squeezed cat states achieve nearly the same certification, retaining about 95% of the optimal min-entropy found in the eight-level search.
More broadly, our results suggest that dimensional leakage need not be viewed solely as an imperfection to be minimized. Rather, within a suitable certification framework, the higher-dimensional structure of physical systems can be exploited to enable randomness certification in continuous-variable implementations.
Several directions for future work remain open. An important next step is to assess the approach under finite statistics and realistic experimental imperfections, including optical losses, detector inefficiencies, and finite measurement resolution, while developing methods to bound leakage from observed data. Generalizing the average guessing probability to nonuniform input distributions could help optimize certified randomness and clarify its trade-off with fixed-input certification. Further extensions to alternative dimension witnesses, larger input and output alphabets, and multimode optical fields may broaden the range of practical implementations.
Acknowledgments
We acknowledge funding the Brazilian National Council for Scientific and Technological Development (CNPq; Grants No. 403181/2024-0 and 301687/2025-0), the National Institute of Science and Technology for Applied Quantum Computing through CNPq Process No. 408884/2024-0, and the Financiadora de Estudos e Projetos (Grant No. 1699/24 IIF-FINEP). This work was also partially funded through the project “Design e arquiteturas de protocolos CV-QKD” supported by the EMBRAPII CIMATEC Competence Center in Quantum Technologies-Quantum Industrial Innovation (QuIIN), with financial resources from the PPI IoT/Manufatura 4.0 of the MCTI Grant No. 053/2023, signed with EMBRAPII. M.A. acknowledges financial support from the Center for Quantum-Enabled Computing (C4QEC) project, carried out within the International Research Agendas programme of the Foundation for Polish Science, co-financed by the European Union under the European Funds for Smart Economy 2021–2027 (FENG).
References
Average versus fixed-input randomness for the and witnesses
The comparison between average and fixed-input randomness is extended here to two additional facet inequalities of the classical bit prepare-and-measure polytope. Both scenarios have three preparations, , binary outcomes , and target dimension , with either two or three measurement inputs. As in the main text, the correlators are defined as .
For two measurement inputs, , the minimal dimension witness is
Its classical bit bound and maximal qubit value are and , respectively. For three measurement inputs, , the witness considered is
with and . These bounds refer to the strict dimension constraint, .
For both witnesses, the average leakage condition of Eq. (5) is imposed with , separately for each preparation . The guessing probabilities are bounded using the SDP construction in Eq. (15), with the witness coefficients replaced by those of Eqs. (29) and (30).
For fixed-input generation, the selected pairs are for and for . For average generation, all six or nine input pairs, respectively, are sampled uniformly, including those whose correlators do not appear in the witness. The quantities compared are and , with both guessing probabilities optimized under the same witness and leakage constraints.
Figure 7 shows the resulting certified lower bounds as functions of the observed witness value for in panel (a) and in panel (b). Under a strict dimension constraint, the selected fixed inputs yield more certified randomness close to the maximal qubit violation, whereas the average estimator certifies randomness over a broader range of witness values. Even at , there is therefore a trade-off between the amount of randomness certified near the quantum maximum and the range of violations for which certification is possible.
Figure 7. Average versus fixed-input randomness under dimension leakage. Certified min-entropy for the (a) and (b) witnesses as a function of their observed values and for different leakage parameters . Solid curves correspond to the average uniform guessing probability and dashed curves to the fixed-input guessing probability, with for and for .
As the allowed dimensional leakage increases, the fixed-input bounds deteriorate rapidly, and larger witness values are required to obtain a positive certified min-entropy. The average bounds remain positive over a wider range and can exceed the fixed-input bounds even close to the ideal qubit maximum. For example, at and , the average estimator certifies approximately bits, whereas the fixed-input bound is numerically zero. For at the same leakage and , the corresponding bounds are approximately bits for the average estimator and bits for the fixed-input estimator. These comparisons are made at witness values close to the strict-qubit maxima, rather than at the maximal almost-qubit values for the specified leakage.
The different requirements for perfect guessing help explain the greater robustness of the average estimator. For fixed-input generation, only the selected output must be deterministic in each strategy known to the adversary; the remaining input pairs may retain unpredictable outcomes while contributing to the observed violation. By contrast, the uniform average guessing probability equals one only if every input pair is perfectly predictable in every strategy of nonzero weight. Increasing the predictability of a single pair is therefore insufficient to make the average guessing probability reach one. Although dimensional leakage can assist the adversary in both cases, the average objective requires predictability across the full input ensemble.
This interpretation does not imply a universal ordering between the two estimators. The average guessing probability is optimized over a common adversarial decomposition across all inputs, rather than obtained by averaging independently optimized fixed-input bounds. The results for and show that averaging can improve robustness to dimensional leakage and extend the range of violations compatible with certified randomness, as observed for in the main text. A suitably chosen fixed input can nevertheless remain preferable near the ideal quantum maximum when leakage is sufficiently small.
A tight classical bound for
For completeness, we derive the classical bound of under the average leakage assumption. For each , we define the leakage of preparation as
so that Eq. (6) is equivalent to for every .
For a fixed , we split the contribution to according to whether the communicated message lies inside or outside the alphabet . The part of the behavior that stays inside cannot exceed the usual bit bound . On the other hand, whenever a preparation leaks outside this alphabet, its contribution to can improve by at most 2, since each preparation appears in two correlators, whose total algebraic value is at most 2. Therefore, for each ,
and averaging over the shared randomness gives
where in the last step we used the same leakage bound for the four preparations. Combining this with the algebraic maximum , we obtain
To complete the proof, we show that the bound is tight (i.e. can be achieved). For , the usual bit strategy gives . At , shared randomness can be used so that, for each value of , two preparations belong to the two-symbol alphabet and the other two leak, while averaging over makes every preparation leak with probability . In this case the algebraic value can be reached. By convexly mixing this strategy with the usual bit strategy, one obtains all intermediate values for . Therefore, .
Fock-space leakage of a Gaussian state
For two single-mode Gaussian states and , with displacement vectors and covariance matrices , the fidelity is given in Sec. III.A.3, Eq. (80) of Ref. [35] by
where and .
We now take and , with and . In the convention , a coherent state has covariance matrix and displacement (see Sec. II.B.2 of Ref. [35]). Since , we have , while . Moreover, since the coherent state is pure, . Defining and therefore gives
Using , we have
from which the first two Fock populations follow as
since extracts the coefficient of , while setting removes all terms containing higher powers. The first expression gives
For the second, write and such that , , and . Using Eq. (36), we can write
with
At (),
Using , we then obtain
References
- [1]J. B. Brask, N. Brunner, J. Pauwels, D. Rusca, and A. Tavakoli, Quantum correlations in prepare-and-measure scenarios with their semi-device-independent applications (2026), arXiv:2603.23604 [quant-ph].arxiv.org/abs/2603.23604
- [2]A. de Oliveira Junior, S. Zamora, J. B. Brask, R. Chaves, and A. Tavakoli, Quantum prepare-and-measure scenarios: concepts and methods (2026), arXiv:2601.07225 [quant-ph].
- [3]T. Van Himbeeck, E. Woodhead, N. J. Cerf, R. García-Patrón, and S. Pironio, Quantum 1, 33 (2017).
- [4]D. Rusca, T. van Himbeeck, A. Martin, J. B. Brask, W. Shi, S. Pironio, N. Brunner, and H. Zbinden, Phys. Rev. A 100, 062338 (2019).
- [5]M. Avesani, H. Tebyanian, P. Villoresi, and G. Vallone, Phys. Rev. Applied 15, 034034 (2021).
- [6]C. Roch i Carceller, J. Pauwels, S. Pironio, and A. Tavakoli, Phys. Rev. Lett. 135, 14802 (2025).
- [7]J. B. Brask, A. Martin, W. Esposito, R. Houlmann, J. Bowles, H. Zbinden, and N. Brunner, Phys. Rev. Applied 7, 054018 (2017).
- [8]W. Shi, Y. Cai, J. B. Brask, H. Zbinden, and N. Brunner, Phys. Rev. A 100, 042108 (2019).
- [9]A. Tavakoli, Phys. Rev. Lett. 126, 210503 (2021).
- [10]R. Chaves, J. B. Brask, and N. Brunner, Phys. Rev. Lett. 115, 110501 (2015).
- [11]T. S. Sarubi, S. Zamora, M. Alves, V. F. Alves, G. M. Viswanathan, and R. Chaves, Braz. J. Phys. 56, 136 (2026).
- [12]A. Tavakoli, E. Zambrini Cruzeiro, J. B. Brask, N. Gisin, and N. Brunner, Quantum 4, 332 (2020).
- [13]A. Tavakoli, E. Zambrini Cruzeiro, E. Woodhead, and S. Pironio, Quantum 6, 620 (2022).
- [14]G. Cobucci, A. Bernal, M. J. Renner, and A. Tavakoli, Nat. Commun. 17, 1104 (2026).
- [15]J. Pauwels, S. Pironio, and A. Tavakoli, Quantum 9, 1637 (2025).
- [16]R. Gallego, N. Brunner, C. Hadley, and A. Acín, Phys. Rev. Lett. 105, 230501 (2010).
- [17]T. S. Sarubi, M. Alves, S. Zamora, V. F. Alves, A. de Oliveira Junior, and R. Chaves, Phys. Rev. A 114, 042404 (2026).
- [18]M. Navascués and T. Vértesi, Phys. Rev. Lett. 115, 020501 (2015).
- [19]A. Bernal, G. Cobucci, M. J. Renner, and A. Tavakoli, Phys. Rev. Lett. 133, 240203 (2024).
- [20]M. Pawłowski and N. Brunner, Phys. Rev. A 84, 010302 (2011).
- [21]H.-W. Li, M. Pawłowski, Z.-Q. Yin, G.-C. Guo, and Z.-F. Han, Phys. Rev. A 85, 052308 (2012).
- [22]M. Alves, V. L. Sena, S. Zamora, T. S. Sarubi, A. de Oliveira Junior, A. B. Tacla, and R. Chaves, Phys. Rev. A 113, 042418 (2026).
- [23]T. S. Sarubi, M. Alves, V. F. Alves, S. Zamora, D. H. G. Duarte, A. de Oliveira Junior, and R. Chaves, Randomness certification and trade-offs in the prepare-and-broadcast scenario (2026), arXiv:2608.08329 [quant-ph].arxiv.org/abs/2608.08329
- [24]E. Passaro, D. Cavalcanti, P. Skrzypczyk, and A. Acín, New J. Phys. 17, 113010 (2015).
- [25]P. Mironowicz, A. Tavakoli, A. Hameedi, B. Marques, M. Pawłowski, and M. Bourennane, New J. Phys. 18, 065004 (2016).
- [26]C. Roch i Carceller, L. N. Faria, Z.-H. Liu, N. Sguerso, U. L. Andersen, J. S. Neergaard-Nielsen, and J. B. Brask, Phys. Rev. A 112, 022430 (2025).
- [27]A. Tavakoli, J. Kanievski, T. Vértesi, D. Rosset, and N. Brunner, Phys. Rev. A 98, 062307 (2018).
- [28]A. Tavakoli, M. Smania, T. Vértesi, N. Brunner, and M. Bourennane, Sci. Adv. 6, eaaw6664 (2020).
- [29]N. Miklin, J. J. Barkhof, and M. Pawłowski, Phys. Rev. Research 2, 033014 (2020).
- [30]S. Zamora, R. A. Macêdo, T. S. Sarubi, M. Alves, D. Poderini, and R. Chaves, Phys. Rev. A 112, 042410 (2025).
- [31]M. Navascués, K. F. Pál, T. Vértesi, and M. Araújo, Phys. Rev. Lett. 131, 250802 (2023).
- [32]V. Scrani, Acta Phys. Slovaca 62, 347 (2012).
- [33]A. Acín and L. Masanes, Nature 540, 213 (2016).
- [34]J. Pauwels, S. Pironio, E. Woodhead, and A. Tavakoli, Phys. Rev. Lett. 129, 250504 (2022).
- [35]C. Weedbrook, S. Pirandola, R. García-Patrón, N. J. Cerf, T. C. Ralph, J. H. Shapiro, and S. Lloyd, Rev. Mod. Phys. 84, 621 (2012).
- [36]J. Brask, Gaussian states and operations—a quick reference (2022), arXiv:2102.05748 [quant-ph].arxiv.org/abs/2102.05748
- [37]J. Pauwels, S. Pironio, E. Woodhead, and A. Tavakoli, Phys. Rev. Lett. 132, 189901 (2024).
- [38]T. Gehring, C. Lupo, A. Kordts, D. S. Nikolic, N. Jain, T. Ry- dberg, T. B. Pedersen, S. Pirandola, and U. L. Andersen, Nat. Commun. 12, 605 (2021).
- [39]M. Ishihara, C. Roch i Carceller, K. N. Wilkinson, C. A. Breum, T. Gehring, and J. B. Brask, Phys. Rev. A 114, 052413 (2026).
- [40]A. Mishra, M. Masini, M. Balanźóda, A. Tavakoli, and S. Pironio, Prepare-and-measure quantum key distribution from a bound on information leakage (2026), arXiv:2610.37296 [quant-ph].arxiv.org/abs/2610.37296
- [41]P. Doderini, S. Brito, R. Nery, F. Sciarrino, and R. Chaves, Phys. Rev. Research 2, 043106 (2020).
- [42]P. Mironowicz, H.-W. Li, and M. Pawłowski, Phys. Rev. A 90, 022322 (2014).
- [43]H.-W. Li, Z.-Q. Yin, M. Pawłowski, G.-C. Guo, and Z.-F. Han, Phys. Rev. A 91, 032305 (2015).
- [44]V. V. Dodonov, O. V. Man’ko, and V. I. Man’ko, Phys. Rev. A 49, 2993 (1994).
- [45]A. Ambainis, A. Nayak, A. Ta-Shma, and U. Vazirani, J. ACM 49, 496 (2002).
- [46]A. Ambainis, D. Leung, L. Mancinska, and M. Ozols, Quantum random access codes with shared randomness (2009), arXiv:0810.2937 [quant-ph].arxiv.org/abs/0810.2937
- [47]K. Banászěk and W. Wódkiewicz, Phys. Rev. Lett. 76, 4344 (1996).
- [48]J. Brask and R. Chaves, Phys. Rev. A 86, 010103 (2012).
- [49]R. Chaves, G. B. Lemos, and J. Pienaar, Phys. Rev. Lett. 120, 190401 (2018).
- [50]A. Ourjoumtsev, H. Jeong, R. Tualle-Brouri, and P. Grangier, Nature 448, 784 (2007).
- [51]D. V. Sychev, A. E. Ulanov, A. A. Pushkina, M. W. Richards, I. A. Fedorov, and A. I. Lvovsky, Nat. Photonics 11, 379 (2017).
- [52]D. S. Schlegel, F. Minganti, and V. Savona, Phys. Rev. A 106, 022431 (2022).






