Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2401.10579 · Logical Methods in Computer Science

Trade-offs between classical and quantum space using spooky pebbling

Arend-Jan Quist, Alfons Laarman

Published Dec 12, 2025• 1 citation
arXivHTMLPDF

Abstract

Pebble games are used to study space/time trade-offs. Recently, spooky pebble games were introduced to study classical space / quantum space / time trade-offs for simulation of classical circuits on quantum computers. In this paper, the spooky pebble game framework is applied for the first time to general circuits. Using this framework we prove an upper bound for quantum space in the spooky pebble game. We also prove that solving the spooky pebble game is PSPACE-complete. Moreover, we present a solver for the spooky pebble game based on satisfiability solvers combined with heuristic optimizers. This spooky pebble game solver was empirically evaluated by calculating optimal classical space / quantum space / time trade-offs. Within limited runtime, the solver could find a strategy reducing quantum space when classical space is taken into account, showing that the spooky pebble model is useful to reduce quantum space.

DOI
10.46298/lmcs-21(4:29)2025

Related papers

The Spooky Pebble Game.

Niels Kornerup, Jonathan Sadun, David Soloveichik

Pebble games are commonly used to study space-time trade-offs in computation. We present a pebble game that explores this trade-off in quantum simulation of arbitrary classical circuits on non-classical inputs. Many quantum algorithms, such as Shor's algorithm and Grover's search, include subroutines that require simulation of classical functions on inputs in superposition. The current state of the art uses generic reversible simulation through Bennett's pebble game and universal reversible gate sets such as the Toffoli. Using measurement-based uncomputation, we replace many of the ancilla qubits used by existing constructions with classical control bits, which are cheaper. Our pebble game forms a natural framework for reasoning about measurement-based uncomputation, and we prove tight bounds on the time complexity of all algorithms that use our pebble game. For any $\epsilon \in (0,1)$, we present an algorithm that can simulate irreversible classical computation that uses $\mathcal{T}$ time and $\mathcal{S}$ space in $O(\frac{1}{\epsilon}\frac{\mathcal{T}^{1+\epsilon}}{\mathcal{S}^\epsilon})$ time with $O(\frac{1}{\epsilon}\mathcal{S})$ qubits. With access to more qubits we present algorithms that run in $O(\frac{1}{\epsilon}\mathcal{T})$ time with $O(\mathcal{S}^{1-\epsilon}\mathcal{T}^\epsilon)$ qubits. Both of these results show an improvement over Bennett's construction, which requires $O(\frac{\mathcal{T}^{1+\epsilon}}{\mathcal{S}^\epsilon})$ time when using $O(\epsilon2^{1/\epsilon} \mathcal{S} (1+\log \frac{\mathcal{T}}{\mathcal{S}}))$ qubits. Additionally the results in our paper combine with Barrington's theorem to provide a general method to efficiently compute any log-depth circuit on quantum inputs using a constant number of ancilla qubits. We also explore a connection between the optimal structure of our pebbling algorithms and backtracking from dynamic programming.

•Oct 18, 2021•0 citations

Tight Bounds on the Spooky Pebble Game: Recycling Qubits with Measurements

Niels Kornerup, Jonathan Sadun, David Soloveichik

Pebble games are popular models for analyzing time-space trade-offs. In particular, reversible pebble game strategies are frequently applied in quantum algorithms like Grover's search to efficiently simulate classical computation on inputs in superposition, as unitary operations are fundamentally reversible. However, the reversible pebble game cannot harness the additional computational power granted by intermediate measurements, which are irreversible. The spooky pebble game, which models interleaved Hadamard basis measurements and adaptive phase corrections, reduces the number of qubits beyond what purely reversible approaches can achieve. While the spooky pebble game does not reduce the total space (bits plus qubits) complexity of the simulation, it reduces the amount of space that must be stored in qubits. We prove asymptotically tight trade-offs for the spooky pebble game on a line with any pebble bound. This in turn gives a tight time-qubit tradeoff for simulating arbitrary classical sequential computation when using the spooky pebble game. For example, for all ϵ∈(0,1] , any classical computation requiring time T and space S can be implemented on a quantum computer using only O(T/ϵ) gates and O(TϵS1−ϵ) qubits. This improves on the best known bound for the reversible pebble game with that number of qubits, which uses O(21/ϵT) gates. For smaller space bounds, we show that the spooky pebble game can simulate arbitrary computation with O(T1+ϵS−ϵ/ϵ) gates and O(S/ϵ) qubits whereas any simulation via the reversible pebble game requires Ω(S⋅(1+log⁡(T/S))) qubits.We also consider the spooky pebble game on more general directed acyclic graphs (DAGs), capturing fine-grained data dependency in computation. We show that for an arbitrary DAG even approximating the number of required pebbles in the spooky pebble game is PSPACE-hard. Despite this, we are able to construct a time-efficient strategy for pebbling binary trees that uses the minimum number of pebbles.

