← Back to digest

Partial oracles quantum algorithm framework — Part I: Analysis of in-place operations

Fintan Bolton (Bradan Quantum) · arXiv:2604.21788 · submitted 2026-04-24 · score 8/10

Abstract

The partial oracles framework is a quantum search algorithm that has the potential to exceed the quadratic speedup of Grover's algorithm, up to a theoretical maximum of an exponential speedup. Until now, however, the framework has lacked an explicit method for constructing the operator that represents the search iteration. In this paper, we provide the missing construction, for the special case of an oracle function definable using only in-place operations (that is, where the calculated result of the oracle function can be read just from the qubits in the search index). The restriction to in-place operations means that the current work does not yet exhibit quantum advantage: oracle functions constructed using only in-place operations are always classically reversible. To demonstrate quantum advantage, it will be necessary to extend this construction method to include out-of-place operations (part II). As part of the construction of the search iteration operator, we define a new type of transform, the reciprocal transform, which is applied to the oracle function. We show that the reciprocal transform obeys a chain rule, which makes it possible to break down complex transforms into simple steps. To illustrate the practical application of this search method, we apply the reciprocal transform to elementary operations from the SHA-256 hash algorithm: addition modulo 2n, the Maj(a,b,c) function, the Ch(a,b,c) function, and the bit shift functions. We also introduce the QFrame python library, which is used to automate the construction of quantum circuits that represent reciprocal transforms.

Executive summary

This paper develops a Grover-style search framework — the partial oracles algorithm — in which the oracle outputs an n-bit vector f(x)∈{0,1}n and the solution is defined by f0(x)=⋯=fn−1(x)=0. The usual second Grover reflection is replaced by a new unitary built from a reciprocal transform R[f(x)] of the oracle. The paper gives the first explicit circuit construction of this operator for the restricted (but important) class of in-place oracles, proves a chain rule that composes complex oracles from primitives, and demonstrates the construction on SHA-256 primitives (modular addition, Maj, Ch, bit-rotations). The framework targets an eventual exponential speedup — Bolton previously (arXiv:2024 paper) showed exponential is the upper bound — but in-place alone is classically reversible, so this paper is Part I of a two-part programme; Part II will tackle out-of-place operations (e.g., integer multiplication) where quantum advantage is expected to emerge. For Yuan this is relevant because it sits in the same regime as Y4: Grover-family algorithms over structured feasible spaces, aiming at super-quadratic speedups.

Main contribution

