Pseudo-Deterministic Quantum Algorithms
Abstract
We initiate a systematic study of pseudo-deterministic quantum algorithms. These are quantum algorithms that, for any input, output a canonical solution with high probability. Focusing on the query complexity model, our main contributions include the following complexity separations, which require new lower bound techniques specifically tailored to pseudo-determinism:
-
We exhibit a problem, Avoid One Encrypted String (AOES), whose classical randomized query complexity is but is maximally hard for pseudo-deterministic quantum algorithms ( query complexity).
-
We exhibit a problem, Quantum-Locked Estimation (QL-Estimation), for which pseudo-deterministic quantum algorithms admit an exponential speed-up over classical pseudo-deterministic algorithms ( vs. ), while the randomized query complexity is .
Complementing these separations, we show that for any total problem , pseudo-deterministic quantum algorithms admit at most a quintic advantage over deterministic algorithms, i.e., . On the algorithmic side, we identify a class of quantum search problems that can be made pseudo-deterministic with small overhead, including Grover search, element distinctness, triangle finding, -sum, and graph collision.
Keywords and phrases:
Pseudo-determinism, Quantum Computing, AlgorithmsCategory:
Track A: Algorithms, Complexity and GamesCopyright and License:
2012 ACM Subject Classification:
Theory of computation Quantum complexity theoryAcknowledgements:
We thank Rahul Santhanam, Igor Oliveira, and Scott Aaronson for useful discussions on pseudo-determinism.Funding:
This research was supported by ERC Starting Grant 101163189 and UKRI Future Leaders Fellowship MR/X023583/1.Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The study of pseudo-deterministic algorithms, initiated by Gat and Goldwasser [13], is concerned with randomized algorithms that output a canonical solution for each input. That is, a randomized algorithm that solves a search problem is said to be pseudo-deterministic if there exists a function such that for any input , the output is with high probability.
Pseudo-deterministic algorithms capitalize on the computational power of randomization while still maintaining the predictable output behaviour of deterministic algorithms. This stands in contrast to fully randomized algorithms, whose repeated runs may return vastly different outputs. Over the last decade, pseudo-deterministic algorithms have received much attention and have appeared across diverse areas of theoretical computer science [15, 16, 14, 17, 10, 11, 7, 8, 6, 19].
In the quantum setting, pseudo-deterministic algorithms were first considered by Goldwasser, Impagliazzo, Pitassi and Santhanam [18] when studying the Find1 problem111The input to the Find1 problem is a string with the promise that has Hamming weight at least , and the goal is to output an index with . for pseudo-deterministic algorithms in the query complexity model. While Find1 is solvable in queries by random sampling, they showed that any pseudo-deterministic algorithm, classical or quantum, for Find1 requires queries.
What makes quantum pseudo-determinism truly distinct is the randomness that arises from measurement. Many quantum algorithms that achieve exponential quantum speed-up (e.g., Fourier sampling) measure superpositions over exponentially many candidate solutions, a step that appears inherent. This offers a new perspective to revisit existing quantum advantages:
When can quantum speed-ups be achieved pseudo-deterministically,
and when does quantum advantage inherently require output entropy?
This question also links quantum pseudo-determinism to certified randomness: if one can show that the quantum advantages of a certain problem cannot be preserved given the pseudo-deterministic requirement, then any (potentially untrusted) quantum device that solves efficiently must generate some entropy. A series of works [4, 3, 23] show, under standard complexity assumptions, that Fourier sampling [1], random-circuit sampling, and the Yamakawa–Zhandry algorithm [23] cannot be made pseudo-deterministic222For quantum certified randomness, these works in fact prove quantitatively stronger statements: any efficient quantum algorithm for these tasks must generate a large amount of min-entropy..
Motivated by the above, we initiate a systematic study of quantum pseudo-determinism. We investigate the fundamental properties of pseudo-deterministic quantum algorithms, show complexity separations that shed light on the strength and limitations of quantum pseudo-determinism, and identify a wide class of problems (which includes Grover search, element distinctness, triangle finding, -sum, and graph collision) that admit efficient pseudo-deterministic quantum algorithms.
1.1 Our results
We start with the query complexity model. Unless otherwise stated, we denote the length of the input to the search problem by . For a search problem , we denote the deterministic query complexity by , the pseudo-deterministic quantum query complexity , and the quantum query complexity by . We denote the output of algorithm given query access to input as .
1.1.1 Query complexity separations
We first study the relationship between pseudo-deterministic quantum query algorithms, randomized algorithms, and classical pseudo-deterministic algorithms.
Hardness of quantum pseudo-determinism
Our first result shows that not all problems admit efficient pseudo-deterministic quantum algorithms. We give a maximal separation between classical randomized query complexity and quantum pseudo-deterministic query complexity.
Theorem 1.
There exists a search problem whose classical randomized complexity is and whose pseudo-deterministic quantum query complexity is .
Theorem 1 improves the separation given by the Find1 problem, where the pseudo-deterministic quantum lower bound is . We obtain this stronger separation via the Avoid One Encrypted String (AOES) problem. Informally, the input encodes instances of XOR gadgets; together they encrypt a hidden string , where is the solution to the -th XOR instance. The goal is to output any -bit string not equal to . A classical randomized algorithm succeeds with constant probability by blind sampling, whereas any pseudo-deterministic algorithm must consistently avoid across runs, effectively forcing it to learn at least one bit of .
Power of quantum pseudo-determinism
Our second result shows that pseudo-deterministic quantum algorithms can be much stronger than their classical counterparts. We prove an exponential separation between pseudo-deterministic quantum algorithms and pseudo-deterministic classical algorithms on a task that remains easy for classical randomized algorithms. To ensure this separation is meaningful, we need to be certain that the quantum algorithm is not simply introducing solutions inaccessible to classical computation. We do this by defining the notion of “canonization”. Intuitively, this is where a quantum algorithm stabilizes a solution that occurs with considerable probability in a randomized algorithm into a canonical solution, thus canonizing it from a randomized solution to a pseudo-deterministic one.
Definition 2.
Let be a search problem with randomized algorithm and let be a function. canonizes if, for any , the probability outputs is greater than the probability it outputs an incorrect solution. Equivalently,
A pseudo-deterministic algorithm canonizes if the function calculated by canonizes .
We now state the theorem that demonstrates the quantum advantage on pseudo-deterministic algorithms.
Theorem 3.
There exists a search problem such that
-
1.
there exists a randomized classical algorithm for that uses queries;
-
2.
there exists a quantum pseudo-deterministic algorithm with query complexity that canonizes ;
-
3.
any classical pseudo-deterministic algorithm for requires queries.
We make two remarks about the conditions required for showing a conceptually meaningful quantum advantage in the setting of pseudo-deterministic algorithms. First, note that without requiring the problem to be easy for randomized algorithms (Item 1), such a separation would be trivial, in the sense that it need not refer to pseudo-determinism at all (e.g., by Simon’s problem, which has a unique solution). In contrast, Theorem 3 exhibits a different form of quantum advantage: beyond faster search, quantum algorithms can break symmetry (by eliminating output randomness) more efficiently than classical pseudo-deterministic algorithms. Furthermore, we also require that such a quantum pseudo-deterministic algorithm canonizes a classical one. This is because we do not want the quantum algorithm to cheat by outputting a new solution that is inaccessible to classical algorithms.
1.1.2 Fundamental properties of quantum pseudo-determinism
Next, we provide theorems that demonstrate two basic properties of pseudo-deterministic quantum algorithms: a limitation on maximal speed-ups for total problems, and a general pseudo-deterministic quantum query upper bound via the completeness of the Find1 problem.
Deterministic emulation of total problem
We show that for total problems, pseudo-deterministic quantum algorithms cannot exhibit exponential speed-up over classical algorithms. In particular, pseudo-deterministic quantum algorithms for total problems can be emulated by deterministic algorithms with a quintic blow-up.
Theorem 4.
Let be a total search problem, then the following holds.
.
In contrast, in the classical setting, it was shown in [15] that pseudo-deterministic classical algorithms for total problems can be emulated by deterministic algorithms with a quartic blow-up . Our proof of Theorem 4 follows the strategy of [15], but poses a new challenge; namely, our main technical contribution in the proof of Theorem 4 is a lemma (Lemma 19) that upper bounds the number of possible outputs of a pseudo-deterministic quantum algorithm; this step is trivial in the classical case.
General pseudo-deterministic quantum query upper bound
We also observe that the completeness result in [18], which states that the Find1 problem is complete for pseudo-deterministic classical query complexity, extends to the quantum setting. By combining it with the fact that [18],333An upper bound for Find1 is informally given in [18]. We make a more careful analysis and show that this logarithmic term can be avoided. See the full version of this paper for details. we derive a general upper bound on the pseudo-deterministic quantum query complexity of any problem via its randomized query complexity and verification complexity (i.e., the deterministic query complexity of verifying whether an input-solution pair is in a relation).
Theorem 5.
For any search problem with randomized query complexity and verification complexity , we have .
This implies that any lower bound for a pseudo-deterministic quantum query complexity problem greater than requires either a high randomized query complexity or it is difficult to verify. For instance, in our maximally pseudo-deterministically hard problem AOES (Definition 22), the randomized query complexity is , but it is very hard to verify.
1.1.3 Making quantum algorithms pseudo-deterministic
In [20], it was observed that by integrating Grover’s algorithm in a binary search, one can obtain a pseudo-deterministic quantum algorithm for Find1 that returns the first non-zero index in queries.
We extend this idea further and generalize it to obtain pseudo-deterministic quantum algorithms for a broad family of -subset finding problems [9]. Here the input consists of elements, and the goal is to find a subset of elements satisfying a predicate. To make the binary-search approach applicable, we introduce a mild condition, Prunable, which informally requires that restricting the search domain does not increase the query cost. We show that for Prunable problems, any subset-finding quantum algorithm can be turned pseudo-deterministic with only a near-linear dependence on .
Theorem 6.
Let be a -subset finding problem. If is Prunable, then .
We note that many natural -subset finding tasks are Prunable, e.g., -distinctness, triangle finding, and -sum. However, we observe that the condition can fail for -subset finding problems with global structure, such as Find1, when interpreted as a -subset finding problem.
1.1.4 Beyond the query complexity model
Finally, we study pseudo-deterministic quantum algorithms outside the setting of the standard query complexity model; namely, by considering search problems with quantum inputs, as well as the white-box setting.
Search problems with quantum inputs
We consider a different sort of search problems for which the input is a quantum state. Here, the query complexity is defined as the number of copies of the input state required to solve the problem. Pseudo-determinism could be useful in problems such as finding a computational basis element in the support of the input state, finding a state orthogonal to the input state, etc. We show, however, there can be no pseudo-deterministic algorithms if the input domain is a connected continuous space.
Nevertheless, we consider a quantum version of Find1 we call Uniform-Support-Finding: finding a computational basis element in the support of an input state , where is promised to be a uniform superposition over a subset of basis. We prove that the query complexity of Uniform-Support-Finding is , where is the dimension of (See the full version for details).
The white-box setting
Finally, we give the characterization of problems that admit efficient pseudo-deterministic quantum algorithms in the white-box (Turing machine) setting.
Theorem 7.
A search problem has a pseudo-deterministic quantum polynomial-time algorithm if and only if is P-reducible444A P-reduction refers to a deterministic polynomial time Turing reduction. to some decision problem in BQP.
We prove Theorem 7 in the full version of this paper, which is generalized from its classical analog in [15]. Intuitively, Theorem 7 says that any search problem that has an efficient pseudo-deterministic quantum algorithm if and only if it has a search-to-decision reduction to BQP. In other words, any (super-polynomial) pseudo-deterministic quantum advantage for a search problem essentially comes from the quantum advantages for a certain decision problem.
1.2 Techniques
In this section, we provide a taste of our techniques for establishing the query complexity separations in Theorem 1 and Theorem 3. In both cases, the key part is proving query complexity lower bounds for pseudo-deterministic quantum or classical algorithms, where new techniques are needed. This can be attributed to a lack of tools for proving pseudo-deterministic lower bounds, and that well-established techniques such as the polynomial method cannot be directly applied.
A maximal separation between randomized and pseudo-deterministic quantum algorithms
A quintessential advantage of randomized algorithms compared to pseudo-deterministic ones is their ability to output random strings. We consider the following problem, called Avoid One Encrypted String (AOES), which capitalizes on this advantage. The input of AOES consists of instances of the XOR problem in parallel, where is a big constant. Let be the total input length and be the input length of each XOR instance. These XOR instances encode a secret string , where is the value of the -th XOR instance. The goal is to output any -bit string that is not equal to .
AOES can be solved trivially by randomly sampling an -bit string with accuracy . However, it is not difficult to show that no deterministic algorithm can do better than using queries to solve the first XOR instance, and then output any string with the first bit unmatched. Intuitively, any pseudo-deterministic algorithm that can avoid outputting consistently must have learned some information about those XOR instances. On the other hand, XOR is maximally hard for quantum query algorithm, i.e., any quantum query algorithm for XOR of length cannot do any better than a random guess with less than queries [12, 5].
To turn the intuitions to a proof, we provide a new randomized reduction from XOR to AOES. Namely, we show that if there exists a zero-error quantum algorithm for with query complexity , then there exists a quantum algorithm for which calls once such that for every input ,
To prove that, let be a solver for the AOES problem, and let be the XOR instance we want to solve. We build a random AOES instance in two steps. First, we generate uniformly random string . Then, for each position , we take with probability , and with probability .
At a high-level, can be viewed as a one-time pad, and is embedded into a random subset of positions in the AOES instance . The crucial observation is that from the AOES solver ’s perspective, is uniformly random, and it has no information about , and where is embedded in . We can show that when we embed into a certain subset of positions in that depends on , we can then recover the solution of the XOR instance with certainty. When is a zero-error algorithm for AOES, the overall success rate of our randomized reduction is , and any value strictly greater than suffices given the hardness of XOR.
Finally, for any pseudo-deterministic algorithm for AOES, we can decrease its error rate to via repetitions and picking the most common outputs. We can then plug this extremely low error AOES algorithm into the randomized reduction and still get non-zero advantages on XOR. Note that while the random sampling algorithm has an error rate of , it cannot further reduce it via repetition.
Exponential pseudo-deterministic quantum advantage
We construct a problem called Quantum-Locked Estimation (QL-Estimation), which is easy for randomized algorithms as well as quantum pseudo-deterministic algorithms, but is hard for classical pseudo-deterministic algorithms.
Let . For simplicity, we sometimes interpret a value as an -bit string in the natural way, and vice versa. Recall that in Simon’s problem [22], the input is a function which is promised to encode a secret string such that . In the Hamming problem, an input string is given, and the goal is to output an estimate of the Hamming weight of up to additive error .
In the QL-Estimation problem, the input is simply a pair , where is an instance of the Simon’s problem and is an instance of the Hamming problem. It is promised that encodes some string that is promised to be a valid estimate of the Hamming weight of (). The goal is to output an estimate for the Hamming weight of with an additive error up to .
The classical randomized algorithm can estimate the Hamming weight with queries, and a quantum algorithm can calculate the secret string , which is a valid solution by the promise of the problem. Indeed, this quantum algorithm canonizes the particular estimate , which is one of the many different estimates of the Hamming weight that a classical randomized algorithm could reasonably produce.555To ensure the condition of the canonization (Definition 2) is satisfied, we need a slightly adjusted classical random sampling algorithm with queries. See Section 4.2 for more details. We view this as a “lock-and-key” construction, where the Hamming problem locks a canonical solution that is hidden from pseudo-deterministic classical algorithms, while the key is Simon’s problem, to which only quantum algorithms have access.
For the lower bound of pseudo-deterministic classical algorithms, it is helpful to first revisit the pseudo-deterministic hardness of Hamming via a sensitivity argument. Suppose for some string (where ), the pseudo-deterministic output of some algorithm is . Let be the string with the smallest Hamming weight whose pseudo-deterministic output is . This algorithm is sensitive at as flipping any -bit of will result in a string whose pseudo-deterministic output is not (as it will have a smaller Hamming weight), which implies a large query complexity of differentiating from any such string.
However, a high sensitivity also implies a large quantum query complexity, therefore, we have to modify our argument for the QL-Estimation problem, which is easy for a quantum algorithm. Suppose is a classical pseudo-deterministic algorithm for QL-Estimation. The crux of the proof is arguing that if has sub-linear sensitivity everywhere, then it must approximately solve the secret string from the Simon’s problem (Lemma 38). To this end, we apply a similar trick from Hamming’s proof: finding a string with the smallest Hamming weight among those strings that yield the same output by ; then flipping its -bits. The analysis here is more delicate because the Hamming and Simon components of the problem are not independent; the Simon witness is coupled with the Hamming input, and therefore standard product-distribution or decoupling arguments do not apply.
Finally, we show that solving Simon’s problem approximately is as hard as solving it exactly, and hence we conclude that must use queries.
1.3 Paper Organization
In Section 2 we set up the query model, define pseudo-deterministic classical/quantum algorithms, and review key preliminaries (including Find1 and information-theoretic tools). Section 3 proves foundational results, including the quintic relationship for total search problems and the completeness of Find1 for quantum pseudo-determinism. Section 4 gives our main separations: Section 4.1 introduces AOES to obtain a maximal gap between randomized and pseudo-deterministic quantum query complexity, and Section 4.2 defines QL-Estimation to separate pseudo-deterministic quantum from pseudo-deterministic classical algorithms while remaining randomized-easy. We refer the readers to the full version for the pseudo-deterministic quantum subset-finding algorithm and the discussion on search problems with quantum inputs.
2 Preliminaries
In the query complexity model, an algorithm solves a search problem if, given query access to the input , the algorithm outputs such that with probability at least . We denote the output of algorithm given query access to input as . Unless otherwise stated the set of inputs is a subset of the binary strings, . In this case, the algorithm has explicit access to the input length for which . The complexity measure here is the number of queries made to the black box oracle. Unless there are other parameters to the search problem we will define to be the subset of the search problem for inputs of length . When the length of the input is clear from context we will suppress the subscript and write only .
Definition 8 (Pseudo-deterministic algorithm).
An algorithm for a search problem is said to be pseudo-deterministic if there exists a function such that for all , the output of is with probability at least and the output of is always a solution to the search problem. Here, the output is said to be the canonical or pseudo-deterministic solution. Equivalently,
In the classical setting a query to the black box is specified by the algorithm as an index and then the algorithm receives the value . For a quantum algorithm with a classical input, the algorithm is a circuit composed of unitaries and a single query is a single use of the oracle unitary whose action is expressed as
Definition 9 (Query complexity measures).
For a search problem , we denote the following measures of complexity in the query setting.
-
is the deterministic query complexity of solving .
-
is the randomized classical query complexity of solving .
-
is the randomized bounded-error quantum query complexity of solving .
-
is the pseudo-deterministic bounded error classical query complexity of solving .
-
is the pseudo-deterministic bounded-error quantum query complexity of solving .
Here, bounded-error means that any algorithm must succeed with probability at least . We define similarly for a Boolean function .
2.1 Find1 problem
We define the Find1 problem and review the existing completeness and quantum lower bound results from [18].
Definition 10 (Find1).
On input such that , a solution to the Find1 problem is an index such that .
The next theorem establishes the completeness of the Find1 problem for pseudo-deterministic query algorithms.
Theorem 11 ([18] Theorem 3, Completeness of Find1).
Let be functions satisfying for any . Let be a search problem such that with input size , a solution is verifiable with queries, the bounded error randomized query complexity is at most , and the bounded error pseudo-deterministic query complexity of is at least . Then the pseudo-deterministic query complexity of Find1 is at least .
We shall also need the following lower bounds on the pseudo-deterministic quantum complexity of the Find1 problem.
Theorem 12 ([18] Theorem 4, quantum lower bound).
The pseudo-deterministic quantum query complexity of Find1 is at least .
2.2 Entropy
For a random variable , let denote the size of the support of . Throughout, all logarithms are base .
Definition 13 (Shannon Entropy).
For a random variable with probability distribution , the Shannon entropy of is defined as
Definition 14 (von Neumann Entropy).
Let be a mixed quantum state with a set of eigenvalues , the von Neumann entropy of is defined as
Remark 15.
Note that for both a distribution supported over elements and a quantum state of dimension , the maximum value of the corresponding notion of entropy is . This is achieved by the uniform distribution and the maximally mixed state respectively.
We denote the joint entropy of two random variables by . We denote the conditional entropy by .
Definition 16.
The mutual information between two random variables is .
Lemma 17 (Holevo’s Bound, Theorem 12.1 [21]).
For an ensemble of quantum states and a probability distribution and a POVM . If the output distribution of the POVM on the state , is The following holds,
Lemma 18 (Fano’s Inequality, Box 12.2 [21]).
The conditional entropy between two classical random variables is upper bounded in the following way,
Here, is the minimum error of any algorithm that estimates the value of from .
3 Fundamentals of pseudo-deterministic quantum query complexity
In this section, we establish two fundamental properties of pseudo-deterministic quantum algorithms: the relation between deterministic and quantum pseudo-deterministic algorithms for total search problems, and the completeness of the Find1 problem for quantum pseudo-determinism.
3.1 Maximum quintic speedup for total search problems
We show that for any total search problem, pseudo-deterministic quantum algorithms offer no super-polynomial speed-up over classical algorithms as stated in Theorem 4 that we restate below.
Theorem 4. [Restated, see original statement.]
Let be a total search problem, then the following holds.
.
This result is a generalization of the classical analogue in [15, Theorem 4.1], which proved that there is a quartic relationship between the classical pseudo-deterministic query complexity and deterministic query complexity of any total search problem. This was proved by first showing that the number of pseudo-deterministic outputs is upper bounded by , then calculating each of the bits of the canonical output separately using the pseudo-deterministic algorithm. Each of these bits – a total boolean function – can be calculated deterministically with a polynomial overhead given the relationship between the deterministic query complexity and the randomized query complexity for total boolean functions.
We use a similar strategy for proving Theorem 4. We first need an upper bound on the number of possible outputs of a pseudo-deterministic quantum algorithm, after this we can encode the canonical output in a bounded number of bits. This step turns out to be a more challenging task than the classical case. Using tools from classical and quantum information theory, we show the following lemma, which may be of independent interest.
Lemma 19.
Let be a pseudo-deterministic quantum query algorithm for a search problem with query complexity . Let denote the function that maps an element of to the canonical output of . Then, the number of possible outputs, , is .
Proof.
Let and suppose the input is , and for all , registers and represent the input and the output to the oracle for . Recall that the quantum oracle is expressed as a unitary with the following action,
The unitaries prepare the input to the oracle in register while leaving the previous registers unaffected,
The algorithm can be expressed in general as Algorithm 1.
Input: .
The final state before the POVM has dimension as it can be expressed as,
This expression exists in a linear subspace that has at most linearly independent basis states (defined by each and ). This does not change if we add ancillae or additional workspace.
We now invoke Holevo’s bound. Given that , let be a random variable which is uniformly distributed over the set whose outputs on applying are different on each element of the set . Let be the random variable denoting the output of for which the random variable is the input. If the inputs are enumerated and the final state on input is , then Holevo’s bound (Lemma 17 for ensemble and distribution uniform over ) states the following,
The second line follows as each is non-negative. The third follows by the maximum entropy of a state over dimension (Remark 15).
The left hand side can be bounded as follows,
The third line follows from Fano’s inequality (Lemma 18).
Therefore, , which implies .
Now we are ready to prove Theorem 4 with a similar search-to-decision argument as in the classical case ([15, Theorem 4.1]). Note that the complexity differs from that in the classical case, as classically turning a decision problem from randomized to deterministic costs a cubic overhead in complexity (), whereas in the quantum setting this is quartic ().
Proof of Theorem 4 .
Fix a pseudo-deterministic quantum algorithm with query complexity . For every , there exists a canonical output of . By Lemma 19, we can encode this output in bits. We can then define total boolean functions , where for all , i.e., outputs the -th bit of .
We use the following fact relating the deterministic query complexity with the quantum query complexity of a decision problem.
Theorem 20 (Theorem 2 [2]).
For any total boolean function , the deterministic and quantum query complexity are related as follows:
We also note that for all , from which we conclude that
3.2 General pseudo-deterministic quantum query upper bound
We present a general quantum pseudo-deterministic query upper bound for any problem via its randomized query complexity and verification complexity.
Theorem 5. [Restated, see original statement.]
For any search problem with randomized query complexity and verification complexity , we have .
Our proof is a straightforward generalization of [18, Theorem 3], which shows the completeness of Find1 (for classical pseudo-deterministic query complexity) by building a general reduction from any problem to Find1. We observe that the same reduction also works in the quantum setting, and then combine it with the upper bound of Find1 [20]. We present a full proof of 5 in the full version of this paper.
4 Query complexity separations
In this section, we prove two query complexity separation results for pseudo-deterministic quantum algorithms. In Section 4.1, we present a problem that is trivial for classical randomized algorithms but maximally hard for pseudo-deterministic quantum algorithms. In Section 4.2, we provide a problem that is easy for both classical randomized algorithms and pseudo-deterministic quantum algorithms, but difficult for classical pseudo-deterministic algorithms.
4.1 A maximally hard problem for pseudo-deterministic quantum algorithms
We define the Avoid One Encrypted String (AOES) problem and prove that its pseudo-deterministic quantum query complexity is , while being completely trivial for standard randomized algorithms. We prove the separation of Theorem 1 that we restate below.
Theorem 1. [Restated, see original statement.]
There exists a search problem whose classical randomized complexity is and whose pseudo-deterministic quantum query complexity is .
We use the problem as our building block, since is (asymptotically) maximally hard for quantum query algorithms. Here, for is the exclusive logical-or of the two bits, and for strings , is the bitwise exclusive logical-or of the two strings. We write as the exclusive or of every bit in the string .
Here, the input of is a string of length and the output is the of each bit of the string, we write this problem as XOR without the subscript when the length is clear from context. A quantum algorithm for XOR cannot gain any advantage over a random guess with fewer than queries, as captured by the following lemma.
Lemma 21 ([12, 5]).
Suppose is a quantum algorithm for the XOR problem which has advantage over a random guess. In other words, if there exists such that for any ,
and
Then must have query complexity at least .
We now define our Avoid-One-Encrypted-String (AOES) problem. Informally, the input of AOES uses separate XOR instances to encrypt a string , and the goal is to avoid outputting the encrypted string . The intuition is that since the XOR problem is maximally hard for quantum algorithms, the string cannot be decrypted, and hence the quantum algorithm cannot avoid it. Note that the parameter controls a trade-off between the quantum pseudo-deterministic query complexity and the classical randomized query complexity. We obtain the maximal separation by choosing to be a large constant.
Definition 22 (Avoid-One-Encrypted-String (AOES)).
Let . In the problem, we are given oracle access to different strings . For each define .
The goal is to output a string such that .
We write AOES without the subscript when the parameters of the problem are clear from context. We also assume that divides and otherwise we can use a standard padding argument. We begin by noting that, for small values of , AOES is easy for randomized algorithms and hard for deterministic algorithms
Claim 23.
The following holds for the complexity of .
-
;
-
.
Proof.
The first item follows by uniformly randomly sampling a string which will be a valid solution with probability . The upper bound for the second item follows by calculating using queries and outputting .
We prove the lower bound using a standard adversary argument. Suppose there exists a deterministic algorithm for AOES that takes deterministic queries. Whenever queries a bit, we set that bit equal to . After outputs a solution , there is at least one bit in each string that is not queried by . Therefore, one can set those remaining bits such that for all , which implies is wrong.
We show that any pseudo-deterministic quantum algorithm for AOES cannot do much better than the trivial deterministic algorithm.
Theorem 24 (psQ lower bound for AOES).
Let . Any pseudo-deterministic quantum algorithm for requires queries.
Note that by setting in Theorem 24 to be a sufficiently large constant, we obtain Theorem 1. We prove Theorem 24 in two steps. We first transform a zero-error quantum algorithm for AOES into a quantum algorithm for the XOR problem with some non-zero advantage. We then replace the zero-error algorithm with a pseudo-deterministic one.
The following lemma demonstrates that access to a single sample from an algorithm for AOES is enough to extract non-zero information about the XOR of a string.
Lemma 25.
If there exists a zero-error quantum algorithm for with query complexity , then there exists a quantum algorithm for which calls once such that for every input ,
Reduction
We use to construct an algorithm for . In this algorithm, we encode the XOR instance into a randomized instance of , which is information theoretically indistinguishable to a uniformly random instance from ’s perspective. If ’s output meets certain conditions, we can recover the parity of with certainty. The pseudocode of algorithm is described in Algorithm 2.
Analysis
We now show the correctness of algorithm . For simplicity, we define the following bits
After the first three steps of algorithm , we get as a valid solution to the AOES instance . Now, we define the following set
Note that cannot calculate directly, because does not know the value of when . Nevertheless, can always test whether is equal to , as shown in the following claim.
Claim 26.
The condition at Line 4 is satisfied if and only if .
Proof.
For one direction, if , then for any , it holds that
Now replace with if , or with otherwise, we get
Therefore, the condition at Line 5 is satisfied by taking .
For the other direction, if the condition at Line 4 holds, we can rewrite this condition by replacing with or for or respectively; it holds that
We claim that ; otherwise, we have for all , which contradicts to the fact that is a valid solution to the AOES instance. Therefore, we have by the definition of .
The proof of Claim 26 immediately implies the following corollary.
Claim 27.
Algorithm always outputs the correct answer at Line 5.
Proof.
In the proof of Claim 26, we show that if the condition at Line 4 holds, it must be the case that . Thus, is the correct answer.
Claim 28.
The condition at Line 4 is satisfied with probability .
Proof.
By Claim 26, it suffices to show that happens with probability . Note that is chosen independently with , and is uniformly random. Therefore, is also independent with . Since the set only depends on and the internal randomness of , and are also independent. Therefore, is equal to with probability .
Finally, we show that we can replace the zero-error algorithm for AOES in Lemma 25 with a pseudo-deterministic algorithm with a small overhead on the query complexity.
Lemma 29.
If there exists a pseudo-deterministic quantum algorithm for with query complexity , then there exists a quantum algorithm for with query complexity such that for every input ,
Proof.
Given such a pseudo-deterministic algorithm , we can construct a new algorithm that repeatedly runs for times and outputs the most common outcomes from these repetitions (breaking ties arbitrarily). By the Chernoff bound, the error probability of is smaller than .
Since the zero-error algorithm for AOES is only called once in Lemma 25, we can replace it by , and only increase the overall error probability by at most .
Combining Lemma 29 with Lemma 21, we conclude Theorem 24.
Remark 30.
The only place we use the pseudo-deterministic property for proving Theorem 24 is the repetition trick in Lemma 29. In contrast, the trivial random sampling algorithm for AOES has error probability ; however, we cannot reduce this error via repetition.
Indeed, our proof of Theorem 24 implies that achieving an error probability that is much lower than for AOES is extremely difficult, even for a standard quantum algorithm.
4.2 Exponential pseudo-deterministic quantum advantage
In this section, we define a problem, Quantum-Locked Estimation (QL-Estimation), which is hard for classical algorithms to solve pseudo-deterministically, but is easy for pseudo-deterministic quantum algorithms and randomized classical algorithms.
Theorem 3. [Restated, see original statement.]
There exists a search problem such that
-
1.
there exists a randomized classical algorithm for that uses queries;
-
2.
there exists a quantum pseudo-deterministic algorithm with query complexity that canonizes ;
-
3.
any classical pseudo-deterministic algorithm for requires queries.
The QL-Estimation problem can be seen as a lock-and-key construction. We first pick the Hamming problem – calculating an estimate of the Hamming weight of a string – as the “lock”, since it is easy for classical randomized algorithms but hard for any pseudo-deterministic classical algorithm. We then add in a “key”, the Simon’s problem [22], as a search problem with exponential quantum advantage, and the unique solution of the “key” problem is a valid solution of the “lock” problem. Combining these, the input to the lock-and-key promise problem is a pair . An input of this form satisfies the promise (and is therefore a valid input) if the solution of the key problem on input is a solution to the lock problem on input and any valid solution overall is a solution to the lock problem on input . This implies that a quantum algorithm can obtain the secret string that is the pseudo-deterministic solution to this problem that we know is classically pseudo-deterministically hard.
In this section, unless otherwise stated, . We start by introducing the following necessary definitions.
Definition 31 (Simon’s Problem).
The input to this problem is a function promised to be a 2-to-1 or 1-to-1 function with a secret string such that
Given oracle access to this function, the goal is to output the secret string . The special case implies that is a permutation of the strings of length .
With some abuse of notation, we interpret to be either a string or an -bit binary number interchangeably. For , we denote by the set of Simon’s functions on that encode the secret string , that is all functions such that for every distinct it holds that if and only if or . We shall use the following standard bounds of the query complexity of Simon’s problem.
Theorem 32 ([22]).
Any classical randomized algorithm for Simon’s problem requires queries, whereas there exists a quantum algorithm for Simon’s problem using queries.
Indeed, we require the following stronger statement regarding the hardness of Simon’s problem.
Lemma 33.
Given a function where the secret string is promised to be in one of two disjoint sets , then any classical randomized algorithm needs queries to determine whether is in or .
Proof.
With half the probability, let the secret string be uniformly drawn from ; and with half the probability, let be uniformly drawn from . Then, take to be uniformly drawn from .
By Yao’s minimax principle, it suffices to consider any deterministic algorithm making at most queries on the input distribution above. Without loss of generality, we assume will stop and output the answer immediately once it finds a collision of . By symmetry, we can simplify the decision tree of by merging nodes in a way that each non-leaf node has only two children: one represents that a collision is found, and the other represents that no collision is found.
We call a string at node alive if the queries to ’s ancestors have not ruled out the possibility that the secret string of being . All the strings in and are alive at the root, and a query at depth can kill at most strings. By symmetry, the probability that never finds a collision is . And conditioned on reaching a leaf without collision, most of the strings in both and are still alive at . Thus, no matter outputs or at , will be wrong with probability at least . This concludes that is not correct, and thus queries are necessary.
We now formally state the version of the Hamming weight approximate problem that we will denote by Hamming.
Definition 34 (The Hamming Problem).
Given a bit string , the goal is to output an approximation of the Hamming weight of within an additive error range of ; that is,
Since we allow a solution to Hamming to be within a range of the actual Hamming weight, it can be easily solved by a random sampling algorithm in queries. However, Hamming was proven to be maximally hard for classical pseudo-deterministic algorithm in [15]. We reproduce the proof here, as it includes some useful ideas for proving the lower bound of the QL-Estimation problem later.
Theorem 35 (Corollary 3.2 of [15]).
.
Proof.
Now let be a pseudo-deterministic algorithm for Hamming. Let be some fixed string whose Hamming weight is , and take . We then pick a string whose Hamming weight is the smallest among those for which outputs with probability at least (break ties arbitrarily). The Hamming weight of is at least .
Now consider the set of strings by flipping a “1” to “0” in , i.e.,
By definition, we have for any string ; we also know . Therefore, requires queries to distinguish from all the strings in .
We now state the QL-Estimation problem, where the Simon’s problem is the “key” and Hamming is the “lock”.
Definition 36 (The QL-Estimation Problem).
The input is a pair for and where . Here, is promised to satisfy the following.
-
for a string , i.e., is a valid Simon’s instance encoding the secret ;
-
, i.e., the value of is a valid solution to the Hamming instance .
The goal is to output an integer within distance of the Hamming weight of .
In this case, a query to an input of QL-Estimation is either a query to or to and the query complexity of an algorithm for QL-Estimation is the total number of queries to either part of the input. We show that QL-Estimation is easy for classical randomized and a quantum pseudo-deterministic algorithm exists that canonizes the classical one, but the problem is hard for classical pseudo-deterministic algorithm; this immediately implies Theorem 3.
Theorem 37.
Let be the length parameter in QL-Estimation, then the following holds for the complexity of QL-Estimation.
-
1.
;
-
2.
;
-
3.
.
Furthermore, there exists a classical randomized algorithm for QL-Estimation with query complexity and a pseudo-deterministic quantum algorithm with query complexity such that canonizes .
Upper bounds and canonization
The first upper bound follows as a classical randomized algorithm can solve the Hamming part directly via sampling and ignore the Simon’s problem with queries via random sampling. For the second upper bound, note that a pseudo-deterministic quantum algorithm can also solve QL-Estimation using queries by first solving for the secret string given in the Simon’s problem, and then outputting as the estimate of the Hamming weight.
For the last remark on canonization (Definition 2), we take the quantum algorithm to be one that solves and outputs the secret string as described above. However, we need to construct a modified randomized algorithm , described in below:
-
1.
Make queries to and let be its best estimation of the Hamming weight of .
-
2.
Output a uniformly random integer in the range .
By the Chernoff bound, the probability that is . In that case, always outputs a correct solution, and we have by the promise of the QL-Estimation problem. Thus, the canonical output of will be outputted by with probability . This concludes that canonizes
Pseudo-deterministic lower bound
To show the lower bound for any classical pseudo-deterministic algorithm, we claim that any sub-linear pseudo-deterministic classical algorithm for QL-Estimation must approximately solve the underlying Simon’s problem, implying a lower bound from the classical hardness of Simon’s.
Lemma 38.
Let be a pseudo-deterministic classical algorithm for QL-Estimation that uses queries. For any string such that and any string whose value is between and , it holds that for any Simon’s function , the canonical output of on input is some for which .
Proof.
Take as objects that satisfy the conditions in the statement of Lemma 38 and consider an arbitrary and let be the canonical output of on input . By the correctness of , we have .
We then pick a string whose Hamming weight is the smallest given that outputs (break ties arbitrarily). The Hamming weight of is at least . We claim that .
Suppose otherwise, i.e., , we define the set of strings reached by flipping any “1” to a “0” in . For any string , we have , so is a valid input to the QL-Estimation problem. Recall that is the canonical output of on input and let be the canonical output of on input . By definition of , we have that . We know , which means needs at least queries to distinguish with all the strings in . This contradicts the assumption that uses queries. Thus, we conclude that .
Similarly, we can take to be the string with largest Hamming weight such that outputs . By symmetry, we have . Since is a valid solution for both and , we have that and . This implies .
Now we are ready to prove the lower bound for classical pseudo-deterministic algorithms.
Proof of Theorem 37, Item 3.
Define the sets
We know .
Suppose the secret string is promised to be in one of and the goal is to distinguish between these two cases, Lemma 33 shows that the randomized query complexity of this task is still .
Now, let be any classical pseudo-deterministic algorithm for QL-Estimation with query complexity. If given a Simon’s function such that is in or , we can run for some with , and take to be its pseudo-deterministic solution. By Lemma 38, we must have or , which allow us to determine whether or . Therefore, the query complexity of is .
References
- [1] Scott Aaronson. BQP and the polynomial hierarchy. In Leonard J. Schulman, editor, Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5-8 June 2010, pages 141–150. ACM, 2010. doi:10.1145/1806689.1806711.
- [2] Scott Aaronson, Shalev Ben-David, Robin Kothari, Shravas Rao, and Avishay Tal. Degree vs. approximate degree and quantum implications of huang’s sensitivity theorem. In Samir Khuller and Virginia Vassilevska Williams, editors, STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21-25, 2021, pages 1330–1342. ACM, 2021. doi:10.1145/3406325.3451047.
- [3] Scott Aaronson and Shih-Han Hung. Certified randomness from quantum supremacy. In Barna Saha and Rocco A. Servedio, editors, Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, Orlando, FL, USA, June 20-23, 2023, pages 933–944. ACM, 2023. doi:10.1145/3564246.3585145.
- [4] Roozbeh Bassirian, Adam Bouland, Bill Fefferman, Sam Gunn, and Avishay Tal. On certified randomness from fourier sampling or random circuit sampling. arXiv preprint, 2021. arXiv:2111.14846.
- [5] Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. J. ACM, 48(4):778–797, 2001. doi:10.1145/502090.502097.
- [6] Vladimir Braverman, Robert Krauthgamer, Aditya Krishnan, and Shay Sapir. Lower bounds for pseudo-deterministic counting in a stream. In Kousha Etessami, Uriel Feige, and Gabriele Puppis, editors, 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, volume 261 of LIPIcs, pages 30:1–30:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ICALP.2023.30.
- [7] Arkadev Chattopadhyay, Yogesh Dahiya, and Meena Mahajan. Query complexity of search problems. Electron. Colloquium Comput. Complex., TR23-039, 2023. URL: https://eccc.weizmann.ac.il/report/2023/039.
- [8] Lijie Chen, Zhenjian Lu, Igor C. Oliveira, Hanlin Ren, and Rahul Santhanam. Polynomial-time pseudodeterministic construction of primes. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 1261–1270. IEEE, 2023. doi:10.1109/FOCS57990.2023.00074.
- [9] Andrew M. Childs and Jason M. Eisenberg. Quantum algorithms for subset finding. Quantum Inf. Comput., 5(7):593–604, 2005. doi:10.26421/QIC5.7-7.
- [10] Peter Dixon, Aduri Pavan, and N. V. Vinodchandran. Promise problems meet pseudodeterminism. CoRR, abs/2103.08589, 2021. arXiv:2103.08589.
- [11] Peter Dixon, Aduri Pavan, Jason Vander Woude, and N. V. Vinodchandran. Pseudodeterminism: promises and lowerbounds. In Stefano Leonardi and Anupam Gupta, editors, STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 1552–1565. ACM, 2022. doi:10.1145/3519935.3520043.
- [12] Edward Farhi, Jeffrey Goldstone, Sam Gutmann, and Michael Sipser. Limit on the speed of quantum computation in determining parity. Physical Review Letters, 81(24):5442, 1998.
- [13] Eran Gat and Shafi Goldwasser. Probabilistic search algorithms with unique answers and their cryptographic applications. Electron. Colloquium Comput. Complex., TR11-136, 2011. URL: https://eccc.weizmann.ac.il/report/2011/136.
- [14] Michel X. Goemans, Shafi Goldwasser, and Dhiraj Holden. Doubly-efficient pseudo-deterministic proofs. CoRR, abs/1910.00994, 2019. arXiv:1910.00994.
- [15] Oded Goldreich, Shafi Goldwasser, and Dana Ron. On the possibilities and limitations of pseudodeterministic algorithms. In Robert D. Kleinberg, editor, Innovations in Theoretical Computer Science, ITCS ’13, Berkeley, CA, USA, January 9-12, 2013, pages 127–138. ACM, 2013. doi:10.1145/2422436.2422453.
- [16] Shafi Goldwasser, Ofer Grossman, and Dhiraj Holden. Pseudo-deterministic proofs. In Anna R. Karlin, editor, 9th Innovations in Theoretical Computer Science Conference, ITCS 2018, January 11-14, 2018, Cambridge, MA, USA, volume 94 of LIPIcs, pages 17:1–17:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.ITCS.2018.17.
- [17] Shafi Goldwasser, Ofer Grossman, Sidhanth Mohanty, and David P. Woodruff. Pseudo-deterministic streaming. In Thomas Vidick, editor, 11th Innovations in Theoretical Computer Science Conference, ITCS 2020, January 12-14, 2020, Seattle, Washington, USA, volume 151 of LIPIcs, pages 79:1–79:25. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ITCS.2020.79.
- [18] Shafi Goldwasser, Russell Impagliazzo, Toniann Pitassi, and Rahul Santhanam. On the pseudo-deterministic query complexity of NP search problems. In Valentine Kabanets, editor, 36th Computational Complexity Conference, CCC 2021, July 20-23, 2021, Toronto, Ontario, Canada (Virtual Conference), volume 200 of LIPIcs, pages 36:1–36:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.CCC.2021.36.
- [19] Ofer Grossman, Meghal Gupta, and Mark Sellke. Tight space lower bound for pseudo-deterministic approximate counting. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 1496–1504. IEEE, 2023. doi:10.1109/FOCS57990.2023.00091.
- [20] Robin Kothari. An optimal quantum algorithm for the oracle identification problem. In Ernst W. Mayr and Natacha Portier, editors, 31st International Symposium on Theoretical Aspects of Computer Science, STACS 2014, Lyon, France, March 5-8, 2014, LIPIcs, pages 482–493. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2014. doi:10.4230/LIPIcs.STACS.2014.482.
- [21] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information (10th Anniversary edition). Cambridge University Press, 2016. URL: https://www.cambridge.org/de/academic/subjects/physics/quantum-physics-quantum-information-and-quantum-computation/quantum-computation-and-quantum-information-10th-anniversary-edition?format=HB.
- [22] Daniel R. Simon. On the power of quantum computation. SIAM J. Comput., 26(5):1474–1483, 1997. doi:10.1137/S0097539796298637.
- [23] Takashi Yamakawa and Mark Zhandry. Verifiable quantum advantage without structure. J. ACM, 71(3):20, 2024. doi:10.1145/3658665.
