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:2405.20225

Novel oracle constructions for quantum random access memory

Ákos Nagy, Cindy Zhang

Published May 30, 2024• 6 citations
arXivHTMLPDF

Abstract

We present new designs for quantum random access memory. More precisely, for each function, $f : \mathbb{F}_2^n \rightarrow \mathbb{F}_2^d$, we construct oracles, $\mathcal{O}_f$, with the property \begin{equation} \mathcal{O}_f \left| x \right\rangle_n \left| 0 \right\rangle_d = \left| x \right\rangle_n \left| f(x) \right\rangle_d. \end{equation} Our methods are based on the Walsh-Hadamard Transform of $f$, viewed as an integer valued function. In general, the complexity of our method scales with the sparsity of the Walsh-Hadamard Transform and not the sparsity of $f$, yielding more favorable constructions in cases such as binary optimization problems and function with low-degree Walsh-Hadamard Transforms. Furthermore, our design comes with a tuneable amount of ancillas that can trade depth for size. In the ancilla-free design, these oracles can be $ε$-approximated so that the Clifford + $T$ depth is $O \left( \left( n + \log_2 \left( \tfrac{d}ε \right) \right) \mathcal{W}_f \right)$, where $\mathcal{W}_f$ is the number of nonzero components in the Walsh-Hadamard Transform. The depth of the shallowest version is $O \left( n + \log_2 \left( \tfrac{d}ε \right) \right)$, using $n + d \mathcal{W}_f$ qubit. The connectivity of these circuits is also only logarithmic in $\mathcal{W}_f$. As an application, we show that for boolean functions with low approximate degrees (as in the case of read-once formulas) the complexities of the corresponding QRAM oracles scale only as $2^{\widetilde{O} \left( \sqrt{n} \log_2 \left( n \right) \right)}$.

DOI
10.48550/arxiv.2405.20225

Related papers

Nearly optimal quantum circuits for Boolean oracles

Junhong Nie, Wei Zi

Quantum oracle of Boolean functions is one of the central bridges between classical and quantum algorithms, but the study focusing at quantum circuit optimization of such oracle is yet closed. In this paper, we propose nearly optimal tradeoffs among circuit size, circuit depth and ancilla count, for quantum oracles of three kinds of Boolean functions: general total Boolean functions with output size $b$: with $1\le m\leΘ\left(\frac{2^n}{n}\right)$ ancilla, size $\mathcal{O}\left(\frac{b2^n}{\log(n+m)}\right)$, depth $\mathcal{O}\left(\frac{b2^n}{n+m}\right)$; partial Boolean functions of effective support size $d$ and output size $b$: with $Θ\left(\log d\right)\le m\le Θ\left(d\right)$ ancilla, size $\mathcal{O}\left(n\log d+bd\right)$, depth $\mathcal{O}\left(\frac{n\log n\log d}{n+m}+\log n+\frac{d(\log d+b\log m)}{m}\right)$; sparse Boolean functions of true input size $d$: with $Θ\left(\log n+\log d\right)\le m\leΘ\left(\frac{nd}{\log d}\right)$ ancilla, size $\mathcal{O}\left(n^2\log d+\frac{nd}{\log(\log d+m/n)}\right)$, depth $\mathcal{O}\left(\frac{n^2\log n\log d}{n+m}+\log n+\frac{nd}{m}\right)$. All the size and depth bounds are asymptotically optimal up to logarithmic factors in the corresponding ancilla count regions. We hope these results find applications in scenarios where classical procedures are needed to be embedded into quantum circuits, such as QROM implementation and quantum algorithm design.

quant-pharXiv:2607.28402•Jul 31, 2026•1 citation

Efficient quantum state preparation with Walsh series

Julien Zylberman, Fabrice Debbasch

