WorksPhysics and Astronomy
A New Quantum Algorithm Framework for Integer Order Entropy Estimation
Abstract
Entropy estimation for unknown distributions is a basic problem in statistical property estimation. In this paper, we propose a quantum algorithm framework for estimating Rényi entropy with fixed integer order . Given purified quantum query-access to a distribution on symbols, our algorithm estimates its order- Rényi entropy to within additive error using queries, where . The main ingredient is a recursive construction of collision states in which intermediate states are retained and reused. We bound both the preparation and reflection costs, and choose the number of retained states at each order so that all recursive steps fit within a common query budget. We combine this construction with a sequence of decreasing probability thresholds, estimating the contribution of the labels found along the way separately from the remaining power sum. A batch estimator gives the required bound in the high-precision regime, and an initial search removes the need for prior knowledge of the power sum.
Introduction
Estimating properties of unknown probability distributions is a fundamental task in statistics and theoretical computer science. Entropy estimation is a particularly important example: it asks how much information about the uncertainty of a distribution can be obtained without reconstructing all of its probabilities. For a distribution on and an integer , the Rényi entropy [1] and the associated power sum are
For integer orders, the power sum admits a useful probabilistic interpretation:
Thus it is the probability that independent samples have the same label. Such an observation underlies classical collision estimators [2] and quantum algorithms based on distinctness testing [3]. It also suggests preparing coherent quantum states whose label probabilities are proportional to higher powers of via coherent access to a sampling procedure [3, 4].
This paper studies the following estimation problem.
Problem 1 (Integer order Rényi entropy estimation). Given purified quantum query-access to an unknown probability distribution on , a fixed integer , an additive accuracy , and a maximum failure probability , output an estimate satisfying
The resource measure is the number of queries to the preparation oracle.
Two issues arise when using collision states to estimate entropy. First, additive accuracy in requires relative accuracy in , whose value may be as small as . Second, a collision state of order is prepared using states of order , so repeated use of the construction must account for the cost of these intermediate states. We address both issues by combining a recursive preparation procedure with quantum mean estimation and a sequence of decreasing probability thresholds.
Main results
We work in the purified quantum query-access model of Definition 1. For each fixed integer , define
Our main result is the following theorem.
Theorem 1 (Main theorem). For any fixed integer , there is a constant and a quantum algorithm such that, for any , , , and probability distribution on , the algorithm estimates to within additive error with success probability at least , using
queries to and in Definition 1 (controlled access to is not required).
We first construct an estimator with success probability at least ; independent repetition followed by taking the median gives the stated dependence on . The exponents of the query complexity for success probability at least are summarized in Table I. The two terms in Eq. (3) are equal when , where
| Order | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 10 | ||||
| 11 | ||||
| 12 | ||||
| 26 |
Table I. Exponents in quantum query upper bounds .
Consequently, Theorem 1 gives
Dependence on the integer order
We describe how the query exponent depends on the integer order. By subtracting adjacent terms in Eq. (2), we obtain
A maximizing level therefore satisfies
Adjacent levels give the same value at a shared endpoint. The first ranges are displayed in Table II. Eq. (6) implies . Using
therefore gives
This maximizing level identifies the term that determines the common query budget. Our algorithm still constructs collision prefixes successively up to the requested order .
| Level | Integer orders | |
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 |
Table 2. Levels controlling the recursive budget. Shared endpoints have two maximizing levels.
Techniques
We describe the main ideas before giving the constructions and proofs. The framework has three components: a recursive procedure for preparing collision states, a threshold-based decomposition of the power sum, and a preliminary estimate of its scale.
1) Recursive preparation of collision states: For a known set , a collision state of order has label probabilities proportional to on . To extend it, we retain several copies, choose one uniformly, and compare its label with that of a fresh purified sample. Conditional on equality, the selected registers form a collision state of order . The routing operation moves the complete purification registers. Consequently, the unused copies are restored and factor from the output state.
To analyze preparation and reflection together, we use the transducer framework of Belovs, Jeffery, and Yolcu [5] and the amplification and estimation tools of Cornelissen, Apers, and Gribling [6]. We compose the operations of a stage before converting them to a query circuit, so the intermediate states are reused exactly within the transducer construction. Let , let bound the preparation and reflection costs at order , and set . Retaining approximately copies gives the recurrence
where on . The two recursive terms account for extending a state and for using the retained copies. By expanding the recurrence and bounding each resulting term, we obtain a budget that is sufficient at every order up to . The largest of these requirements determines the exponent in Eq. (2).
2) Estimation over probability intervals: Suppose that is a known upper bound within a constant factor of . Starting from , we decrease the threshold geometrically, with . At each stage, samples from the order- collision state reveal all labels whose probabilities exceed the next threshold, with high probability. We record the observed labels and remove them from the active set. Once the threshold reaches a constant multiple of , we estimate the remaining power sum to additive error , where is the desired relative accuracy.
At most labels are recorded. We estimate their total contribution by conditioning on this known set and applying a batch estimator. The same estimator is applied directly to the full distribution in the high-precision regime. These two uses of batch estimation account for the second term in Eq. (3). The organization by probability thresholds is related to the multilevel approach of Chen et al. [7]; here the states used at each threshold are constructed from integer-order collisions.
3) Removing prior knowledge and the order-two case: We obtain by starting from the upper bound and halving the candidate scale whenever an additive estimate certifies that the next candidate is still valid. Each test uses a collision-table estimator based on the search algorithm of Peng, Hou, and Dong [8]. The total cost of this preliminary search is absorbed in Eq. (3). For , the first mean-estimation step of the collision-state construction suffices for both the preliminary search and the final estimate, giving a particularly simple implementation.
Related work
Collision statistics are a standard tool for estimating integer power sums. Acharya, Orlitsky, Suresh, and Tyagi [2] used this structure in classical Rényi entropy estimation. In the quantum setting, Gilyén and Li [4] developed a framework for distributional property testing under purified quantum query-access. Li and Wu [3] developed entropy estimators for a broad range of orders and reduced the integer-order problem to distinctness testing. Their work provides the starting point for exploiting collision structure in quantum entropy estimation. Our algorithm uses the collision interpretation at integer orders to construct the states needed for estimation recursively.
Quantum amplitude estimation [9] and variance-dependent mean estimation [10] supply the basic estimation procedures. The probability-oracle formulation and multidimensional estimation results of van Apeldoorn [11] give further context for coherent access to distributions. Chen, Wang, and Zhang [12] discuss purified access for a broad collection of distributional and quantum-state properties. We use this access model with arbitrary purification states and count calls to the preparation oracle and its inverse.
Our collision-table search uses learning-graph techniques [13] in the form developed by Peng, Hou, and Dong [8]. The recursive state construction uses the transducer composition framework [5, 6], which is closely related to the query-complexity characterization of state conversion [14]. We give the preparation, reflection, and normalization analysis needed to apply these tools to the entropy estimator.
Organization
The rest of the paper is organized as follows. Section II introduces the notation and access model. Section III gives the batch estimator, and Section IV obtains a coarse power-sum estimate without prior knowledge. In § 5, we construct the recursive collision-state primitive. Section VI analyzes its query complexity. Section VII combines these ingredients into the entropy estimator and proves Theorem 1. The collision-table estimator used in the binary search is proved in Appendix A and a simpler sufficient algorithm for order two that uses only the first recursive step is given in Appendix B.
Preliminaries
Notation
Throughout the paper, is a fixed integer. The notation suppresses polylogarithmic factors in , , and , and allows its implicit constants to depend on . All query bounds are worst-case bounds. For an integer , we write . Unless stated otherwise, logarithms are natural and vector norms are Euclidean. The Hilbert space of a quantum register is denoted by , and denotes its all-zero state. For a fixed integer , and denote the entropy and power sum in Eq. (1). The scalar always denotes a known upper bound for the full power sum and abbreviates the unknown value when convenient. Estimates are denoted by a tilde. For a fixed set , we write for the restricted power sum. Probability thresholds are denoted by or and are imposed directly on the probabilities .
Purified quantum query-access
We use the purified-access model of [4], also formulated as a quantum probability oracle in [11]. The following definition specifies the operations charged in our query bounds.
Definition 1 (Purified quantum query-access for discrete distributions). An unknown discrete distribution has purified quantum query-access if we can query a unitary and its inverse such that
where the states are arbitrary normalized states. One application of or is one query. The action of outside is unrestricted.
The label register makes the states orthonormal. All permutations in our algorithms move complete copies of registers , so the unknown purification states are retained together with their labels.
Controlled versions of the preparation oracle are often included in the access model [12]. The algorithms below require only and . Indeed, a controlled reflection about is implemented by applying , a controlled phase on the known state , and then . The two oracle calls cancel when the control is inactive. We use the same construction for controlled table lookups.
Power sums and entropy estimation
Let . The following estimates will be used repeatedly:
The first three inequalities follow from standard comparisons between finite-dimensional norms. To prove Eq. (13), take and apply the moment inequality to the nonnegative random variable , using and .
Suppose that an estimate satisfies for . Then
Consequently, relative accuracy in the power sum suffices for additive accuracy in the entropy, as in [2, 3]. If only an upper bound is available, it is enough to request additive accuracy for a sufficiently small constant . Before taking the logarithm, the estimate is projected onto . This projection cannot increase its distance from .
Estimating power sums with batches of samples
We first estimate when a numerical upper bound is available. The estimator is based on the collision statistic of a batch of independent samples, a standard unbiased estimator for integer power sums [2]. Its quantum implementation combines a variance estimate with a reflection about the batch state. The latter operation is cheaper than preparing the whole batch again, so we keep the two costs separate. Throughout this section, we write .
Lemma 1 (Product-state reflection). For an integer and , the reflection
can be implemented with Euclidean error at most , uniformly on sample-register inputs with initialized auxiliary registers, using queries. A controlled version has the same query bound. The ideal operation returns the auxiliary registers to zero.
Proof. Let on register and . Put
By routing the selected register through the oracle, we implement with two queries. Since the projectors commute, they admit a common eigenspace decomposition. On a common eigenspace with exactly rejecting registers, the eigenphases of that overlap are . For the phase is zero; otherwise its distance from zero modulo is at least .
Coherent phase detection at resolution , with error and subsequent uncomputation, distinguishes these cases using controlled walk steps [9]. Applying phase in the first case and phase in the second implements the desired reflection, because the common positive subspace is spanned by . Controlled local reflections use the known middle phase between ordinary inverse and forward preparation calls, as described in Section II.
Lemma 2 (Separate preparation and reflection costs). Suppose a known observable measured in produces a real random variable with . Suppose preparation costs queries and reflection about costs , with logarithmic dependence on inverse implementation error. If the observable is reversibly computable without queries, its mean can be estimated to additive error using
queries at constant success probability. Failure probability introduces an additional factor .
Proof. The variance-dependent estimator of Montanaro [10 Theorem 2.5] uses a polylogarithmic number of initial-state copies and reflections. Replacing by covers the remaining case. Its observable computations, shifts, truncations, and rotations are known operations. If the complete procedure makes at most reflections, implement each with Euclidean error at most for a sufficiently small constant . Telescoping the circuit errors changes the final state by at most . The logarithmic precision overhead and median amplification give the stated bound.
For independent , , define the collision statistic
This rational observable can be computed reversibly from the sample labels without further queries.
Lemma 3 (Collision variance). For fixed and ,
Proof. Each indicator has expectation . Indicators indexed by disjoint subsets are independent. If two subsets of size overlap in positions, their product has expectation . For a fixed first subset, there are possible second subsets with this overlap. After division by , the coefficient is at most . Summing over gives the first variance estimate, and Eq. (11) gives the second.
Theorem 2 (Batch estimator with a known upper bound). For a fixed integer , suppose , where is known. For any and , there exists a quantum algorithm that estimates to within additive error , with success probability at least , using
queries, with included among the suppressed factors.
Proof. Choose
Preparing the batch requires queries, whereas Lemma 1 implements its reflection using queries. To include the work registers that store the statistic, we add their zero-state projector to the initial reflection and conjugate by the reversible circuit computing . Lemma 2 therefore gives
To obtain the inequality, observe that the squared terms in the reflection cost form the geometric progression . Its sum is at most times the sum of its two endpoints. Our choice of balances the preparation cost with the last term in Eq. (19). The query budget and the accuracy of each reflection are fixed before running the estimator.
Obtaining a power-sum estimate without prior knowledge
To estimate the entropy to the required accuracy, we need a constant-factor upper bound on . We first show how to query an implicit table of independent samples. We then use a collision-table estimator inside a binary search for the power sum. The proof of the collision-table estimator is deferred to Appendix A.
Lemma 4 (Implicit independent-sample table). An algorithm accessing a length- table only by
can be simulated so that its output law is exactly the law averaged over independent . Each table query, including an inverse or controlled query, uses one call each to and . The simulation uses private preparation registers initialized to zero.
Proof. Let copy the visible label in private register into the response register by XOR. Implement the lookup as
Routing the addressed register through the oracle port costs one query in each direction. For analysis, set and . Then . All other algorithmic gates act outside the private table and commute with , so these conjugations telescope. Tracing out the private table removes the final .
The resulting computation is equivalent to querying on . Dephasing its label registers changes no output probabilities, because the label projectors commute with the entire computation. The dephased labels have joint law . For a controlled query, control only ; the ordinary preparation calls cancel when the control is inactive. The unitary is introduced only to analyze the output distribution; the simulation does not apply it and therefore incurs no -query initialization cost.
Proposition 1 (Sparse-table estimate). For any fixed integer , suppose , where is known. For any and , there is a quantum algorithm that outputs an estimate satisfying
with probability at least , using queries. The query count and output range are bounded on every execution, even if the supplied value fails to satisfy the stated assumption.
The proof in Appendix A uses a table of length , whose expected number of -collisions is bounded by a constant depending on . A capped collision count has negligible bias and can be estimated coherently through Lemma 4.
Lemma 5 (Initial scale). A scale satisfying
can be found with probability at least , for any , using queries. The procedure has a deterministic worst-case query bound.
Algorithm 1: Binary search for the power sum
Input: Purified access oracle ; dimension bound ; fixed integer ; maximum failure probability .
Parameters: .
Output: A scale satisfying Eq. (21).
Set .
For , estimate to additive error using Proposition 1, with failure probability at most . Denote the output by .
If , return ; otherwise set and continue.
If the iteration limit is reached, declare failure.
Proof. The pseudocode is given in Algorithm 1. Suppose first that every estimate is within its stated error. The initial upper bound is valid. Whenever the algorithm continues, we have , so the next call also has a valid upper bound. When it stops, the returned value satisfies , as required.
When all estimates are accurate, the procedure stops before the candidate upper bound falls below . Since , the prescribed number of iterations is sufficient. By a union bound, all required estimates are accurate with probability at least . Each test uses queries, and there are tests. The fixed limit also ensures on unsuccessful histories, so the same query bound holds for every execution.
The same scale-search procedure can be applied to the batch estimator in Theorem 2. This gives a direct entropy estimator with query complexity
In the full algorithm, we use the batch estimator after a scale has already been obtained.
Recursive construction of collision states
We next construct the operation that extends a collision state by one order. For convenience, write and . An order- collision state consists of complete purified-sample registers with a common label. When such a state is used to prepare one of higher order, we call it a collision prefix. We use the term cache for a collection of retained copies that will be reused during the construction. A raw sample means a copy of before conditioning on any active set. During one stage, the active set is fixed and all operations move complete collision prefixes, including their purification registers.
Transduction costs and composition
We use the transducer formalism of [5] in the form developed in [6]. In particular, we invoke the reflection characterization, rebalancing, amplitude amplification, bounded mean estimation, and composition results in [6 Theorem 2.4, Lemma 2.5, Corollary 3.4, Theorem 3.7, and Theorems 2.9–2.15]. The underlying state-conversion viewpoint is described in [14]. A canonical transducer performs an exact public-state conversion. Its query cost is a quadratic form in the public input vector ; hence obeys the triangle inequality. Costs add under sequential composition and direct sums. We use the bidirectional model, permitting and .
All operations within a complete stage are composed before conversion to a query circuit. A transduction cost gives an -query circuit at constant final accuracy. If stages are converted separately, they use fresh caches and inverse-polylogarithmic accuracy; this overhead is absorbed in . In particular, each separately converted stage prepares its own cache, so its exact-input assumption does not depend on the approximation error of a previous conversion.
For a reflection, we refer to the costs on its positive and negative eigenspaces as its positive and negative costs, respectively. Rebalancing changes costs to for any input-independent . A useful consequence is the following commuting-projector rule: if commuting local projectors have reflection cost at most , reflection about their common positive subspace has positive cost and negative cost .
For completeness, we give the witness calculation that yields this rule. Let be the local negative projectors and . On a vector orthogonal to their common kernel, use components , where is the Moore–Penrose inverse. Then
The nonzero eigenvalues of are positive integers. The positive witness has one copy of the input in each index sector, so its squared norm is . These witnesses satisfy the cross-sign reflection constraints. Rebalancing and composition with the local reflections give the rule. The same argument applies when the registers are entangled with untouched auxiliary systems, or when the reflection includes known tests that work registers are zero.
We also record the amplification formula used below. Suppose
For a reflection transducer about , exact preparation of the normalized good state costs
Reflection about that state has positive cost and negative cost on vectors orthogonal to it [6 Corollary 3.4].
An asymmetric source reflection
Let project onto a cache of identical order- prefix states, and let act on a fresh register. Suppose a local prefix reflection has cost and restores its initialized retained buffers. The commuting-projector rule gives a cache reflection with costs , . A fresh-state reflection can be rebalanced to costs , .
Reflection about has positive cost . On a negative input its cost is at most
To see this, decompose . The first component is negative for , because , and the second is negative for . We place the corresponding negative witnesses in separate direct-sum sectors. Their cross-sign constraints sum to the required inner product, and their squared norms give Eq. (24). This calculation composes the witnesses directly and does not require a separate test of . The decomposition is made with the projectors of the negative input, so the local constraints apply across distinct oracle inputs as required. Known index and workspace projectors reject orthogonal components at zero query cost. Previously initialized buffers remain unchanged throughout the operation and are restored exactly.
Extending a collision state
Let be known sets and suppose for . For an integer , put
The latter state is used only when . Write .
Lemma 6 (Exact prefix extension). Suppose preparation and reflection for have transduction cost at most and restore their initialized buffers. For , a cache of retained copies, one additional prefix, and a fresh raw sample give preparation of at cost
This includes replenishment of the additional prefix. The same bound gives reflection about the new state on . Unused prefixes and all preceding buffers factor exactly from the output and are restored. The guarantees hold with arbitrary spectator entanglement.
The source cache also estimates to additive error at additional cost
If instead a known upper bound is known, , and , the bound is
This includes . Constant-factor estimates suffice to choose the parameters, while the final numerical rescaling requires a correspondingly accurate estimate of . Mean estimation restores the source cache and the fresh sample exactly at the transducer level.
Proof. Choose a uniform index in , compare the selected prefix label with a fresh raw sample, and flag a match in . Move the selected complete prefix to an output port. Let denote these query-free operations. The good component factors as
where is a known uniform index state. We uncompute this known index state after the operation. We also include an independent coin with success probability in the flag. The actual success probability is , with the same normalized good state.
First consider a unit vector orthogonal to the new prefix. Invert the witness map on with the retained prefixes and uniform index, and project the initial known workspace onto its prescribed state. Call the resulting vector for the undiluted flag; the actual flag gives . With , direct inner products give
Equal insertion positions contribute 1 to the first identity; distinct positions contribute . After projection of the fresh register onto , the inserted prefix vector is . Its overlap with the cache state is zero by the orthogonality of to . All cross-position terms therefore vanish in the second identity. Allowing the coefficients to take values in an auxiliary Hilbert space proves the same identities in the presence of spectator entanglement.
Combining Eqs. (24) and (29) with the reflection formula for the normalized good state gives positive and negative costs bounded by
respectively. We set and choose their common value to balance these two bounds. The squared balanced cost is a constant multiple of , proving the reflection part of (25).
For preparation and estimation, let be independent cache labels with law on . Let count their occurrences of , and for an independent raw label put
Binomial moments give
Let be the normalized Grover complement of the flagged source. After inverse witness mapping and projection of the known workspace, its coefficient in each cache and fresh-label sector is . For the resulting vector ,
The source reflection, conjugated by , consequently has costs
Use and , and choose
The sum of the two costs is . Eq. (23) gives Eq. (25) for preparation. The same bound includes the cost of replacing the consumed prefix, since . It also includes the fresh sample, since . The factorization in Eq. (28) is exact.
For the mean, apply the bounded-mean transducer of [6 Theorem 3.7] to the Boolean flag observable. Request flag error and choose its iteration parameter . Choose its bias and variance parameter at most a sufficiently small multiple of . The output variance is , while the cost is, up to logarithms, times the sum of the source and complement costs. A constant number of repetitions and Chebyshev’s inequality give Eq. (26). The source is restored exactly; uncomputing restores its cache and fresh sample. Only the source reflection and the known flag enter this calculation. Hence the bound is independent of the purification vectors and their phases.
To prove the statement with a known upper bound , choose a known with and a sufficiently small fixed . A three-branch known coin always accepts with weight , accepts an active match with weight , and otherwise rejects. Its mean is
The centered coefficient after inverse witness mapping is . The squared norms are and . The moment contributions in Eq. (32)–(33) now have an additional factor at most . They vanish when . We use the same reflection-cost parameters and take . Subtracting the known baseline and multiplying by gives Eq. (27). This procedure remains well defined when , because it does not require preparation of the corresponding normalized collision state.
Order-two states and retained auxiliary registers
Lemma 6 includes . Take the unconditioned source on the full alphabet, so , , , and . With a raw cache of size , the active pair state satisfies
There is no need to condition this source on the active set. The mean estimator with a known upper bound estimates before the normalized pair state is constructed, and it remains well defined when .
Local reflections preserve their initialized buffers. On that public subspace, the local projectors of a cache commute even when their implementations share earlier buffers. We may therefore compose their reflection witnesses with the exact transducers from the preceding levels. The construction uses only their action on this invariant subspace.
A stage with initialized order- prefixes and order- outputs needs raw samples, in addition to its stated raw buffer. We prepare this sample pool in advance. Subsequent controlled operations use the prepared samples, known gates, and controlled reflections, without controlled calls to . Every prefix cost is at least a constant, so the pool cost is included in setup and per-output costs. Early termination leaves the unused pool untouched. A complete stage is composed before circuit conversion, with fresh pools at any separately converted stage.
Query complexity of the recursive construction
In this section, we analyze the number of retained states required by the recursive construction. Fix an integer and suppose that a known scale satisfies and . Let denote the relative power-sum accuracy. Constants depending only on are absorbed into the choices of the parameters.
Choice of accuracy regime
If , Theorem 2 gives
We therefore analyze the branch
The stage threshold satisfies . In particular,
since . Choose
When implementing the algorithm, we multiply these budgets by sufficiently large constants depending only on .
Initial states and the recursive query bound
The exponents satisfy
Indeed, with , the numerator of the difference after multiplication by the positive common denominator is
For it is . For , the bracket is at least . It follows from Eq. (36) that
At a fixed active set, write for , and keep for the unconditioned source. By (13),
The pair base and Eq. (40) give
Once a constant-factor estimate has been certified, choose a bound on the local preparation and reflection costs and retain
The next query-cost estimate is computed from the exact-prefix numerator and a certified scale for :
As shown in Section VII, the numerator can be computed before obtaining a constant-factor estimate of . We use this local recurrence to determine the number of retained copies at each order.
Set . Since , the recurrence implies
The contribution of the maximum with 1 in Eq. (44) is absorbed by the inequality . Rounding upwards can only decrease the middle term. Thus Eq. (45) holds independently of the setup-cost bound that we prove below.
Analysis of the recurrence
Normalize by . Eqs. (41)–(45) give
The coefficients decrease with , because
Moreover, . We may therefore absorb the additive constant into a fixed multiple of the initial bound .
To expand the recurrence, bound each sum by a fixed multiple of its largest summand. Every resulting term is obtained by composing identity maps with maps of the form . If it uses square-root steps at indices , then . Because is nonincreasing, moving them to indices can only enlarge that term. Thus
For this is exactly .
We show that each term is at most
Put and . The inequality is equivalent to
The right-hand side is largest at . Substitution and a st root yield
The identity verifies the accuracy exponent directly. Moreover,
and the factor in parentheses is at least one in the regime of Eq. (36). Maximizing over therefore gives precisely the budget in Eq. (38). Combining Eqs. (47)–(48), we obtain the following bound simultaneously for all orders:
Lemma 7 (Uniform setup budgets). In the branch (36), the raw cache costs . For every retained prefix whose moment satisfies , the recursive query-cost estimate satisfies . Its rounded cache has setup cost . All retained caches together have cost for fixed , and Eq. (51) holds for every prefix.
Proof. The simultaneous bound in Eq. (51) has already been established. For any retained prefix, it gives
because . Hence . The raw cache has samples. There are at most additional caches. We construct a prefix only after certifying the stated condition on its moment. Section VII describes this test and explains how the algorithm proceeds when the moment is too small.
At there are no square-root steps and no intermediate collision caches. The only path is , and
Hence the pair-state construction satisfies Eq. (51) as well. Its source normalization is known exactly, since .
Rényi entropy estimator for integer orders
In this section, we combine the preceding subroutines to estimate . We first locate the power sum within a constant factor. We then estimate the contributions of the recorded and active labels separately and analyze the error and query complexity of the complete algorithm.
Algorithm and parameter choice
Let be the required entropy accuracy. We choose for a sufficiently small constant , decreasing the allowed constant range of if necessary so that . First obtain using Algorithm 1. If , apply the batch estimator of Theorem 2. Its query complexity is given by Eq. (35). Otherwise, set
We choose the constants in and to satisfy Lemma 7 and the error requirements below. Let and choose the final index so that its threshold is within a fixed factor of . The pseudocode is given in Algorithm 2.
Algorithm 2: Quantum algorithm for integer order Rényi entropy estimation
Input: Purified access oracle for ; fixed integer ; additive accuracy ; maximum failure probability .
Parameters: ; the parameters in Eq. (52) after is found.
Output: An estimate satisfying Problem 1.
Use Algorithm 1 to find , with failure probability at most .
If , estimate the full moment with the batch estimator and go to step 6. Otherwise initialize the parameters in Eq. (52), set , and set the recorded set to empty.
At each dyadic threshold , estimate the active moments within constant factors, in increasing order. Construct a prefix cache only after certifying that its moment is large enough. If a moment is sufficiently small, halve without collecting labels.
At a retained nonfinal stage, keep the active mask fixed and draw labels from the order- state. Add the observed labels to the recorded set, remove them from activity, and halve .
At the final threshold, either certify a negligible active moment or refine the required normalizations and estimate that moment. Estimate the recorded contribution by conditional batch estimation.
Denote the sum of the estimated contributions by . Project it onto and output for this run.
Repeat the complete run times independently and return the median as .
Within a run, use fixed error assignments so that steps 1–6 succeed jointly with probability at least . Every separately converted test or stage uses fresh retained states and a predetermined query limit.
Preparation of the retained states
At a fixed stage, maintain for . Define for and , while denotes the normalization of the unconditioned source. We use
The pair moment also satisfies .
The unnormalized query-cost bound can be computed before estimating . Start with . Once a coarse scale is certified, set
The fixed constants may be chosen separately at successive orders. With this choice, is known before the next moment is estimated. Taking the maximum with 1 does not change the asymptotic bound, because . An extra source prefix, in addition to the retained cache, is included when applying Lemma 6; this changes the bounds by only a constant.
By induction, these quantities bound the exact preparation and reflection costs. They also satisfy
The last inequality follows from the recurrence analysis in Section VI. It is used only in the analysis; the algorithm determines concrete sizes from the computable quantities in Eq. (54). All retained buffers are restored exactly. A certified inequality implies and by Lemma 7.
Estimating the restricted power sums
We obtain constant-factor estimates of in increasing order. Each test for uses only caches whose normalizations have already been certified. The first test needs the unconditioned source and its buffer, so it is defined even when the active set has zero mass. For , begin with a valid upper scale derived from and the coarse interval for ; for use . We decrease the candidate upper bound geometrically until it reaches , where is a sufficiently small fixed constant. At a candidate scale , apply (27) to additive precision . Its query cost, apart from the bounded initialization, is
We implement the tests with confidence intervals and stopping thresholds separated by fixed factors. Whenever a test is accurate, it either certifies a smaller valid upper bound or returns a constant-factor interval containing . Constant-factor normalization estimates suffice at this point: we multiply the estimated match ratio by the certified endpoints for . Their ratio is bounded in terms of . If the supplied scale is within a fixed factor of , reduce the fixed coin coefficient in the baseline construction accordingly. This preserves its cost bound.
If the test certifies , no active label has probability at least . Skip extraction and halve . The tests can be continued to a sufficiently small floor so that a successful exit always either yields this certificate or returns . At the final threshold, a small certificate gives
with its constant chosen within the residual error allocation. We may then set the residual estimate to zero. Otherwise, the certified moment is large enough to construct the next prefix cache. Thus every normalized state used by the algorithm has a positive certified normalization, while the positive acceptance baseline keeps the preceding tests well defined even at zero.
Finding labels and estimating the remaining contribution
At a retained nonfinal stage, let . Use the certified scale to select
independent output labels from the exact order- state, with the mask fixed for the whole stage. Each active label with is sampled with probability at least . A union bound shows that the logarithmic factor in the number of samples suffices to observe all such labels with the required confidence. Remove every observed label at the end of the stage. On this event, every label remaining in the active set has probability at most .
By (55), the extraction cost is
The total number of recorded labels is at most the number of outputs. Summing the geometric threshold bounds gives
At the final stage the active probabilities are .
If the residual has not already been certified negligible, find a constant-factor estimate above a sufficiently small multiple of . The prefix mean primitive estimates it to additive error at cost
The last equality uses the final threshold relation . The residual is discarded only after its total moment has been certified small. A bound on the largest remaining probability alone would not justify this step.
Accurate normalization factors
The normalized collision states are defined in terms of the true moments, even though the algorithm initially knows them only within constant factors. After undoing known coin factors, their match probabilities obey
Constant-factor estimates suffice for constructing the states, locating subsequent moments, and collecting labels. For final numerical rescaling, let be a retained residual scale and put . Refine sequentially to relative error , assigning a sufficiently small fixed fraction to each factor. The accumulated multiplicative error over the fixed number of orders is . At this list is empty. For , the refinement costs
Using , , and Eq. (55),
The normalization refinement therefore adds only queries. We perform it only after certifying that the residual is large enough to require estimation. Consequently, no relative-accuracy requirement is imposed on a zero residual.
Estimating the contribution of the recorded labels
Lemma 8 (Estimation on a known set). Let be a known set of labels, , and . Its contribution can be estimated to additive error using
purified queries. If , this is .
Proof. If is empty, we return zero. Otherwise, put and . Then , and Hölder’s inequality gives .
Suppose first that a constant-factor scale for positive is known. Fixed-point amplitude amplification [15] prepares the original purified state conditioned on at cost . This supplies purified access to the distribution on , whose power sum of order is at most . Apply Theorem 2 with additive precision . If the requested error is already a sufficiently large fraction of the upper bound on the conditional moment, we return zero instead. Including conditional preparation, the query cost is
We enlarge the moment upper bounds by fixed factors when necessary to account for the uncertainty in the mass estimate. Substituting and gives Eq. (61). For , the first inverse-accuracy exponent is
To find the scale of , we use amplitude-estimation tests [9] with geometrically decreasing candidate values and fixed query budgets, stopping at a sufficiently small multiple of . If is certified below that scale, then and returning zero is valid. Otherwise retain a constant-factor interval and refine to relative error . The refinement costs
Indeed, if then ; if , the same conclusion follows from . The initial tests cost , which is absorbed. The refined mass controls the final multiplication by to error , since the contribution is at most . When , the initial tests terminate without invoking conditional preparation.
Finally, fix an upper bound on the number of conditional preparation and inverse calls in the complete capped batch circuit. Implement each preparation with state error at most
where we choose the tolerance conservatively from the certified interval for . A two-dimensional output rotation gives an ideal unitary extension of the exact conditional state whose operator-norm distance from the implemented preparation is . Its inverse has the same error, so the full circuit changes by at most . Fixed-point amplification has only logarithmic dependence on . The known positive mass floor and keep this logarithm polynomial in . Allocate fixed fractions of the total error to the mass, conditional moment, and preparation errors, and amplify confidence to obtain the claim. ∎
Error analysis and total query complexity
We assign a fixed query budget to every scale test, cache construction, and output stage, using the certified classical intervals available at that point. Each complete stage receives a fresh raw-sample pool covering its cache and output budgets. Its preparation is charged through the setup and per-output costs. Controlled reflections about the raw sample use only ordinary , and a known controlled zero-state phase.
Within each stage, we compose initialization with all label-extraction operations before converting the transducer to a circuit. The retained source states are therefore exact throughout the transducer construction. There are scale tests and stages. Rebuild caches for every separately converted test or stage, and use inverse-polylogarithmic conversion accuracy. Confidence amplification and a union bound add only logarithmic factors. In particular, extraction calls within a stage are not converted individually at accuracy inverse-polynomial in the number of outputs.
The endpoint intervals fix the maximum number of scale tests. Cap every test, cache construction, and extraction stage by its prescribed bound, and cap the number of recorded labels by Eq. (58). An exceeded cap or an inconsistent confidence interval is declared a failure. With sufficiently large fixed constants in the budgets, these events do not occur when all estimates are accurate. The caps also bound the number of queries on every other execution.
Proof of Theorem 1. Obtaining the initial scale requires queries. In the high-precision branch, (35) costs . Otherwise each localization, setup, extraction, normalization, and residual step costs by Eqs. (56)–(60) and Lemma 7. Lemma 8 and Eq. (58) estimate the recorded contribution at cost .
Add the estimates for the recorded and active labels. Their total moment error is . Since , choosing sufficiently small and applying Eq. (14) gives entropy error at most . The projection onto does not increase the moment error. We allocate the individual failure probabilities so that one complete run succeeds with probability at least .
Finally, implies
Substituting gives Eq. (3) at constant success probability. The initial search is absorbed by the first term. Repeating the complete algorithm times and taking the median gives success probability at least . The overheads from circuit conversion and confidence amplification are polylogarithmic and are included in the stated bound.
Sparse collision tables for scale estimation
In this appendix, we prove Proposition 1, which is used in the binary search of Section IV. Combining the proposition with that search and Eq. (14) also gives a direct entropy estimator using queries.
Collision search with bounded populations
For a table , write for the multiplicity of label and define
The quantities control the search cost, while is the statistic whose expectation we estimate.
Lemma 9 (A capped-population search algorithm). Fix . Suppose a length- table has maximum multiplicity at most , and known numbers satisfy
The sequences are empty when . Define
There is an algorithm that decides whether a -collision exists and, when it exists, finds a collision label, with failure probability at most , using
queries. Its query count is fixed and its output is bounded even outside the promise. The suppressed factors are logarithmic in , , .
Proof. We use the colored dual-adversary construction in [8 Lemma 8.5 and Proposition 8.6], following its learning-graph approach. The positive inputs have a colorful -collision and multiplicity at most ; negative inputs have no -collision anywhere. Both domains obey the population promises. Thus each negative input has at most occurrences of any label.
Partition the positions randomly into balanced roles of sizes . The number of equal-label prefixes across the first roles is at most . For raw set sizes , the diagonal objective of the construction is, up to fixed constants,
We make explicit its dependence on . Correction branches in the feasibility constraints count occurrences of the selected positive certificate label in a negative input. There are at most , so their branch parameter is and the number of raw copies at level can be taken as . It depends only on .
If the selected label has occurrences in role , then and the positive normalization is
where denotes the falling factorial. Under and ,
Thus the correction multiplicities and positive normalization remain bounded by constants depending only on . The cited feasibility construction retains the objective (67) with such constants. This establishes the required dependence on the multiplicity cutoff .
To optimize, put , , , and, for , set
Since and , these satisfy and
Expanding the minima shows that is the minimum, over subsequences including the empty subsequence, of
For fixed , its denominator is largest at , since is nonincreasing. The term in Eq. (65) then implies that each expression is at least . Since , all certificate terms obey
For , this follows directly from .
Choose a sufficiently large fixed and take . If , the volume conditions hold, and . Otherwise reading the table costs and suffices. The setup terms in Eq. (67), including , and the enlarged certificate terms are all bounded by . The algorithmic characterization by the dual adversary bound [14] then gives the colored decision algorithm.
A fixed -tuple is colorful with probability bounded away from zero in terms of . We repeat the procedure with independent colorings and accept if any repetition finds a collision. This decides the existence of a collision with bounded error. A globally negative table is a valid negative input for every coloring; on positive tables a favorable coloring supplies a valid positive input. Repetition reduces the error to the required confidence.
For search, binary-search the label alphabet. At each decision step replace labels outside the selected label prefix by distinct position-tagged symbols. This uses original lookups, preserves all population and multiplicity caps, and keeps a collision precisely when the selected prefix contains a collision label. After at most correct decisions, the remaining prefix identifies a collision label. We pad all operations to fixed query budgets, including executions on inputs outside the promise.
Moments and tails of a random table
Let be independent samples, with and . We use and for the corresponding random population and collision counts.
Lemma 10 (Collision moments). There is a constant such that, for and every integer ,
Moreover,
Proof. We have , and Eq. (12) proves the first inequality in Eq. (71). Expand as a sum of collision constraints on distinct positions each. A connected component of overlapping constraints on positions forces all its labels to agree and contributes at most
after summing its embeddings. There are at most components, at most positions, and at most identification patterns. These bounds give Eq. (70) after enlarging .
If an occupancy exceeds , then . Thus
Corollary 1 (A promise with negligible truncation error). For , choose with sufficiently large . There are caps
with , such that
The same conclusion holds with any larger fixed constants, depending only on , in the denominators.
Proof. Apply Markov’s inequality to Eq. (70) with moment order . A sufficiently large multiple of gives tail probability at most . Taking the minimum with is valid because . The factorial estimate controls the maximum occupancy. Finally,
Take to be a sufficiently large multiple of . The right-hand side is at most up to a fixed constant. Increasing absorbs the caps and the finite number of tail events.
The bounded collision-count estimator
Proof of Proposition 1. Set and . Then
Choose the caps in Corollary 1 with a sufficiently small fixed multiple of . The following procedure computes a capped count on promised tables:
Initialize and an empty set of excluded labels.
Use Lemma 9, masking excluded labels by distinct position tags. If no collision remains, output .
For the returned label, use quantum search [16] to enumerate its positions and verify each reported position, stopping after discoveries or when a fixed query budget is reached. Under the promise there are at most positions; high-confidence search tests whether any remain.
If positions are found, add to , cap the result at , and exclude the label. Stop at the cap or after at most iterations; otherwise return to step 2.
Every returned index is checked against the table. If a subroutine fails, a cap is exceeded, or the query budget is exhausted, return an arbitrary value in . Reduce all decision and enumeration errors so their total probability is at most . Occurrence enumeration costs per iteration, which is absorbed, up to powers of , by .
Let be the output. Combining its bounded range, the bad-table probability, and the clipping error gives
where can be made arbitrarily small by decreasing the fixed error tolerances.
We implement this procedure coherently by retaining its random bits, measurement records, and private table registers. Lemma 4 gives the exact independent-table mean. Rotate a flag with conditional success probability . Its mean is , so amplitude estimation [9] attains additive error using executions and inverse executions of the coherent procedure. Multiply the estimate by . Eqs. (74)–(75) give error at most . The initial reflection includes the zero-initialized implicit table and is a known query-free operation.
For the execution cost, gives , and . The exponent of in the th term of (65) is
All polynomial factors in , , and all confidence factors are polylogarithmic in . Thus each execution costs , proving the stated bound. Median amplification gives any desired confidence. The explicit caps bound both the output and the query cost on every execution.
A simpler order-two estimator
Algorithm 2 applies to , with no intermediate collision-state levels. In this section, we give a simpler implementation for this order. It uses only the first mean-estimation step of Lemma 6, both to locate the power sum and to obtain the final estimate.
Proposition 2 (Direct order-two estimator). Let and suppose , , for fixed . For sufficiently small , the order-one to order-two prefix mean primitive estimates to additive error using
ordinary purified queries at constant success probability. The same primitive finds the initial scale at worst-case cost . The complete procedure is given in Algorithm 3. Hence
Algorithm 3: Quantum algorithm for order-two Rényi entropy estimation
Input: Purified access oracle ; dimension bound ; additive accuracy ; maximum failure probability .
Output: An estimate with additive error at most and failure probability at most .
Start with . At each candidate, set and . Use the mean primitive of Lemma 6 to estimate to additive error .
If the estimate is at least , retain . Otherwise replace by and repeat, subject to a fixed limit of tests.
Set and . Prepare raw samples and use the same primitive to estimate to additive error , for a sufficiently small constant .
Project the result onto and take its negative logarithm.
Repeat the complete procedure times and return the median.
The confidence assignments in steps 1–4 make each complete run succeed with probability at least .
Proof. Use the whole alphabet as both sets in Lemma 6, with
The promises hold because and . Prepare a cache of raw samples and the constant number of additional source samples. Comparing the selected sample with a fresh sample gives a match probability of , and the source normalization is exactly one. With additive moment error , Eq. (27), including setup, gives
Choose . The first and last terms are then , proving Eq. (77). Compose the cache initialization and mean transducer before circuit conversion. Projection onto and the negative logarithm give the entropy estimate.
To obtain the initial scale, start at . At each valid candidate upper bound, set , , and estimate to error by the same primitive. Its cost is . Stop if the estimate is at least ; otherwise replace by . When the estimate is accurate, continuation preserves the upper-bound assumption and stopping gives . Since , an accurate test must stop at .
Fix the number of tests and their caps using , and amplify their confidence according to that number. The geometric cost sum is at most . If the intervals become inconsistent or the query budget is exhausted, we declare failure. The returned scale obeys . Substituting in Eq. (77) proves Eq. (78).
Thus the same prefix framework applies at every fixed integer order. Order two uses raw samples as its only cache and has no intermediate moment normalizations. It does not require label collection or the batch estimator.
References
- [1]A. Rényi, “On measures of entropy and information,” in Proc. 4th Berkeley Symp. Mathematical Statistics and Probability, vol. 1, pp. 547–561, 1961.
- [2]J. Acharya, A. Orlitsky, A. T. Suresh, and H. Tyagi, “Estimating Rényi entropy of discrete distributions,” IEEE Trans. Inf. Theory, vol. 63, no. 1, pp. 38–56, 2017. arXiv:1408.1000.arxiv.org/abs/1408.1000
- [3]T. Li and X. Wu, “Quantum query complexity of entropy estimation,” IEEE Trans. Inf. Theory, vol. 65, no. 5, pp. 2899–2921, 2019. doi:10.1109/TIT.2018.2883306.DOI
- [4]A. Gilyén and T. Li, “Distributional property testing in a quantum world,” in Proc. 11th Innovations in Theoretical Computer Science Conf. (ITCS), LIPIcs, vol. 151, pp. 25:1–25:19, 2020. doi:10.4230/LIPIcs.ITCS.2020.25.DOI
- [5]A. Belovs, S. Jeffery, and D. Yolcu, “Taming quantum time complexity,” Quantum, vol. 8, Art. no. 1444, 2024. doi:10.22331/q-2024-08-23-1444.DOI
- [6]A. Cornelissen, S. Apers, and S. Gribling, “Improved quantum volume estimation with transducers and amortized quantum walks,” 2026. arXiv:2609.40217v2.arxiv.org/abs/2609.40217
- [7]K. Chen, M. Gao, T. Li, Q. Wang, and X. Wang, “Quantum multi-level estimation of functionals of discrete distributions,” in Proc. 53rd Int. Colloq. Automata, Languages, and Programming (ICALP), LIPIcs, vol. 374, pp. 58:1–58:23, 2026. doi:10.4230/LIPIcs.ICALP.2026.58. Full version: arXiv:2605.03685v1.DOI
- [8]T. Peng, S. Hou, and X. Dong, “Tight quantum query bounds for collision finding over arbitrary bounded types,” 2026. arXiv:2611.17804v1.arxiv.org/abs/2611.17804
- [9]G. Brassard, P. Høyer, M. Mosca, and A. Tapp, “Quantum amplitude amplification and estimation,” in Quantum Computation and Quantum Information, Contemporary Mathematics, vol. 305, pp. 53–74, American Mathematical Society, 2002. arXiv:quant-ph/0005055.DOI
- [10]A. Montanaro, “Quantum speedup of Monte Carlo methods,” Proc. R. Soc. A, vol. 471, no. 2181, Art. no. 20150301, 2015. arXiv:1504.06987.DOI
- [11]J. van Apeldoorn, “Quantum probability oracles & multidimensional amplitude estimation,” in Proc. 16th Conf. Theory of Quantum Computation, Communication and Cryptography (TQC), LIPIcs, vol. 197, pp. 9:1–9:11, 2021. doi:10.4230/LIPIcs.TQC.2021.9.DOI
- [12]K. Chen, Q. Wang, and Z. Zhang, “A list of complexity bounds for property testing by quantum sample-to-query lifting,” 2025. arXiv:2512.01971v1.arxiv.org/abs/2512.01971
- [13]A. Belovs, “Learning-graph-based quantum algorithm for k-distinctness,” in Proc. 53rd Annu. IEEE Symp. Foundations of Computer Science (FOCS), pp. 207–216, 2012.arxiv.org/abs/1205.1534
- [14]T. Lee, R. Mittal, B. W. Reichardt, R. Špalek, and M. Szegedy, “Quantum query complexity of state conversion,” in Proc. 52nd Annu. IEEE Symp. Foundations of Computer Science (FOCS), pp. 344–353, 2011. arXiv:1011.3020.DOI
- [15]T. J. Yoder, G. H. Low, and I. L. Chuang, “Fixed-point quantum search with an optimal number of queries,” Phys. Rev. Lett., vol. 113, Art. no. 210501, 2014. arXiv:1409.3305.DOI
- [16]M. Boyer, G. Brassard, P. Høyer, and A. Tapp, “Tight bounds on quantum searching,” Fortschr. Phys., vol. 46, no. 4–5, pp. 493–505, 1998. arXiv:quant-ph/9605034.arxiv.org/abs/quant-ph/9605034