arXiv:2611.02370quant-phNov 2026

Manuscript Offprint

arXiv:2611.02370

State Synthesis with an NP oracle

Aniruddha Sen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In this note, I describe a quantum algorithm that prepares an arbitrary state ∣ψ⟩|\psi\rangle to inverse exponential precision in polynomial time by making queries to an NP oracle, assuming one can directly query entries of the state vector corresponding to ∣ψ⟩|\psi\rangle. The previous best upper bound on the complexity class required by an oracle for this task was PP. I provide evidence that NP is the best possible upper bound by showing that any quantum algorithm using a P oracle, or even a P/poly oracle, requires exponentially many queries. I also discuss some implications of this result for the QMA search-to-decision problem and unitary synthesis.

1 Introduction

The state synthesis problem was first studied by Aaronson [Aar16], and asks how many queries a quantum algorithm A\mathcal{A} needs to make to some classical boolean function ff such that Af\mathcal{A}^f approximately prepares an arbitrary state ∣ψ⟩|\psi\rangle. The circuit corresponding to A\mathcal{A} should be the same for every state, but the function ff is allowed to arbitrarily depend on ∣ψ⟩|\psi\rangle. This problem is motivated by asking if the complexity of preparing any state can be reduced to the complexity of implementing some classical boolean function. A natural question to ask is then how weak can we make ff, in terms of its complexity, such that we could efficiently prepare an arbitrary ∣ψ⟩|\psi\rangle? This is the central question considered in this note. Let us assume a meta-oracle O∣ψ⟩O_{|\psi\rangle} (or just OO) can directly query entries of ∣ψ⟩|\psi\rangle to any desired bits of precision, since in general the amplitudes may even be uncomputable. The main result is as follows.

Theorem 1.1. There exists a quantum algorithm A\mathcal{A} running in poly(n,log⁡(1/ε))(n,\log(1/\varepsilon)) time such that, for every nn-qubit state ∣ψ⟩|\psi\rangle, there exists an oracle f∈NPf \in \mathsf{NP}, such that AfO\mathcal{A}^{f^O} prepares a state ∣ψ^⟩|\widehat{\psi}\rangle having fidelity at least 1−ε1-\varepsilon with ∣ψ⟩|\psi\rangle. The algorithm A\mathcal{A} makes poly(n)(n) queries to fOf^O, where OO is an oracle for the entries of ∣ψ⟩|\psi\rangle.

Setting ε=2−n\varepsilon = 2^{-n} implies A\mathcal{A} can prepare ∣ψ⟩|\psi\rangle to inverse-exponential error in poly(n)(n) time. Furthermore, a second result shows that if ff is allowed to be in PNP\mathsf{P}^{\mathsf{NP}} rather than just NP\mathsf{NP}, the algorithm requires at most O(n/log⁡n)O(n/\log n) queries. This is proved in Section 2. Now, what was previously known about the power of ff needed? The best known upper bound was that f∈PPf \in \mathsf{PP} suffices, initially by an algorithm using O(n)O(n) queries [Aar16]. Prior work on state synthesis has mainly focused on reducing the number of queries needed for this task. In particular, [INN+21^{+21}] showed that a PP oracle with 1 query suffices for state synthesis to obtain inverse-polynomial precision, which was improved by Rosenthal, showing 1 query suffices to obtain inverse-exponential precision [Ros24].

*aniruddhasen@utexas.edu

However, the construction in [Ros24] uses an even stronger PSPACE oracle. In this work, I will sacrifice the progress made towards reducing the number of queries and just focus on reducing the power of the oracle instead. The algorithm presented here builds on the original state synthesis algorithm by Aaronson [Aar16], from which one can notice it almost directly follows that f∈NPf \in \mathsf{NP} suffices to get inverse-polynomial error, and which forms the starting point of the algorithm here. The surprising part is that we can get inverse-exponential error as well. The key ideas combine simple insights from complexity theory and quantum algorithms, in particular including approximate counting with an NP oracle [Sto85], quantum rejection sampling [ORR13], and exact amplitude amplification [BHMT00]. The algorithm is described in Section 2. I provide evidence that it is optimal in the sense of NPO\mathsf{NP}^O being the weakest oracle possible for efficient state synthesis, by showing in the Appendix that a PO\mathsf{P}^O oracle does not suffice, even when given polynomially bits of advice. The proof goes through a straightforward reduction from the lower bound for unordered search. To motivate this result further, let us consider the following direct consequence of Theorem 1.1.

Corollary 1.2. Consider a language LL such that NPL⊆BQPL\mathsf{NP}^L \subseteq \mathsf{BQP}^L. Then, any quantum state ∣ψ⟩|\psi\rangle whose amplitudes can be computed in polynomial time with an oracle for LL can also be prepared to inverse-exponential error in quantum polynomial time with an oracle for LL.

This follows just by observing that for such a language, f∈NPPL=NPL⊆BQPLf \in \mathsf{NP}^{P^L} = \mathsf{NP}^L \subseteq \mathsf{BQP}^L suffices to apply to prepare ∣ψ⟩|\psi\rangle by applying Theorem 1.1. This shows that the search problem of preparing a state reduces to the problem of computing the amplitudes, given an NPL\mathsf{NP}^L oracle can be implemented efficiently. Notice that inverse-exponential error is in some sense the closest we can get to exact preparation, since beyond this we run into issues that involve specifying a gate set. Most interesting applications require this error guarantee in state preparation; it has been important in the context of state synthesis [INN+21, Ros24], as well as in defining unitary complexity classes [KT26]. Now, it is well known that state synthesis is the quantum version of classically sampling from a probability distribution. Consequently, Theorem 1.1 can also be viewed as a quantum state witness analogue of classical results by Bellare, Goldreich, Petrank [BGP00] and Jerrum, Valiant, Vazirani [JVV86], who show how to exactly sample NP-witnesses given access to an NP oracle. Indeed, the techniques here bear similarities to the approach by [JVV86]. Further discussion and open problems are deferred to Section 3.