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

A Naive Implementation of Logical Expression in Quantum Computing

Mirza Nur Hidayat, Muhammad Faruq Nuruddinsyah

Published Feb 4, 2026• 0 citations
Publisher

Abstract

In this paper, we present a straightforward implementation of a logical expression in quantum computing. We develop a quantum oracle for our logical expression and implement it using Grover's algorithm. The logical expression comprises two variables and two clauses involving the XOR and AND operators. For this expression, we require two qubits as variables, one qubit as the oracle, and one qubit as an ancilla. Additionally, we utilise CNOT and Toffoli gates to construct the quantum oracle. We then design its quantum circuit and execute it on a simulator. The implementation yields the quantum state of a two-qubit quantum system as the solution to our logical expression.

DOI
10.5281/zenodo.18481826

Related papers

Grover-algorithm-like operator using only single-qubit gates

Go Kato

We propose a quantum circuit for the quantum search problem. The quantum circuit is superior to Grover's algorithm in some realistic cases. The reasons for the superiority are in short as follows: In the quantum circuit proposed in this paper, all the operators except for the oracle can be written as direct products of single-qubit gates. Such separable operators can be executed much faster than multiparticle operators, such as controlled-NOT gates and Toffoli gates, in many realistic systems. The idea of this quantum circuit is inspired by the Hamiltonian used in the adiabatic quantum computer. In addition, the scaling of the number of oracle calls for this circuit is the same as that for Grover's algorithm, i.e., $O({2}^{n∕2})$.

arXiv:quant-ph/0508081•Physical Review A•Sep 15, 2005•10 citations

Operations Algorithms on Quantum Computer

Moayad A. Fahdil, Ali Foud Al-Azawi, Sammer Said

A quantum computer is a device for computation that makes direct use of distinctively quantum mechanical phenomena, such as superposition and entanglement, to perform operations on data. In a classical (or conventional) computer, the amount of data is measured by bits, in a quantum computer; it is measured by quantum of bits (qubits). This work describes, and implements the universal quantum logic gates, the terminology is introduced with two well known quantum gates, the quantum NOT, and the quantum XOR gates. The NOT and XOR gates have already been described in classical reversible logic. This work gives the implementation of the quantum circuits, such as the Quantum Half-Adder Circuits, which consists of quantum control control not gate (CCNot) and quantum control not gate (CNot). Also, it describes and implements the Quantum Full-Adder Circuits, which consists of two Quantum Half-Adder Circuits and one control not gate (CNot). Depending on the quantum circuits, one can implement the quantum basic arithmetic operations such as (addition, subtraction, multiplication and division). After each implementation, the computational complexity of each step is calculated. Key words:

•Jan 1, 2010•6 citations

Quantum logic synthesis for Satisfiability Problems.

Shuai Yang, Wei Zi, Bujiao Wu +3 more

To demonstrate the advantage of quantum computation, many attempts have been made to attack classically intractable problems, such as the satisfiability problem (SAT), with quantum computer. To use quantum algorithms to solve these NP-hard problems, a quantum oracle with quantum circuit implementation is usually required. In this manuscript, we first introduce a novel algorithm to synthesize quantum logic in the Conjunctive Normal Form (CNF) model. Compared with linear ancillary qubits in the implementation of Qiskit open-source framework, our algorithm can synthesize an m clauses n variables k-CNF with $O(k^2 m^2/n)$ quantum gates by only using three ancillary qubits. Both the size and depth of the circuit can be further compressed with the increase in the number of ancillary qubits. When the number of ancillary qubits is $\Omega(m^\epsilon)$ (for any $\epsilon > 0$), the size of the quantum circuit given by the algorithm is O(km), which is asymptotically optimal. Furthermore, we design another algorithm to optimize the depth of the quantum circuit with only a small increase in the size of the quantum circuit. Experiments show that our algorithms have great improvement in size and depth compared with the previous algorithms.

•Jan 14, 2021•1 citation

Synthesis of Ternary Grover's Algorithm

Sudhindu Bikash Mandal, Amlan Chakrabarti, Susmita Sur‐Kolay