An approximate quantum state preparation method is introduced, called the Walsh series loader (WSL). The WSL approximates quantum states defined by real-value functions of single real variables with a depth independent of the number $n$ of qubits. Two approaches are presented. The first one approximates the target quantum state by a Walsh series truncated at $O(1/\sqrt{\ensuremath{\epsilon}})$, where $\ensuremath{\epsilon}$ is the precision of the approximation in terms of infidelity. The circuit depth is also $O(1/\sqrt{\ensuremath{\epsilon}})$, the size is $O(n+1/\sqrt{\ensuremath{\epsilon}})$, and only one ancilla qubit is needed. The second method accurately represents quantum states with sparse Walsh series. The WSL loads $s$-sparse Walsh series into $n$ qubits with a depth doubly sparse in $s$ and $k$, the maximum number of bits with value 1 in the binary decomposition of the Walsh function indices. The associated quantum circuit approximates the sparse Walsh series up to an error $\ensuremath{\epsilon}$ with a depth $O(sk)$, a size $O(n+sk)$, and one ancilla qubit. In both cases, the protocol is a repeat-until-success procedure with a probability of success $P=\mathrm{\ensuremath{\Theta}}(\ensuremath{\epsilon})$, giving an averaged total time of $O(1/{\ensuremath{\epsilon}}^{3/2})$ for the WSL and $O(sk/\ensuremath{\epsilon})$ for the sparse WSL. Amplitude amplification can be used to reach a probability of success $P=\mathrm{\ensuremath{\Theta}}(1)$, modifying the quantum circuit size to $\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{O}((n+1/\sqrt{\ensuremath{\epsilon}})/\sqrt{\ensuremath{\epsilon}})$ and $\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{O}((n+sk)/\sqrt{\ensuremath{\epsilon}})$ and the depth to $O([log{(n)}^{3}+1/\sqrt{\ensuremath{\epsilon}}]/\sqrt{\ensuremath{\epsilon}})$ and $O([log{(n)}^{3}+sk]/\sqrt{\ensuremath{\epsilon}})$, respectively. Amplitude amplification reduces by a factor $O(1/\sqrt{\ensuremath{\epsilon}})$ the total time dependence on $\ensuremath{\epsilon}$ but increases the size and depth of the associated quantum circuits, making them linearly dependent on $n$. These protocols give overall efficient algorithms with no exponential scaling in any parameter. They can be generalized to any complex-value, multivariate, almost-everywhere-differentiable function. The repeat-until-success Walsh series loader is so far the only method that prepares a quantum state with a circuit depth and an averaged total time independent of the number of qubits.

arXiv:2307.08384•Physical Review A•Apr 1, 2024•39 citations

A quantum random access memory (QRAM) using a polynomial encoding of binary strings

Priyanka Mukhopadhyay

Quantum algorithms claim significant speedup over their classical counterparts for solving many problems. An important aspect of many of these algorithms is the existence of a quantum oracle, which needs to be implemented efficiently in order to realize the claimed advantages in practice. A quantum random access memory (QRAM) is a promising architecture for realizing these oracles. In this paper we develop a new design for QRAM and implement it with Clifford+T circuit. We focus on optimizing the T-count and T-depth since non-Clifford gates are the most expensive to implement fault-tolerantly in most error correction schemes. Integral to our design is a polynomial encoding of bit strings and so we refer to this design as [Formula: see text]. Compared to the previous state-of-the-art bucket brigade architecture for QRAM, we achieve an exponential improvement in T-depth, while reducing T-count and keeping the qubit-count same. Specifically, if N is the number of memory locations to be queried, then [Formula: see text] has T-depth [Formula: see text], T-count [Formula: see text] and uses O(N) logical qubits, while the bucket brigade circuit has T-depth [Formula: see text], T-count O(N) and uses O(N) qubits. Combining two [Formula: see text] we design a quantum look-up-table, [Formula: see text], that has T-depth [Formula: see text], T-count [Formula: see text] and qubit count [Formula: see text]. A quantum look-up table (qLUT) or quantum read-only memory (QROM) has restricted functionality than a QRAM. For example, it cannot write into a memory location and the circuit needs to be compiled each time the contents of the memory change. The previous state-of-the-art CSWAP architecture has T-depth [Formula: see text], T-count [Formula: see text] and qubit count [Formula: see text]. Thus we achieve a double exponential improvement in T-depth while keeping the T-count and qubit-count asymptotically same. Additionally, with our polynomial encoding of bit strings, we develop a method to optimize the Toffoli-count of circuits, specially those consisting of multi-controlled-NOT gates.

arXiv:2408.16794•Scientific Reports•Mar 31, 2025•13 citations

Architectures for a quantum random access memory

