Active — 185 tests passing, MP5 next
qsim-studio
A quantum computing simulator built from first principles — no Qiskit, no Cirq in the core — with a visualization layer for every milestone.
Inside the work
A state, transformed.
An illustrative pure single-qubit state on a Bloch sphere. The state vector rotates on the sphere surface; this is not a running quantum computation.
Prepare
Start with a statevector and a circuit expressed through the simulator’s gate representation.
Apply a gate
A single-qubit unitary changes the state; for a pure qubit this can be visualized as a rotation of the Bloch vector on the sphere surface.
Measure
Read probabilities from amplitudes and compare the result with the expected circuit behavior.
Overview
qsim-studio is a local, GPU-accelerated quantum simulator built module by module against a public roadmap, with the explicit rule that external quantum frameworks (Qiskit, QuTiP) are only ever used inside an isolated validation layer to cross-check the from-scratch implementation — never inside the engine itself. Everything is pure Python plus NumPy/CuPy.
The build runs milestone-by-milestone: a quantum math engine (linear algebra, gates, single-qubit Bloch representation), a multi-qubit statevector register using tensor-contraction gate application, a measurement and statistics layer (Born-rule sampling, full/partial collapse, expectation values), and a circuit layer with its own intermediate representation, a QASM-2-subset parser/exporter, a gate-fusion optimizer, and an SVG circuit-diagram renderer.
Chart
Tests passing per completed milestone
Results
Roadmap milestones
| Milestone | Scope | Status | Tests |
|---|---|---|---|
| MP1 — Quantum math engine | Linear algebra, gates, single-qubit Bloch sphere | Done | 24 pass |
| MP2 — Multi-qubit statevector | Tensor-contraction gate application, Bell/GHZ states, entanglement entropy | Done | 36 pass |
| MP3 — Measurement & statistics | Born sampling, collapse, expectation values, basis rotation | Done | 52 pass |
| MP4 — Circuit layer | IR, QASM-2 subset, gate-fusion optimizer, SVG renderer | Done | 73 pass |
| MP5 — Foundational algorithms | Next milestone | Planned | — |
Key Findings
What the work shows
Every milestone ships its own visualization: a Bloch sphere driven by real ⟨X⟩⟨Y⟩⟨Z⟩ expectation values, GHZ-state amplitude bars with entanglement entropy, an exact-vs-shot-noise measurement histogram showing convergence, and a circuit diagram rendered directly from the IR — not hand-drawn.
MP2's tensor-contraction statevector engine is cross-checked against a dense-matrix ground truth, and MP1's gate math includes oracle tests that activate automatically once Qiskit/QuTiP are installed, without becoming a hard dependency.
185 tests pass across the four completed milestones (24 + 36 + 52 + 73) with zero external quantum-library dependency in the core engine.