Grover's search algorithm is one of the well-studied quantum computing algorithms, which plays a key role in many applications such as graph coloring, triangle finding, Boolean satisfiability. Although there are many works on circuit synthesis for Grover's algorithm in the binary quantum domain, only a few exist for the ternary version of the algorithm. In this paper, we first propose a new ternary superposition operator and utilize it to synthesize a ternary quantum logic circuit for Grover's algorithm. Our proposed circuits for a ternary oracle and the ternary Grover's diffusion operator require 4 and 6 gate levels respectively per iteration, and for the ternary oracle 1 ancilla qutrit. To the best of our knowledge, this is the first circuit for the Grover's diffusion operator using ternary gates. Finally, we use these two circuits to present a ternary quantum circuit for the vertex coloring problem. The oracle circuit for this problem has smaller gate count compared to existing solutions.

IEEE International Symposium on Multiple-Valued Logic (ISMVL)•May 1, 2014•11 citations

Automatic generation of efficient oracles: The less-than case

Javier Sanchez‐Rivero, Daniel Talaván, José Manuel García-Alonso +2 more

Grover’s algorithm is a well-known contribution to quantum computing. It searches one value within an unordered sequence. A fundamental part of this algorithm is the so-called oracle, a quantum circuit that marks the quantum state corresponding to the desired value. In this work we present a classical algorithm that builds an oracle that performs a less-than operation, marking states representing natural numbers smaller than a given one. Results are shown to prove its functionality. This lessthan oracle implementation works on any number of qubits and does not require any ancilla qubits. Regarding depth, the proposed implementation is compared with Qiskit automatic method, Diagonal. We show that the depth of our less-than oracle implementation is always lower. In addition, a comparison with another method for oracle generation in terms of gate count is also conducted to prove the efficiency of our method. The result presented here is part of a research work that aims to achieve reusable quantum operations that can be composed to perform more complex ones.

Journal of Systems and Software•Sep 4, 2024•5 citations

AN ALGORITHM FOR MINIMUM SPACE QUANTUM BOOLEAN CIRCUITS CONSTRUCTION

I-Ming Tsai, Sy‐Yen Kuo

Implementing a quantum computer at the circuit level has emerged as an important field of research recently. An important topic of building a general-purpose quantum computer is to implement classical Boolean logic using quantum gates and devices. Since the Toffoli gate is universal in classical Boolean logic, any classical combinational circuit can be implemented by the straightforward replacement algorithm with auxiliary qubits as intermediate storage. However, this inefficient implementation causes a large number of auxiliary qubits to be used. In this paper, a systematic procedure is proposed to derive a minimum space quantum circuit for a given classical combinational logic. We first formulate the problem of transforming an m-to-n bit classical Boolean logic into a t-bit unitary quantum operation. The eligible solution set is then constructed such that a solution can be found simply by selecting any member from this set. Finally, we show that the algorithm is optimal in terms of the space consumption.