The key object is the reciprocal transform: for a bijective oracle fσ(xμ), define the unitary R[fσ(xμ)] = (1/√(NσNμ)) Σκ,x,k ei2π(−κ·f(x)+x·k) |κ⟩⟨k|. A single parallelized partial-oracle iteration H⊗n R[f(x)] eiπ/2 Σ κ R[f(x)] H⊗n eiπ/2 Σ f(x) takes the uniform superposition to the unique solution in one iteration (rather than Grover's √N iterations). The paper proves this explicitly by induction over partial-oracle conditions, proves a chain rule R[f∘g] = R[f]·R[g] that lets the reciprocal operator be composed piecewise, and instantiates circuits for the four primitives of SHA-256. The supporting Python library QFrame automates circuit synthesis from a classical Python specification of f.

Key theorems / lemmas / algorithms

Detailed walkthrough

Motivation (§II). Hoefler–Häner–Troyer (2023) and Stoudenmire–Waintal argued that Grover's quadratic speedup is unlikely to give real-world quantum advantage on practical problem sizes: when amortized over the cost of a single oracle query, the break-even threshold sits below <0.2 of a 16-bit floating-point op per query within a two-week budget even on an idealized 10k-logical-qubit machine. The partial-oracles framework is a direct response: build a search algorithm whose upper-bound speedup is exponential rather than quadratic, by enriching the oracle from f:{0,1}n→{0,1} to f:{0,1}n→{0,1}n.

Algorithmic geometry (§III.A–C). The author factors the standard Grover iteration as −H⊗n(I−2|0⟩⟨0|)H⊗n·(I−2|xs⟩⟨xs|) and identifies that the "reflection in reciprocal space" middle factor is the piece that must be replaced. The replacement must act independently on each κ qubit in reciprocal space; the reciprocal transform R[f] constructed in eq. 12 is exactly the operator that diagonalizes the multi-bit oracle in κ-space. A related "bare" form B[f] (eq. 13) goes directly from direct to reciprocal space; R=BH⊗n.

Inductive proof (§III.D). Define T = {x : f0(x)=…=fℓ−1(x)=0}. Starting from |T⟩ = |T|−1/2 Σx∈T |x⟩, apply eiπ/2 f(x), then R[f]·H⊗n. Using bijectivity, x=f−1(yn−1…y0) and the amplitude factors cleanly per κj. For j<ℓ: κj stays uniform; for j=ℓ: κ becomes (|0⟩−i|1⟩)/√2; for j>ℓ: κj=0 with certainty. Applying eiπ/2 κ flips the minus into a plus (returning κ to uniform), then the adjoint H⊗nR[f] completes the induction step, yielding |Tℓ+1⟩. Parallelization (§III.E) applies the same logic to all ℓ simultaneously — since κ qubits are independent, one iteration solves the full problem.

Chain rule (Theorem 1, §III.G). The proof collapses two nested reciprocal transforms by first identifying the shared intermediate shape-index (k'μ↔κμ) via the Walsh delta function, then summing out κμ using δ(yμ−gμ(xν)). Net effect: R[f∘g]=R[f]·R[g], i.e., reciprocal-transform factorization mirrors function composition. This is the practical workhorse for SHA-style constructions: reciprocal transforms for primitive functions can be looked up, then composed to build the circuit for the full round function.

SHA primitives (§IV). For Maj(a,b,c)=a⊕((a⊕b)(a⊕c)), a 3-qubit circuit is given for the reciprocal gate using the identity 2·Maj(ka,kb,kc)−1=⟨Wk,WMaj⟩. The Ch(a,b,c)=(a∧b)⊕(¬a∧c) function yields an analogous gate. Modular addition mod 2n is handled by carry-chain decomposition whose reciprocal transform is built layer-wise via the chain rule. Bit-rotations have a particularly clean reciprocal structure: they commute with Hadamard transforms up to reindexing.

QFrame library and simulation (§V). The QFrame Python library (layered on Eclipse Qrisp) exposes a QFrameUInt abstract register with in-place +=, maj, ch, Rotr operators. Given a classical Python specification of g(x), QFrame auto-generates (i) the classical forward computation, (ii) the oracle circuit apply_oracle_gate, (iii) the reciprocal-oracle circuit apply_recip_oracle_gate. The toy SHA demonstrator uses 4-qubit registers a,b,c,d,W0 through four rounds; the reported run inverts the function from a uniform superposition over 220 inputs to the preimage of a target 20-bit output in 1 iteration, 100% probability. The author notes this is not yet "hash inversion" because the problem constrains only the output, not both input and output — that would require out-of-place operations, deferred to Part II.

Scope of the restriction (§I, VI). In-place operations are those where the oracle can test only the index qubits (no out-of-place ancilla dependencies). Such oracles are classically reversible, which means they cannot actually deliver quantum advantage — an out-of-place function like integer multiplication is needed for Shor-class problems. Thus Part I is a foundation: it proves the framework works where the classical problem is easy; Part II must extend it to where the problem is hard.

Figures

Figure 1
Figure 1. Overview of partial-oracle iterations. At each iteration stage j, a search returns the index values x satisfying partial-oracle condition fj(x)=0; the effect is cumulative, so the final state satisfies all conditions {fj(x)=0}. Each of the n searches is implemented by a (modified) Grover-Long iteration; when fj(x)=0 is satisfied by 50% of index states, a single iteration suffices.
Figure 2
Figure 2. First partial-oracle iteration: (a) initial equal superposition; (b) relative phase eiπ/2 between matching and non-matching states; (c) horizontal/vertical decomposition; (d) reciprocal space after Walsh-Hadamard; (e) after applying the phase to the W0(x) Walsh state; (f) transform back to direct space.
Figure 3
Figure 3. Second (and subsequent) partial-oracle iteration: (a) remaining states after iteration 1; (b) relative phase of eiπ/2; (c) horizontal/vertical components; (d) reciprocal space after Walsh-Hadamard; (e) rearranged by the reciprocal transform; (f) phase on W0(x); (g) rearranged by the adjoint reciprocal transform; (h) transform back to direct space.

Citations to Yuan's papers

No direct citation to any of Y1–Y6 found in bibliography.

Overlap with Y1–Y6

Recommended action for Yuan

  1. Read deeper; potentially cite in Y4 follow-ups. The reciprocal-transform idea is a generalization of the Grover reflection that Y4 already uses. Even if the current Part I doesn't demonstrate advantage, the reciprocal-transform + chain-rule machinery is a clean formalism for reasoning about multi-output oracles, which could inform discussions of oracle structure in cardinality-constrained settings.
  2. Track Part II. The out-of-place extension is where actual quantum advantage would appear. If Part II materializes with a working construction, it becomes a required citation for any Grover-based optimization paper targeting super-quadratic improvement.
  3. Low-priority for Y2/Y3. No immediate relevance to QAOA/portfolio work — skim only.