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≤m≤Θ(n2n) ancilla, size
O(log(n+m)b2n), depth
O(n+mb2n);
partial Boolean functions of effective support size
d and output size
b: with
Θ(logd)≤m≤Θ(d) ancilla, size
O(nlogd+bd), depth
O(n+mnlognlogd+logn+md(logd+blogm));
sparse Boolean functions of true input size
d: with
Θ(logn+logd)≤m≤Θ(logdnd) ancilla, size
O(n2logd+log(logd+m/n)nd), depth
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.
The existing construction methods of Quantum Boolean functions (QBFs) are extended and simplified. All QBFs with one qubit and all local QBFs with any qubits are constructed. And we propose the concept of Generalized quantum Boolean functions (GQBFs). We find all GQBFs with one qutrit and all kinds of local GQBFs with any qutrits. The number of each of the four kinds of functions above is uncountably infinitely many. By using diagonal matrices, we obtain uncountably infinitely many non-local QBFs with any qubits and GQBFs with any qutrits. Infinitely many families of GQBFs with any qudits are obtained from the properties of projection matrices of known saturated orthogonal arrays.