Quantum Gate Simulator – Building Quantum Circuits in C++
The Quantum Gate Simulator is a compact C++ program built to model the fundamentals of quantum computation
from the ground up. It lets users assemble and execute simple quantum circuits directly from the command line
using gates such as Pauli-X, Y, Z, Hadamard, Phase, and CNOT.
Each qubit is represented as a complex-valued vector, and gates are treated as unitary matrices.
State evolution is handled through matrix–vector multiplication with normalization and probability tracking
after every operation. Commands like:
./quantum_sim.exe --circuit "H CNOT" --two-qubits
prepare a maximally entangled Bell state — a clean demonstration of quantum superposition and entanglement
handled entirely in C++. The codebase follows an industry-style layout with src/ and
include/ directories, a Makefile for compilation, and a modular object-oriented design.
The simulator serves as both a learning tool and a coding exercise in low-level quantum logic simulation.
Planned updates include Bloch sphere visualization, measurement statistics, and unit testing with Catch2.
Explore the source code and implementation details on my
GitHub Repository.