Method for Organizing Grover's Quantum Oracle

In a quantum computation, some algorithms use oracles (black boxes) for abstract computational objects. This paper presents an example for organizing Grover's quantum oracle by synthesizing several unitary gates such as CNOT gates, Toffoli gates, and Hadamard gates. As an example, we show a concrete quantum circuit for the knapsack problem, which belongs to the class of NP-complete problems. The time complexity of an oracle for the knapsack problem is estimated to be O(n2), where n is the number of variables. And the same order is obtained for space complexity.

[1]  Barenco,et al.  Quantum networks for elementary arithmetic operations. , 1995, Physical review. A, Atomic, molecular, and optical physics.

[2]  Lov K. Grover Quantum Mechanics Helps in Searching for a Needle in a Haystack , 1997, quant-ph/9706033.