I'm building a Python-based quantum circuit simulator from scratch — implementing fundamental quantum gates, state vector manipulation, and visualization tools. The goal is to support well-known quantum algorithms like Grover's search and Shor's factorization, making it useful both as a learning tool and as a testbed for quantum algorithm development. It's still a work in progress, but the core architecture is taking shape.
Understanding quantum computing really requires hands-on experience with circuits, but access to real quantum hardware is limited and expensive. Most existing simulators abstract away the implementation details I actually want to dig into. I wanted to build something that lets me explore quantum mechanics at the gate level. Specifically, I need it to:
The simulator represents quantum states as complex-valued vectors in the computational basis. For an n-qubit system, the state vector holds 2^n complex amplitudes, stored as NumPy arrays for efficient linear algebra operations. This part is working well.
I'm implementing fundamental quantum gates as unitary matrices. Here's where things stand:
Grover's Algorithm: Currently implementing the quantum search algorithm with Oracle construction for arbitrary search problems. I'm verifying the quadratic speedup against classical search, targeting databases up to 2^10 elements.
Shor's Algorithm: Working on the modular exponentiation circuits and Quantum Fourier Transform needed for integer factorization. This is the most complex piece — targeting factorization of small integers as a proof of concept first.
Also on the roadmap:
I'm organizing the simulator into modular components. The structure is still evolving but currently looks like:
Stable so far (targeting 15)
Gates Implemented
Algorithms Underway
Validation vs Qiskit
I'm actively cross-checking results against IBM Qiskit as I go, which has been a great sanity check — and a source of some humbling bugs. The core simulation engine is holding up well, but the algorithm layer still needs a lot of work before I'd call it reliable.
Python 3.10+
NumPy, SciPy
Matplotlib, Seaborn
Qiskit, Cirq
Pytest, unittest
Sphinx, Jupyter