Vittorio Giovannetti, Seth Lloyd, Lorenzo Maccone

A random access memory, or RAM, is a device that, when interrogated, returns the content of a memory location in a memory array. A quantum RAM, or qRAM, allows one to access superpositions of memory sites, which may contain either quantum or classical information. RAMs and qRAMs with $n$-bit addresses can access ${2}^{n}$ memory sites. Any design for a RAM or qRAM then requires $O({2}^{n})$ two-bit logic gates. At first sight this requirement might seem to make large scale quantum versions of such devices impractical, due to the difficulty of constructing and operating coherent devices with large numbers of quantum logic gates. Here we analyze two different RAM architectures (the conventional fanout and the ``bucket brigade'') and propose some proof-of-principle implementations, which show that, in principle, only $O(n)$ two-qubit physical interactions need take place during each qRAM call. That is, although a qRAM needs $O({2}^{n})$ quantum logic gates, only $O(n)$ need to be activated during a memory call. The resulting decrease in resources could give rise to the construction of large qRAMs that could operate without the need for extensive quantum error correction.

arXiv:0807.4994•Physical Review A•Nov 5, 2008•326 citations

Quantum Kaczmarz Algorithm for Solving Linear Algebraic Equations

Nhat A. Nghiem, Tuan K. Do, Trung V. Phan

We introduce a quantum linear system solving algorithm based on the Kaczmarz method, a widely used workhorse for large linear systems and least-squares problems that updates the solution by enforcing one equation at a time. Its simplicity and low memory cost make it a practical choice across data regression, tomographic reconstruction, and optimization. In contrast to many existing quantum linear solvers, our method does not rely on oracle access to query entries, relaxing a key practicality bottleneck. In particular, when the rank of the system of interest is sufficiently small and the rows of the matrix of interest admit an appropriate structure, we achieve circuit complexity $\mathcal{O}\left(\frac{1}{\varepsilon}\log m\right)$, where $m$ is the number of variables and $\varepsilon$ is the target precision, without dependence on the sparsity $s$, and could possibly be without explicit dependence on condition number $κ$. This shows a significant improvement over previous quantum linear solvers where the dependence on $κ,s$ is at least linear. At the same time, when the rows have an arbitrary structure and have at most $s$ nonzero entries, we obtain the circuit depth $\mathcal{O}\left(\frac{1}{\varepsilon}\log s\right)$ using extra $\mathcal{O}(s)$ ancilla qubits, so the depth grows only logarithmically with sparsity $s$. When the sparsity $s$ grows as $\mathcal{O}(\log m)$, then our method can achieve an exponential improvement with respect to circuit depth compared to existing quantum algorithms, while using (asymptotically) the same amount of qubits.

quant-pharXiv:2601.01342•Jan 6, 2026•0 citations

Constant-depth circuits for Boolean functions and quantum memory devices using multi-qubit gates

Jonathan Allcock, Jinge Bao, João Fernando Doriguello +2 more

We explore the power of the unbounded Fan-Out gate and the Global Tunable gates generated by Ising-type Hamiltonians in constructing constant-depth quantum circuits, with particular attention to quantum memory devices. We propose two types of constant-depth constructions for implementing Uniformly Controlled Gates. These gates include the Fan-In gates defined by |x⟩|b⟩↦|x⟩|b⊕f(x)⟩ for x∈{0,1}n and b∈{0,1} , where f is a Boolean function. The first of our constructions is based on computing the one-hot encoding of the control register |x⟩ , while the second is based on Boolean analysis and exploits different representations of f such as its Fourier expansion. Via these constructions, we obtain constant-depth circuits for the quantum counterparts of read-only and read-write memory devices – Quantum Random Access Memory (QRAM) and Quantum Random Access Gate (QRAG) – of memory size n . The implementation based on one-hot encoding requires either O(nlog(d)⁡nlog(d+1)⁡n) ancillae and O(nlog(d)⁡n) Fan-Out gates or O(nlog(d)⁡n) ancillae and 16d−10 Global Tunable gates, where d is any positive integer and log(d)⁡n=log⁡⋯log⁡n is the d -times iterated logarithm. On the other hand, the implementation based on Boolean analysis requires 8d−6 Global Tunable gates at the expense of O(n1/(1−2−d)) ancillae.

