Quantum query complexity studies the number of queries needed to learn some property of a black box. A closely related question is how well an algorithm can succeed with this learning task using only a fixed number of queries. In this work, we propose measuring an algorithm's performance using the mutual information between the output and the actual value. The task of optimizing this mutual information using a single query is similar to a basic task of quantum communication, where one attempts to maximize the mutual information of the sender and receiver. We make this analogy precise by splitting the algorithm between two agents, obtaining a communication protocol. The oracle's target property plays the role of a message that Alice encodes into a quantum state, which is subsequently sent over to Bob. The first part of the algorithm performs this encoding, and the second part measures the state and aims to deduce the message from the outcome. Moreover, we formally consider the oracle as a separate subsystem, whose state records the unknown oracle identity. Within this construction, Bob's optimal measurement basis minimizes the quantum correlations between the two subsystems. We also find a lower bound on the mutual information, which is related to quantum coherence. These results extend to multiple-query nonadaptive algorithms. As a result, we describe the optimal nonadaptive algorithm that uses at most a fixed number of queries, for any oracle classification problem. Crucially, this mutual-information perspective was shown elsewhere [A. Levi ., ] to have practical utility for algorithmic design, providing the theoretical foundation to optimize iterative subroutines in hybrid quantum-classical schemes. Within the present work, we apply this framework to analyze the stage-by-stage information flow and track partial progress in several standard quantum algorithms, including the Deutsch-Jozsa, Bernstein-Vazirani, and Shor-Kitaev algorithms.
Quantum query complexity studies the number of queries needed to learn some property of a black box. A closely related question is how well an algorithm can succeed with this learning task using only a fixed number of queries. In this work, we propose measuring an algorithm's performance using the mutual information between the output and the actual value. The task of optimizing this mutual information using a single query is similar to a basic task of quantum communication, where one attempts to maximize the mutual information of the sender and receiver. We make this analogy precise by splitting the algorithm between two agents, obtaining a communication protocol. The oracle's target property plays the role of a message that Alice encodes into a quantum state, which is subsequently sent over to Bob. The first part of the algorithm performs this encoding, and the second part measures the state and aims to deduce the message from the outcome. Moreover, we formally consider the oracle as a separate subsystem, whose state records the unknown oracle identity. Within this construction, Bob's optimal measurement basis minimizes the quantum correlations between the two subsystems. We also find a lower bound on the mutual information, which is related to quantum coherence. These results extend to multiple-query nonadaptive algorithms. As a result, we describe the optimal nonadaptive algorithm that uses at most a fixed number of queries, for any oracle classification problem. Crucially, this mutual-information perspective was shown elsewhere [A. Levi ., ] to have practical utility for algorithmic design, providing the theoretical foundation to optimize iterative subroutines in hybrid quantum-classical schemes. Within the present work, we apply this framework to analyze the stage-by-stage information flow and track partial progress in several standard quantum algorithms, including the Deutsch-Jozsa, Bernstein-Vazirani, and Shor-Kitaev algorithms.
Oracle-based quantum computation reframes efficiency from classical time/space costs to query complexity, i.e., the number of accesses to a black-box unitary oracle Uf needed to reveal a hidden property or target state. This study comparatively analyzes query complexity across four canonical oracle-driven algorithms—Deutsch’s, Bernstein–Vazirani, Grover’s search, and Amplitude Amplification—to clarify how superposition, entanglement, interference, and phase kickback translate into provable speedups independent of hardware details. The objective is to systematically connect oracle structure to achievable quantum advantage by contrasting exact, single-query interference algorithms with iterative, probabilistic rotation-based algorithms, and by benchmarking classical deterministic/probabilistic query requirements against quantum bounds. Methodologically, we (i) mathematically model Deutsch and Bernstein–Vazirani via stepwise state-vector evolution to expose phase kickback and phase-encoded answer extraction in one oracle call, (ii) geometrically track Grover and Amplitude Amplification as two-dimensional state-space rotations, quantifying how repeated oracle-driven reflections amplify success amplitude, and (iii) compute classical query baselines and compare them directly with quantum query scaling. Results show that Deutsch reduces classical 2 queries to exactly 1 quantum query for constant-versus-balanced testing, while Bernstein–Vazirani deterministically recovers an n-bit hidden string s with (O(1)) quantum queries versus (O(n)) classical queries. For unstructured search over (N=2n) items, Grover achieves a bounded-error quadratic improvement from (O(N)) to (O(√{N}) queries, and Amplitude Amplification generalizes this to boost success probability from (p) to near certainty in O (1/√p) oracle applications. The central implication is a structural divide: rigid algebraic structure permits maximal, single-query speedups, whereas unstructured “chaos” necessitates iterative geometric amplification, which is more broadly applicable but demands highly stable, error-corrected hardware; consequently, quantum systems are best viewed as specialized co-processors activated when oracle structure warrants a quantum shortcut.
We study hybrid quantum-classical algorithms in the query model. The computation consists of quantum subroutines that make at most q oracle queries; between subroutines, all qubits are measured and discarded. We prove matching upper and lower bounds for several problems in this model:
(i) (Unbiased) Phase estimation up to a precision ε requires Θ(qε21) queries;
(ii) (Unbiased) Amplitude estimation up to a precision ε requires Θ(qε2p(1−p)) queries;
(iii) Search among N items requires Θ(qN) queries;
(iv) Two level AND-OR tree (AND of m ORs, with n inputs to each OR) requires Θ(qnm) queries.
All of these bounds are optimal up to a constant factor, for all q from 1, corresponding to the classical complexity, to Q(f), the unrestricted quantum query complexity of the respective problem. We also derive a hybrid lower bound for distinguishing two distributions specified by a state-preparation unitary; this bound is tight up to a logarithmic factor.
Besides specific lower bounds, an important contribution is developing methods for proving lower bounds on hybrid quantum algorithms (which have been very ad-hoc up to now). The first two bounds follow from a common framework: we analyze probability distributions over measurement transcripts and bound a progress measure that captures their distinguishability. The AND-OR bound requires a more delicate argument, combining two progress measures that track the information available to the algorithm classically and in quantum form, respectively.
We investigate the reason for the quantum speedup -- quantum algorithms requiring fewer computation steps than their classical counterparts. We extend their representation to the process of setting the problem. The initial measurement selects a setting at random, Bob (the problem setter) unitarily changes it into the desired one. This representation is to Bob and any external observer, it cannot be to Alice (the problem solver). It would tell her the function computed by the black box, which to her should be hidden inside it. We resort to relational quantum mechanics. To Alice, the projection of the quantum state due to the initial measurement is retarded at the end of her problem solving action. To her, the algorithm input state remains one of complete ignorance of the setting. By black box computations, she unitarily sends it into the output state that, for each possible setting, encodes the corresponding solution, acquired by the final measurement. We show that we can ascribe to the final measurement the selection of any part -- say the R-th part -- of the random outcome of the initial measurement. This projects the input state to Alice on a state of lower entropy where she knows a corresponding part of the problem setting. The quantum algorithm is a sum over classical histories in each of which Alice, knowing in advance one of the R-th parts of the setting, performs the black box computations still required to identify the solution. Given an oracle problem and a value of R, this retrocausality model provides the number of black box computations required to solve it. Conversely, given a known quantum algorithm, it yields the value of R that explains its speed up. R = 1/2 always yields the number of black box computations required by an existing quantum algorithm and the order of magnitude of the number required by optimal one.
Quantum query complexity underpins much of our understanding of quantum speedups, yet nearly all existing lower and upper bounds are derived for simple Boolean oracles. Many practical tasks-noisy database search, stochastic optimization, adaptive learning, and time-varying systems-are best modeled by richer oracle classes. This paper systematically extends quantum query complexity theory to four non-standard oracle models: (1) stochastic oracles that return random outputs drawn from a distribution; (2) multi-solution oracles encoding a solution set of size k; (3) time-dependent oracles whose internal state evolves between queries; and (4) relational oracles encoding structured constraints rather than simple membership. Using generalized adversary methods, polynomial method techniques, and hybrid arguments, we derive tight (up to polylog factors) lower bounds for each model and construct matching algorithms where possible. For instance, we show that searching for any one of k marked items in an unstructured database still admits a Grover-like quadratic speedup, but with optimal complexity Θ(N/k), and that stochastic noise in oracle outputs degrades the advantage gracefully as a function of the noise parameter. For certain time-dependent and relational models, we prove that no better-than-classical speedup is possible, clarifying the limits of quantum advantage in adaptive settings. These results provide a more realistic foundation for quantum algorithms targeting noisy search, stochastic optimization, and constraint satisfaction, and they highlight the precise structural features that enable or preclude query-based quantum speedups.
We investigate the reason for the quantum speedup -- quantum algorithms requiring fewer computation steps than their classical counterparts. We extend their representation to the process of setting the problem. The initial measurement selects a setting at random, Bob (the problem setter) unitarily changes it into the desired one. This representation is to Bob and any external observer, it cannot be to Alice (the problem solver). It would tell her the function computed by the black box, which to her should be hidden inside it. We resort to relational quantum mechanics. To Alice, the projection of the quantum state due to the initial measurement is retarded at the end of her problem solving action. To her, the algorithm input state remains one of complete ignorance of the setting. By black box computations, she unitarily sends it into the output state that, for each possible setting, encodes the corresponding solution, acquired by the final measurement. We show that we can ascribe to the final measurement the selection of any part -- say the R-th part -- of the random outcome of the initial measurement. This projects the input state to Alice on a state of lower entropy where she knows a corresponding part of the problem setting. The quantum algorithm is a sum over classical histories in each of which Alice, knowing in advance one of the R-th parts of the setting, performs the black box computations still required to identify the solution. Given an oracle problem and a value of R, this retrocausality model provides the number of black box computations required to solve it. Conversely, given a known quantum algorithm, it yields the value of R that explains its speed up. R = 1/2 always yields the number of black box computations required by an existing quantum algorithm and the order of magnitude of the number required by optimal one.
We extend the representation of quantum algorithms to the preparation of the problem setting. An initial measurement serves to set the problem, the final one as usual to read the solution. This extension highlights the possibility of ascribing the selection of a variable fraction R of the information that specifies the random outcome of the initial measurement to the final measurement. The input state of the quantum algorithm to the problem solver (Alice), of maximal ignorance of the problem setting that to her should be hidden, would consequently be projected on a state of lower entropy where she knows in advance an R-th part of the setting (i. e. of the information that specifies it). Given the appropriate value of R, the quantum algorithm turns out to be a sum over classical histories in each of which Alice knows in advance one of the possible R-th parts of the problem setting and performs the Q(R) computations (oracle queries) still needed to find the solution. Grover's search problem can be solved with any value of R from 0 to about 1/2, when the solution algorithm becomes the optimal Grover algorithm. In all the optimal quantum algorithms examined, R is close to 1/2 and Q(1/2) yields the order of magnitude of the number of queries. If this held in general, as it seems to be plausible, given any oracle problem we would know the order of magnitude of the number of queries needed for its optimal quantum solution.