Quantum computing requires logic operations to be implemented as reversible transformations. Classical combinational circuits must therefore be redesigned using reversible gate structures when mapped to quantum systems. In this work, fundamental quantum digital circuits are implemented using CNOT and Toffoli gates using the Qiskit framework.In addition, an 8-qubit Quantum Random Number Generator (QRNG) is developed and analyzed. Hadamard operations are applied to an 8-qubit register to produce a uniform superposition over 256 states. Measurement in the computational basis generates an 8-bit result per execution. By repeating the circuit 16 independent times and concatenation of the outputs produce a 128-bit random sequence. The QRNG is evaluated using Dirac notation, density operator representation and entropy analysis to verify uniform probability distribution under ideal simulation conditions.Simulation results confirm the correct logical functionality of the reversible arithmetic circuits and demonstrate high entropy random sequence generation using quantum measurement. The presented framework provides a structured approach for implementing digital logic and randomness generation in Qiskit.
Quantum computing requires logic operations to be implemented as reversible transformations. Classical combinational circuits must therefore be redesigned using reversible gate structures when mapped to quantum systems. In this work, fundamental quantum digital circuits are implemented using CNOT and Toffoli gates using the Qiskit framework.In addition, an 8-qubit Quantum Random Number Generator (QRNG) is developed and analyzed. Hadamard operations are applied to an 8-qubit register to produce a uniform superposition over 256 states. Measurement in the computational basis generates an 8-bit result per execution. By repeating the circuit 16 independent times and concatenation of the outputs produce a 128-bit random sequence. The QRNG is evaluated using Dirac notation, density operator representation and entropy analysis to verify uniform probability distribution under ideal simulation conditions.Simulation results confirm the correct logical functionality of the reversible arithmetic circuits and demonstrate high entropy random sequence generation using quantum measurement. The presented framework provides a structured approach for implementing digital logic and randomness generation in Qiskit.
ABSTRACT Quantum random number generator (QRNG) platforms use principles of quantum mechanics to create truly random numbers. Traditional pseudo-random number generators (PRNGs) generate numbers based on deterministic formulas. QRNG's use of the principles of superposition and measurement can provide numbers that cannot be predicted or replicated; therefore, they have been used as a source of randomness in various fields. In this research project, an experimental QRNG was designed and built using Qiskit simulations. Each experiment consisted of a series of two-qubit circuits. The circuits were created to place both qubits into an equal probability state. This was done by applying a pair of Hadamard gates (Hadamard gate applies a rotation operator of π/2 radians). Then each circuit was measured. For each measurement, there would be one output from each qubit. Since the Hadamard gate creates an equal-probability superposition, the combination of each qubit will either add up to 1 or subtract from -1. These combinations will be recorded and processed through several methods to evaluate their quality. Those methods include: Shannon Entropy Analysis, Frequency Distribution Analysis and Chi-Square Uniformity Testing. Keywords: Quantum Random Number Generator, Quantum Computing, Quantum Measurement, Cryptography, Secure Randomness, Qiskit Simulation
Quantum computing represents a paradigm shift in computation by leveraging the principles of quantum mechanics such as superposition, entanglement, and interference to perform operations beyond classical limitations. Unlike classical computing systems that rely on irreversible logic operations and suffer from energy dissipation due to information loss, quantum systems utilize reversible unitary transformations that preserve information and improve computational efficiency. This paper presents a comprehensive framework for the design, simulation, and validation of quantum gates and reversible arithmetic circuits, including half adders and half subtractors. The proposed approach systematically maps classical arithmetic logic into quantum circuits using fundamental quantum gates such as Pauli-X, Hadamard, Controlled-NOT (CNOT), and Toffoli gates. The circuits are implemented and simulated using the Qiskit Aer framework, enabling detailed analysis of quantum state evolution and measurement outputs. The results obtained from simulation include program-level outputs, state vector representations, measurement counts, and probability distributions, all of which demonstrate strong agreement with classical truth tables. The analysis confirms the correctness, reversibility, and scalability of the proposed designs. Furthermore, a comparative performance evaluation highlights the advantages of quantum computing over classical approaches in terms of parallelism and energy efficiency. The proposed framework establishes a robust foundation for future implementation of complex Boolean logic and arithmetic operations in quantum systems.
Quantum computing is an emerging computational paradigm that represents and processes information using quantum states. This paper presents the implementation and simulation of a Quantum Half Adder using the IBM Qiskit framework. The proposed circuit performs one-bit binary addition and produces two outputs, SUM and CARRY, through reversible quantum operations. Classical input values are encoded into quantum states using Pauli-X gates. Controlled-NOT (CNOT) gates are used to realize the XOR relationship required for SUM generation, while a Toffoli (CCNOT) gate realizes the AND relationship required for CARRY generation. The complete design is implemented in Python and executed using the Qiskit Aer Simulator. Four possible input combinations are evaluated and the measured outputs are compared with the expected Half Adder truth table. Circuit visualization, terminal output, and measurement histograms are used to verify the operation. The results show that the simulated circuit produces the expected SUM and CARRY values for all input combinations. The work provides a simple practical model for understanding reversible quantum computation, quantum gates, and Qiskit-based quantum circuit simulation.
Abstract This laboratory work provides a practical exploration of random quantum circuits and their statistical behavior using the Qiskit framework. The material is based on educational resources developed by the International Quantum Center at CERN (Switzerland) and aims to introduce participants to probabilistic outputs in quantum computation and the comparison between experimental and theoretical distributions. In Laboratory Work No. 8, participants generate samples from randomly constructed quantum circuits, which consist of qubits initialized in superposition and subjected to sequences of randomly chosen quantum gates. Measurement operations are applied to obtain classical outcomes, producing a distribution of bitstrings. The resulting empirical distribution is then compared to the theoretical probability distribution expected from the ideal quantum state. This exercise demonstrates the intrinsic probabilistic nature of quantum measurement, the impact of circuit depth and gate selection on outcome distributions, and the role of randomness in quantum circuits. Participants learn to implement, execute, and analyze random quantum circuits in Qiskit, including statistical validation against theoretical models. The laboratory guide emphasizes hands-on experience with quantum circuit sampling, data collection, histogram visualization, and statistical comparison, bridging the gap between theoretical quantum mechanics and practical quantum computation on simulators and cloud-accessible hardware.
A quantum gate is the quantum analog of the classical logic gate of digital computers. It is a basic structural unit of a quantum circuit which operates on a small number of qubits to deliver a predefined output. A quantum circuit is a graphical representation of the sequence of the quantum gates used and the measurements performed in a quantum computation. Various quantum logic gates, namely, the Hadamard, T phase, NOT, Pauli-X, controlled NOT (CNOT), controlled-Z, SWAP and controlled phase gates as well as higher-level Toffoli and Fredkin gates are described. Conventions of reading quantum circuit diagrams are explained. Operation of a quantum full adder consisting of registers and gates is discussed, elaborating the role of the NOT gate, the sum calculation with CNOTgates and the carry C-out calculation with Toffoli gates. A primary tool used for performing arithmetic operations on a quantum computer is the quantum Fourier transform (QFT). The QFT adder and multiplier circuits are presented.
Quantum computing (Q-computing) is a revolutionary technology that applies quantum mechanics (QM) to implement calculations significantly quicker than traditional computers. Q-computing employs Q-bits (qubits) rather than classical bits, which can take on a superposition state, making it possible to represent both 0 and 1 at once. This distinctive property allows qubits to perform multiple calculations simultaneously, making Q computers exponentially more powerful as more qubits are added, compared to the linear scaling of classical computers. However, challenges such as qubit instability and error rates remain significant obstacles to fully realizing this potential. A vital aspect of this technology is the development of Q arithmetic circuits, which act as the foundational blocks for efficiently executing Q algorithms. Q half-adder and full-adder circuits are integral to performing fundamental arithmetic operations within Q computers. In contrast to classical adders, Q adders rely on Q gates such as Controlled NOT (CNOT) and Toffoli gates. These gates exploit Q phenomena like entanglement and superposition, allowing for more efficient computations. The Q half-adder consists of two qubits and adds two single bits, producing a carry and sum output. It utilizes the CNOT gate to compute the sum and the Toffoli gate (controlled-controlled-NOT [CCNOT]) to compute the carry. The Q full-adder builds on this, adding three qubits to produce a sum and a carry output, further increasing computational capacity. Through the entanglement of qubits, these circuits allow for more parallelism and speed compared to classical adders. Q carry-look-ahead adders (QCLAs) and Q ripple-carry adders (QRCAs) are used to perform more complex arithmetic operations based on these half-adder and full-adder structures. Q arithmetic circuits have broad applications, boosting secure key generation in cryptography, speeding up matrix operations for faster model training in machine learning, and enabling more precise, efficient image transformations in Q image processing, benefiting fields like medical imaging and computer vision.