arXiv:2308.08539•Quantum•Nov 20, 2024•25 citations
We present new designs for quantum random access memory. More precisely, for each function, f:F2n→F2df : \mathbb{F}_2^n \rightarrow \mathbb{F}_2^df:F2n​→F2d​, we construct oracles, Of\mathcal{O}_fOf​, with the property \begin{equation} \mathcal{O}_f \left| x \right\rangle_n \left| 0 \right\rangle_d = \left| x \right\rangle_n \left| f(x) \right\rangle_d. \end{equation} Our methods are based on the Walsh-Hadamard Transform of fff, viewed as an integer valued function. In general, the complexity of our method scales with the sparsity of the Walsh-Hadamard Transform and not the sparsity of fff, yielding more favorable constructions in cases such as binary optimization problems and function with low-degree Walsh-Hadamard Transforms. Furthermore, our design comes with a tuneable amount of ancillas that can trade depth for size. In the ancilla-free design, these oracles can be εεε-approximated so that the Clifford + TTT depth is O((n+log⁡2(dε))Wf)O \left( \left( n + \log_2 \left( \tfrac{d}ε \right) \right) \mathcal{W}_f \right)O((n+log2​(εd​))Wf​), where Wf\mathcal{W}_fWf​ is the number of nonzero components in the Walsh-Hadamard Transform. The depth of the shallowest version is O(n+log⁡2(dε))O \left( n + \log_2 \left( \tfrac{d}ε \right) \right)O(n+log2​(εd​)), using n+dWfn + d \mathcal{W}_fn+dWf​ qubit. The connectivity of these circuits is also only logarithmic in Wf\mathcal{W}_fWf​. As an application, we show that for boolean functions with low approximate degrees (as in the case of read-once formulas) the complexities of the corresponding QRAM oracles scale only as 2O~(nlog⁡2(n))2^{\widetilde{O} \left( \sqrt{n} \log_2 \left( n \right) \right)}2O(n​log2​(n)).
Quantum oracle of Boolean functions is one of the central bridges between classical and quantum algorithms, but the study focusing at quantum circuit optimization of such oracle is yet closed. In this paper, we propose nearly optimal tradeoffs among circuit size, circuit depth and ancilla count, for quantum oracles of three kinds of Boolean functions: general total Boolean functions with output size bbb: with 1≤m≤Θ(2nn)1\le m\leΘ\left(\frac{2^n}{n}\right)1≤m≤Θ(n2n​) ancilla, size O(b2nlog⁡(n+m))\mathcal{O}\left(\frac{b2^n}{\log(n+m)}\right)O(log(n+m)b2n​), depth O(b2nn+m)\mathcal{O}\left(\frac{b2^n}{n+m}\right)O(n+mb2n​); partial Boolean functions of effective support size ddd and output size bbb: with Θ(log⁡d)≤m≤Θ(d)Θ\left(\log d\right)\le m\le Θ\left(d\right)Θ(logd)≤m≤Θ(d) ancilla, size O(nlog⁡d+bd)\mathcal{O}\left(n\log d+bd\right)O(nlogd+bd), depth O(nlog⁡nlog⁡dn+m+log⁡n+d(log⁡d+blog⁡m)m)\mathcal{O}\left(\frac{n\log n\log d}{n+m}+\log n+\frac{d(\log d+b\log m)}{m}\right)O(n+mnlognlogd​+logn+md(logd+blogm)​); sparse Boolean functions of true input size ddd: with Θ(log⁡n+log⁡d)≤m≤Θ(ndlog⁡d)Θ\left(\log n+\log d\right)\le m\leΘ\left(\frac{nd}{\log d}\right)Θ(logn+logd)≤m≤Θ(logdnd​) ancilla, size O(n2log⁡d+ndlog⁡(log⁡d+m/n))\mathcal{O}\left(n^2\log d+\frac{nd}{\log(\log d+m/n)}\right)O(n2logd+log(logd+m/n)nd​), depth O(n2log⁡nlog⁡dn+m+log⁡n+ndm)\mathcal{O}\left(\frac{n^2\log n\log d}{n+m}+\log n+\frac{nd}{m}\right)O(n+mn2lognlogd​+logn+mnd​). All the size and depth bounds are asymptotically optimal up to logarithmic factors in the corresponding ancilla count regions. We hope these results find applications in scenarios where classical procedures are needed to be embedded into quantum circuits, such as QROM implementation and quantum algorithm design.
An approximate quantum state preparation method is introduced, called the Walsh series loader (WSL). The WSL approximates quantum states defined by real-value functions of single real variables with a depth independent of the number nnn of qubits. Two approaches are presented. The first one approximates the target quantum state by a Walsh series truncated at $O(1/\sqrt{\ensuremath{\epsilon}})$, where $\ensuremath{\epsilon}$ is the precision of the approximation in terms of infidelity. The circuit depth is also $O(1/\sqrt{\ensuremath{\epsilon}})$, the size is $O(n+1/\sqrt{\ensuremath{\epsilon}})$, and only one ancilla qubit is needed. The second method accurately represents quantum states with sparse Walsh series. The WSL loads sss-sparse Walsh series into nnn qubits with a depth doubly sparse in sss and kkk, the maximum number of bits with value 1 in the binary decomposition of the Walsh function indices. The associated quantum circuit approximates the sparse Walsh series up to an error $\ensuremath{\epsilon}$ with a depth O(sk)O(sk)O(sk), a size O(n+sk)O(n+sk)O(n+sk), and one ancilla qubit. In both cases, the protocol is a repeat-until-success procedure with a probability of success $P=\mathrm{\ensuremath{\Theta}}(\ensuremath{\epsilon})$, giving an averaged total time of $O(1/{\ensuremath{\epsilon}}^{3/2})$ for the WSL and $O(sk/\ensuremath{\epsilon})$ for the sparse WSL. Amplitude amplification can be used to reach a probability of success $P=\mathrm{\ensuremath{\Theta}}(1)$, modifying the quantum circuit size to $\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{O}((n+1/\sqrt{\ensuremath{\epsilon}})/\sqrt{\ensuremath{\epsilon}})$ and $\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{O}((n+sk)/\sqrt{\ensuremath{\epsilon}})$ and the depth to $O([log{(n)}^{3}+1/\sqrt{\ensuremath{\epsilon}}]/\sqrt{\ensuremath{\epsilon}})$ and $O([log{(n)}^{3}+sk]/\sqrt{\ensuremath{\epsilon}})$, respectively. Amplitude amplification reduces by a factor $O(1/\sqrt{\ensuremath{\epsilon}})$ the total time dependence on $\ensuremath{\epsilon}$ but increases the size and depth of the associated quantum circuits, making them linearly dependent on nnn. These protocols give overall efficient algorithms with no exponential scaling in any parameter. They can be generalized to any complex-value, multivariate, almost-everywhere-differentiable function. The repeat-until-success Walsh series loader is so far the only method that prepares a quantum state with a circuit depth and an averaged total time independent of the number of qubits.
Quantum algorithms claim significant speedup over their classical counterparts for solving many problems. An important aspect of many of these algorithms is the existence of a quantum oracle, which needs to be implemented efficiently in order to realize the claimed advantages in practice. A quantum random access memory (QRAM) is a promising architecture for realizing these oracles. In this paper we develop a new design for QRAM and implement it with Clifford+T circuit. We focus on optimizing the T-count and T-depth since non-Clifford gates are the most expensive to implement fault-tolerantly in most error correction schemes. Integral to our design is a polynomial encoding of bit strings and so we refer to this design as [Formula: see text]. Compared to the previous state-of-the-art bucket brigade architecture for QRAM, we achieve an exponential improvement in T-depth, while reducing T-count and keeping the qubit-count same. Specifically, if N is the number of memory locations to be queried, then [Formula: see text] has T-depth [Formula: see text], T-count [Formula: see text] and uses O(N) logical qubits, while the bucket brigade circuit has T-depth [Formula: see text], T-count O(N) and uses O(N) qubits. Combining two [Formula: see text] we design a quantum look-up-table, [Formula: see text], that has T-depth [Formula: see text], T-count [Formula: see text] and qubit count [Formula: see text]. A quantum look-up table (qLUT) or quantum read-only memory (QROM) has restricted functionality than a QRAM. For example, it cannot write into a memory location and the circuit needs to be compiled each time the contents of the memory change. The previous state-of-the-art CSWAP architecture has T-depth [Formula: see text], T-count [Formula: see text] and qubit count [Formula: see text]. Thus we achieve a double exponential improvement in T-depth while keeping the T-count and qubit-count asymptotically same. Additionally, with our polynomial encoding of bit strings, we develop a method to optimize the Toffoli-count of circuits, specially those consisting of multi-controlled-NOT gates.
A random access memory, or RAM, is a device that, when interrogated, returns the content of a memory location in a memory array. A quantum RAM, or qRAM, allows one to access superpositions of memory sites, which may contain either quantum or classical information. RAMs and qRAMs with nnn-bit addresses can access 2n{2}^{n}2n memory sites. Any design for a RAM or qRAM then requires O(2n)O({2}^{n})O(2n) two-bit logic gates. At first sight this requirement might seem to make large scale quantum versions of such devices impractical, due to the difficulty of constructing and operating coherent devices with large numbers of quantum logic gates. Here we analyze two different RAM architectures (the conventional fanout and the ``bucket brigade'') and propose some proof-of-principle implementations, which show that, in principle, only O(n)O(n)O(n) two-qubit physical interactions need take place during each qRAM call. That is, although a qRAM needs O(2n)O({2}^{n})O(2n) quantum logic gates, only O(n)O(n)O(n) need to be activated during a memory call. The resulting decrease in resources could give rise to the construction of large qRAMs that could operate without the need for extensive quantum error correction.
We introduce a quantum linear system solving algorithm based on the Kaczmarz method, a widely used workhorse for large linear systems and least-squares problems that updates the solution by enforcing one equation at a time. Its simplicity and low memory cost make it a practical choice across data regression, tomographic reconstruction, and optimization. In contrast to many existing quantum linear solvers, our method does not rely on oracle access to query entries, relaxing a key practicality bottleneck. In particular, when the rank of the system of interest is sufficiently small and the rows of the matrix of interest admit an appropriate structure, we achieve circuit complexity O(1εlog⁡m)\mathcal{O}\left(\frac{1}{\varepsilon}\log m\right)O(ε1​logm), where mmm is the number of variables and ε\varepsilonε is the target precision, without dependence on the sparsity sss, and could possibly be without explicit dependence on condition number κκκ. This shows a significant improvement over previous quantum linear solvers where the dependence on κ,sκ,sκ,s is at least linear. At the same time, when the rows have an arbitrary structure and have at most sss nonzero entries, we obtain the circuit depth O(1εlog⁡s)\mathcal{O}\left(\frac{1}{\varepsilon}\log s\right)O(ε1​logs) using extra O(s)\mathcal{O}(s)O(s) ancilla qubits, so the depth grows only logarithmically with sparsity sss. When the sparsity sss grows as O(log⁡m)\mathcal{O}(\log m)O(logm), then our method can achieve an exponential improvement with respect to circuit depth compared to existing quantum algorithms, while using (asymptotically) the same amount of qubits.
We explore the power of the unbounded Fan-Out gate and the Global Tunable gates generated by Ising-type Hamiltonians in constructing constant-depth quantum circuits, with particular attention to quantum memory devices. We propose two types of constant-depth constructions for implementing Uniformly Controlled Gates. These gates include the Fan-In gates defined by |x⟩|b⟩↦|x⟩|b⊕f(x)⟩ for x∈{0,1}n and b∈{0,1} , where f is a Boolean function. The first of our constructions is based on computing the one-hot encoding of the control register |x⟩ , while the second is based on Boolean analysis and exploits different representations of f such as its Fourier expansion. Via these constructions, we obtain constant-depth circuits for the quantum counterparts of read-only and read-write memory devices – Quantum Random Access Memory (QRAM) and Quantum Random Access Gate (QRAG) – of memory size n . The implementation based on one-hot encoding requires either O(nlog(d)⁡nlog(d+1)⁡n) ancillae and O(nlog(d)⁡n) Fan-Out gates or O(nlog(d)⁡n) ancillae and 16d−10 Global Tunable gates, where d is any positive integer and log(d)⁡n=log⁡⋯log⁡n is the d -times iterated logarithm. On the other hand, the implementation based on Boolean analysis requires 8d−6 Global Tunable gates at the expense of O(n1/(1−2−d)) ancillae.