Journal of Circuits Systems and Computers•Oct 1, 2006•17 citations
In this paper, we present a straightforward implementation of a logical expression in quantum computing. We develop a quantum oracle for our logical expression and implement it using Grover's algorithm. The logical expression comprises two variables and two clauses involving the XOR and AND operators. For this expression, we require two qubits as variables, one qubit as the oracle, and one qubit as an ancilla. Additionally, we utilise CNOT and Toffoli gates to construct the quantum oracle. We then design its quantum circuit and execute it on a simulator. The implementation yields the quantum state of a two-qubit quantum system as the solution to our logical expression.
We propose a quantum circuit for the quantum search problem. The quantum circuit is superior to Grover's algorithm in some realistic cases. The reasons for the superiority are in short as follows: In the quantum circuit proposed in this paper, all the operators except for the oracle can be written as direct products of single-qubit gates. Such separable operators can be executed much faster than multiparticle operators, such as controlled-NOT gates and Toffoli gates, in many realistic systems. The idea of this quantum circuit is inspired by the Hamiltonian used in the adiabatic quantum computer. In addition, the scaling of the number of oracle calls for this circuit is the same as that for Grover's algorithm, i.e., O(2n∕2)O({2}^{n∕2})O(2n∕2).
A quantum computer is a device for computation that makes direct use of distinctively quantum mechanical phenomena, such as superposition and entanglement, to perform operations on data. In a classical (or conventional) computer, the amount of data is measured by bits, in a quantum computer; it is measured by quantum of bits (qubits). This work describes, and implements the universal quantum logic gates, the terminology is introduced with two well known quantum gates, the quantum NOT, and the quantum XOR gates. The NOT and XOR gates have already been described in classical reversible logic. This work gives the implementation of the quantum circuits, such as the Quantum Half-Adder Circuits, which consists of quantum control control not gate (CCNot) and quantum control not gate (CNot). Also, it describes and implements the Quantum Full-Adder Circuits, which consists of two Quantum Half-Adder Circuits and one control not gate (CNot). Depending on the quantum circuits, one can implement the quantum basic arithmetic operations such as (addition, subtraction, multiplication and division). After each implementation, the computational complexity of each step is calculated. Key words:
To demonstrate the advantage of quantum computation, many attempts have been made to attack classically intractable problems, such as the satisfiability problem (SAT), with quantum computer. To use quantum algorithms to solve these NP-hard problems, a quantum oracle with quantum circuit implementation is usually required. In this manuscript, we first introduce a novel algorithm to synthesize quantum logic in the Conjunctive Normal Form (CNF) model. Compared with linear ancillary qubits in the implementation of Qiskit open-source framework, our algorithm can synthesize an m clauses n variables k-CNF with O(k2m2/n)O(k^2 m^2/n)O(k2m2/n) quantum gates by only using three ancillary qubits. Both the size and depth of the circuit can be further compressed with the increase in the number of ancillary qubits. When the number of ancillary qubits is Ω(mϵ)\Omega(m^\epsilon)Ω(mϵ) (for any ϵ>0\epsilon > 0ϵ>0), the size of the quantum circuit given by the algorithm is O(km), which is asymptotically optimal. Furthermore, we design another algorithm to optimize the depth of the quantum circuit with only a small increase in the size of the quantum circuit. Experiments show that our algorithms have great improvement in size and depth compared with the previous algorithms.
Grover's search algorithm is one of the well-studied quantum computing algorithms, which plays a key role in many applications such as graph coloring, triangle finding, Boolean satisfiability. Although there are many works on circuit synthesis for Grover's algorithm in the binary quantum domain, only a few exist for the ternary version of the algorithm. In this paper, we first propose a new ternary superposition operator and utilize it to synthesize a ternary quantum logic circuit for Grover's algorithm. Our proposed circuits for a ternary oracle and the ternary Grover's diffusion operator require 4 and 6 gate levels respectively per iteration, and for the ternary oracle 1 ancilla qutrit. To the best of our knowledge, this is the first circuit for the Grover's diffusion operator using ternary gates. Finally, we use these two circuits to present a ternary quantum circuit for the vertex coloring problem. The oracle circuit for this problem has smaller gate count compared to existing solutions.
Grover’s algorithm is a well-known contribution to quantum computing. It searches one value within an unordered sequence. A fundamental part of this algorithm is the so-called oracle, a quantum circuit that marks the quantum state corresponding to the desired value. In this work we present a classical algorithm that builds an oracle that performs a less-than operation, marking states representing natural numbers smaller than a given one. Results are shown to prove its functionality. This lessthan oracle implementation works on any number of qubits and does not require any ancilla qubits. Regarding depth, the proposed implementation is compared with Qiskit automatic method, Diagonal. We show that the depth of our less-than oracle implementation is always lower. In addition, a comparison with another method for oracle generation in terms of gate count is also conducted to prove the efficiency of our method. The result presented here is part of a research work that aims to achieve reusable quantum operations that can be composed to perform more complex ones.
Implementing a quantum computer at the circuit level has emerged as an important field of research recently. An important topic of building a general-purpose quantum computer is to implement classical Boolean logic using quantum gates and devices. Since the Toffoli gate is universal in classical Boolean logic, any classical combinational circuit can be implemented by the straightforward replacement algorithm with auxiliary qubits as intermediate storage. However, this inefficient implementation causes a large number of auxiliary qubits to be used. In this paper, a systematic procedure is proposed to derive a minimum space quantum circuit for a given classical combinational logic. We first formulate the problem of transforming an m-to-n bit classical Boolean logic into a t-bit unitary quantum operation. The eligible solution set is then constructed such that a solution can be found simply by selecting any member from this set. Finally, we show that the algorithm is optimal in terms of the space consumption.