arXiv:2110.08973•Quantum•Feb 18, 2025•5 citations

Optimal (Parallel) Spooky Pebbling on Binary Trees

Mingyu Lee, Sanghyun Lee, Kabgyun Jeong

Pebble games model computations under a fixed space budget. Spooky pebbling allows quantum memory to be released by measurement, with the resulting phases corrected later. We study two-input computations with binary-tree dependencies and determine the optimal work and parallel depth for complete binary trees. Our key idea is to clean up the tree in blocks, reducing repeated recomputation of intermediate values. For the complete tree $B_h$ with $n=2^h-1$ vertices and every space budget $h+1\le s\le n$, we give an algorithm with asymptotically optimal work $Θ(nh/\log(s+1))$. At the minimum budget $s=h+1$, this improves the $O(n\log n)$ bound of Kornerup, Sadun, and Soloveichik to $Θ(n\log n/\log\log n)$, resolving their time-optimality question. We also construct a parallel schedule with optimal depth \[ Θ\!\left(h+\frac ns \max\!\left\{\frac{h}{\log(s+1)},\,1+\log^*h\right\}\right). \] Our lower bounds hold for every full binary tree. We also show that achieving optimal parallel depth can require asymptotically more work than minimizing work alone. Applying our schedule to the RNS point-addition trees in the public implementation of Chevignard, Fouque, and Schrottenloher reduces their Toffoli/AND gate count by $20.86\%$ for a P-224 instance and $22.66\%$ for a P-256 instance, using the same arithmetic circuits and peak workspace.

arXiv:2610.09434•Oct 7, 2026•0 citations

Optimizing Quantum Circuit Synthesis with Dominator Analysis

Giacomo Lancellotti, Giovanni Agosta, Alessandro Barenghi +1 more

Quantum circuit synthesis translates a classical Boolean function into an equivalent quantum circuit. The syn-thesis is solvable by playing the reversible pebble game on the logic network of the function. However, optimal solutions are im-practical for large networks, affecting the number of qubits and gates of the final quantum circuit. In this work, we improve the solution of the reversible pebble game by leveraging dominance relations on the directed acyclic graph of the classical function, reducing qubits needed for syntheses. The proposed algorithm exposes a tunable tradeoff between the available number of qubits and the circuit size expressed as T-count and T-depth. We experimentally validate our methodology on cryptographic and arithmetic benchmarks, reporting reductions between 37% and 83 % in qubit number with respect to Bennet syntheses algorithms and complete the majority of our syntheses in less than a second, improving on the current running times of state of the art approaches.

IEEE International Conference on Computer Design: VLSI in Computers and Processors (ICCD)•Nov 18, 2024•1 citation

Reversible Pebbling Game for Quantum Memory Management

Giulia Meuli, Mathias Soeken, Martin Roetteler +2 more

Quantum memory management is becoming a pressing problem, especially given the recent research effort to develop new and more complex quantum algorithms. The only existing automatic method for quantum states clean-up relies on the availability of many extra resources. In this work, we propose an automatic tool for quantum memory management. We show how this problem exactly matches the reversible pebbling game. Based on that, we develop a SAT-based algorithm that returns a valid clean-up strategy, taking the limitations of the quantum hardware into account. The developed tool empowers the designer with the flexibility required to explore the trade-off between memory resources and number of operations. We present two show-cases to prove the validity of our approach. First, we apply the algorithm to straight-line programs, widely used in cryptographic applications. Second, we perform a comparison with the existing approach, showing an average improvement of 52.77%.

arXiv:1904.02121•Design, Automation, and Test in Europe•Mar 1, 2019•36 citations

Quantum Time-Space Tradeoffs for Exponential Dynamic Programming

Susanna Caroppo, Jevgēnijs Vihrovs, Dārta Zajakina +1 more

