Accelerating Quantum Algorithms with Precomputation

William J. Huggins, Jarrod R. McClean

Abstract

In the pursuit of quantum advantage, computational complexity is typically measured by total gate count or qubit requirements. However, in time-sensitive applications, the primary bottleneck is often "online latency"—the wall-clock time elapsed from the moment a problem is fully specified to the delivery of the solution. This paper introduces a precomputation cost model that distinguishes between early, known inputs and late, time-critical inputs. By performing polynomial-time precomputation to prepare specific quantum resource states, we demonstrate that the online complexity of key quantum algorithms can be reduced significantly, achieving quadratic and even exponential speedups in the online phase.

Introduction

Standard quantum complexity analysis assumes that the entire problem description is provided simultaneously. In many practical scenarios, however, a significant portion of the problem structure is known well in advance. For instance, in financial modeling or molecular simulation, the general structure of a Hamiltonian (the "early input") may be fixed, while specific parameters or the initial state (the "late input") are only determined immediately before execution.

Researchers at Google Quantum AI propose a shift in perspective: treating work done before the problem is fully specified as "free," provided it remains within polynomial time. This "quantum precomputation" model allows for the preparation of specialized resource states—quantum "batteries"—that can be consumed during the online phase to bypass traditionally expensive operations.

The Precomputation Cost Model

The proposed model formalizes the algorithmic process into two distinct stages:

  1. Precomputation Phase: Given an early input $x$, the computer performs polynomial-time classical and quantum operations to produce a resource state $|\Gamma\rangle$ and associated classical data $\bar{x}$.
  2. Online Phase: Given the resource state $|\Gamma\rangle$, the classical data $\bar{x}$, and the late-arriving inputs ($y, \rho$), the computer executes the final algorithm.

In this framework, only the gate complexity of the online phase is counted toward the algorithm's cost. This model occupies a theoretical middle ground between standard BQP (bounded-error quantum polynomial time) and BQP/qpoly (quantum advice), with the critical constraint that the "advice" (the resource state) must be efficiently preparable by the quantum computer itself.

Quantum Caching and Resource Consumption

Unlike classical precomputation, where results can be cached and read indefinitely, quantum precomputation is governed by the No-Cloning Theorem. Quantum "caching" is inherently destructive; resource states are consumed as they are used to facilitate operations. This necessitates the preparation of multiple copies of resource states if an operation is to be repeated, making the management of the "quantum battery" a central component of the algorithm's design.

Algorithmic Primitives and Results

The paper analyzes three primary primitives to demonstrate the power of precomputation:

1. Clifford Unitaries

Executing an $n$-qubit Clifford unitary typically requires $\Theta(n^2)$ gates. By precomputing and storing specific entangled states, the online phase can implement these unitaries using gate teleportation in $O(n)$ gates, effectively achieving constant depth and a quadratic speedup in online latency.

2. The Clifford Hierarchy

For diagonal unitaries within the Clifford hierarchy (specifically $\mathcal{Z}^{(k)}$), the authors utilize "selective gate teleportation." By recursively descending the hierarchy, they achieve a quadratic improvement in complexity, moving from $\Theta(n^k)$ to $\tilde{O}(kn^{k/2})$.

3. Quantum Linear Systems

In algorithms similar to HHL (Harrow-Hassidim-Lloyd), the preparation of the target vector $|b\rangle$ is often the dominant bottleneck. If $|b\rangle$ can be precomputed, the online phase of the linear system solver can run in time independent of the preparation cost, potentially offering an exponential speedup relative to the time-sensitive input.

Operation Type Standard Complexity Precomputation (Online) Complexity Speedup
Clifford Unitaries $\Theta(n^2)$ $O(n)$ Quadratic
Diagonal Hierarchy ($\mathcal{Z}^{(k)}$) $\Theta(n^k)$ $\tilde{O}(kn^{k/2})$ Quadratic
Linear Systems $Poly(n, \kappa)$ Independent of $|b\rangle$ prep Potential Exponential

Discussion and Limitations

While the precomputation model offers a path toward lower latency, it introduces new practical challenges. The most significant is the requirement for high-fidelity quantum memory. Storing resource states until the online phase requires active error correction, which carries its own spacetime volume costs not fully accounted for in the gate-complexity-only model.

Furthermore, the current speedups for the Clifford hierarchy are restricted to specific diagonal unitaries. Expanding these techniques to a broader class of gates and mapping them to specific industry use cases—such as high-frequency trading or real-time quantum sensing—remains a vital area for future work. Finally, the possibility of "gentle measurements" to allow for partial reuse of resource states could further optimize the efficiency of the precomputation phase.

Conclusion

By decoupling the preparation of complex quantum states from the execution of time-critical logic, the precomputation cost model provides a realistic framework for accelerating quantum applications. This approach suggests that the path to quantum advantage may lie not just in building larger computers, but in strategically "caching" quantum work to meet the latency demands of the real world.

Summary updated

BibTeX
@article{huggins2024accelerating,
  author = {William J. Huggins and Jarrod R. McClean},
  title = {{Accelerating Quantum Algorithms with Precomputation}},
  journal = {Quantum},
  year = {2024},
  doi = {10.22331/q-2024-02-22-1264},
}
Figure