We investigate the quantum algorithms for dynamic programming by Ambainis et al. (SODA'19). While giving provable complexity speedups and applicable to a variety of NP-hard problems, these algorithms have a notable drawback: they require a large amount of Quantum Random Access Memory (QRAM), which potentially could be very challenging to implement in a physical quantum computer. In this work, we study how we can improve the space complexity by trading it for time, while still retaining a speedup over the classical algorithms. We show novel quantum time-space tradeoffs by combining different classical approaches with quantum techniques. For instance, we show that the Travelling Salesman Problem can be solved quantumly in $\widetilde O(1.859^n)$ time and $\widetilde O(1.315^n)$ QRAM space.

quant-pharXiv:2604.02233•Leibniz international proceedings in informatics•Apr 3, 2026•0 citations
Pebble games are used to study space/time trade-offs. Recently, spooky pebble games were introduced to study classical space / quantum space / time trade-offs for simulation of classical circuits on quantum computers. In this paper, the spooky pebble game framework is applied for the first time to general circuits. Using this framework we prove an upper bound for quantum space in the spooky pebble game. We also prove that solving the spooky pebble game is PSPACE-complete. Moreover, we present a solver for the spooky pebble game based on satisfiability solvers combined with heuristic optimizers. This spooky pebble game solver was empirically evaluated by calculating optimal classical space / quantum space / time trade-offs. Within limited runtime, the solver could find a strategy reducing quantum space when classical space is taken into account, showing that the spooky pebble model is useful to reduce quantum space.
Pebble games are commonly used to study space-time trade-offs in computation. We present a pebble game that explores this trade-off in quantum simulation of arbitrary classical circuits on non-classical inputs. Many quantum algorithms, such as Shor's algorithm and Grover's search, include subroutines that require simulation of classical functions on inputs in superposition. The current state of the art uses generic reversible simulation through Bennett's pebble game and universal reversible gate sets such as the Toffoli. Using measurement-based uncomputation, we replace many of the ancilla qubits used by existing constructions with classical control bits, which are cheaper. Our pebble game forms a natural framework for reasoning about measurement-based uncomputation, and we prove tight bounds on the time complexity of all algorithms that use our pebble game. For any ϵ∈(0,1)\epsilon \in (0,1)ϵ∈(0,1), we present an algorithm that can simulate irreversible classical computation that uses T\mathcal{T}T time and S\mathcal{S}S space in O(1ϵT1+ϵSϵ)O(\frac{1}{\epsilon}\frac{\mathcal{T}^{1+\epsilon}}{\mathcal{S}^\epsilon})O(ϵ1​SϵT1+ϵ​) time with O(1ϵS)O(\frac{1}{\epsilon}\mathcal{S})O(ϵ1​S) qubits. With access to more qubits we present algorithms that run in O(1ϵT)O(\frac{1}{\epsilon}\mathcal{T})O(ϵ1​T) time with O(S1−ϵTϵ)O(\mathcal{S}^{1-\epsilon}\mathcal{T}^\epsilon)O(S1−ϵTϵ) qubits. Both of these results show an improvement over Bennett's construction, which requires O(T1+ϵSϵ)O(\frac{\mathcal{T}^{1+\epsilon}}{\mathcal{S}^\epsilon})O(SϵT1+ϵ​) time when using O(ϵ21/ϵS(1+log⁡TS))O(\epsilon2^{1/\epsilon} \mathcal{S} (1+\log \frac{\mathcal{T}}{\mathcal{S}}))O(ϵ21/ϵS(1+logST​)) qubits. Additionally the results in our paper combine with Barrington's theorem to provide a general method to efficiently compute any log-depth circuit on quantum inputs using a constant number of ancilla qubits. We also explore a connection between the optimal structure of our pebbling algorithms and backtracking from dynamic programming.
Pebble games are popular models for analyzing time-space trade-offs. In particular, reversible pebble game strategies are frequently applied in quantum algorithms like Grover's search to efficiently simulate classical computation on inputs in superposition, as unitary operations are fundamentally reversible. However, the reversible pebble game cannot harness the additional computational power granted by intermediate measurements, which are irreversible. The spooky pebble game, which models interleaved Hadamard basis measurements and adaptive phase corrections, reduces the number of qubits beyond what purely reversible approaches can achieve. While the spooky pebble game does not reduce the total space (bits plus qubits) complexity of the simulation, it reduces the amount of space that must be stored in qubits. We prove asymptotically tight trade-offs for the spooky pebble game on a line with any pebble bound. This in turn gives a tight time-qubit tradeoff for simulating arbitrary classical sequential computation when using the spooky pebble game. For example, for all ϵ∈(0,1] , any classical computation requiring time T and space S can be implemented on a quantum computer using only O(T/ϵ) gates and O(TϵS1−ϵ) qubits. This improves on the best known bound for the reversible pebble game with that number of qubits, which uses O(21/ϵT) gates. For smaller space bounds, we show that the spooky pebble game can simulate arbitrary computation with O(T1+ϵS−ϵ/ϵ) gates and O(S/ϵ) qubits whereas any simulation via the reversible pebble game requires Ω(S⋅(1+log⁡(T/S))) qubits.We also consider the spooky pebble game on more general directed acyclic graphs (DAGs), capturing fine-grained data dependency in computation. We show that for an arbitrary DAG even approximating the number of required pebbles in the spooky pebble game is PSPACE-hard. Despite this, we are able to construct a time-efficient strategy for pebbling binary trees that uses the minimum number of pebbles.
Pebble games model computations under a fixed space budget. Spooky pebbling allows quantum memory to be released by measurement, with the resulting phases corrected later. We study two-input computations with binary-tree dependencies and determine the optimal work and parallel depth for complete binary trees. Our key idea is to clean up the tree in blocks, reducing repeated recomputation of intermediate values. For the complete tree BhB_hBh​ with n=2h−1n=2^h-1n=2h−1 vertices and every space budget h+1≤s≤nh+1\le s\le nh+1≤s≤n, we give an algorithm with asymptotically optimal work Θ(nh/log⁡(s+1))Θ(nh/\log(s+1))Θ(nh/log(s+1)). At the minimum budget s=h+1s=h+1s=h+1, this improves the O(nlog⁡n)O(n\log n)O(nlogn) bound of Kornerup, Sadun, and Soloveichik to Θ(nlog⁡n/log⁡log⁡n)Θ(n\log n/\log\log n)Θ(nlogn/loglogn), resolving their time-optimality question. We also construct a parallel schedule with optimal depth Θ ⁣(h+nsmax⁡ ⁣{hlog⁡(s+1), 1+log⁡∗h}). Θ\!\left(h+\frac ns \max\!\left\{\frac{h}{\log(s+1)},\,1+\log^*h\right\}\right). Θ(h+sn​max{log(s+1)h​,1+log∗h}). Our lower bounds hold for every full binary tree. We also show that achieving optimal parallel depth can require asymptotically more work than minimizing work alone. Applying our schedule to the RNS point-addition trees in the public implementation of Chevignard, Fouque, and Schrottenloher reduces their Toffoli/AND gate count by 20.86%20.86\%20.86% for a P-224 instance and 22.66%22.66\%22.66% for a P-256 instance, using the same arithmetic circuits and peak workspace.
Quantum circuit synthesis translates a classical Boolean function into an equivalent quantum circuit. The syn-thesis is solvable by playing the reversible pebble game on the logic network of the function. However, optimal solutions are im-practical for large networks, affecting the number of qubits and gates of the final quantum circuit. In this work, we improve the solution of the reversible pebble game by leveraging dominance relations on the directed acyclic graph of the classical function, reducing qubits needed for syntheses. The proposed algorithm exposes a tunable tradeoff between the available number of qubits and the circuit size expressed as T-count and T-depth. We experimentally validate our methodology on cryptographic and arithmetic benchmarks, reporting reductions between 37% and 83 % in qubit number with respect to Bennet syntheses algorithms and complete the majority of our syntheses in less than a second, improving on the current running times of state of the art approaches.
Quantum memory management is becoming a pressing problem, especially given the recent research effort to develop new and more complex quantum algorithms. The only existing automatic method for quantum states clean-up relies on the availability of many extra resources. In this work, we propose an automatic tool for quantum memory management. We show how this problem exactly matches the reversible pebbling game. Based on that, we develop a SAT-based algorithm that returns a valid clean-up strategy, taking the limitations of the quantum hardware into account. The developed tool empowers the designer with the flexibility required to explore the trade-off between memory resources and number of operations. We present two show-cases to prove the validity of our approach. First, we apply the algorithm to straight-line programs, widely used in cryptographic applications. Second, we perform a comparison with the existing approach, showing an average improvement of 52.77%.
We investigate the quantum algorithms for dynamic programming by Ambainis et al. (SODA'19). While giving provable complexity speedups and applicable to a variety of NP-hard problems, these algorithms have a notable drawback: they require a large amount of Quantum Random Access Memory (QRAM), which potentially could be very challenging to implement in a physical quantum computer. In this work, we study how we can improve the space complexity by trading it for time, while still retaining a speedup over the classical algorithms. We show novel quantum time-space tradeoffs by combining different classical approaches with quantum techniques. For instance, we show that the Travelling Salesman Problem can be solved quantumly in O~(1.859n)\widetilde O(1.859^n)O(1.859n) time and O~(1.315n)\widetilde O(1.315^n)O(1.315n) QRAM space.