Hands-On Learning of Quantum Computing
In this blog
- Abstract
- Leadership summary
- Engineer summary
- Key features of the simulator
- Implementation notes
- Quantum computation via simulation
- Simulator example: Initialization
- Superposition and the Hadamard gate
- Entanglement and correlated states
- Quantum advantage and algorithms
- Summary of classical vs. quantum computation
- Conclusion
- The simulator
- Download
Foundations of quantum computation via simulation
Abstract
Quantum computing holds long‑term strategic promise, but near‑term progress is constrained by scarce, noisy and immature hardware. This paper presents a quantum computation simulator that allows organizations to engage with quantum computing today, without reliance on physical quantum devices. The simulator represents quantum states as explicit, inspectable data structures, enabling engineers and technical leaders to directly observe and reason about superposition, interference, entanglement, and measurement as executable program behavior.
The platform serves three purposes: accelerating workforce readiness through hands‑on experimentation, enabling early validation of quantum algorithms ahead of fault‑tolerant hardware, and clarifying where quantum advantage is most likely to emerge across problem domains such as search, factoring, and optimization. This approach supports informed decisions on investment, talent development, and long‑term quantum strategy while delivering immediate practical value.
Leadership summary
This paper introduces a quantum computation simulator designed to make quantum computing accessible, actionable, and strategically relevant without reliance on scarce or immature quantum hardware. Rather than treating quantum states as abstract mathematical objects, the simulator presents them as explicit, inspectable data structures, enabling users to observe and reason about quantum behavior directly.
The simulator provides an end‑to‑end environment for exploring quantum computation, from state initialization and gate execution through algorithm composition and measurement. By translating core quantum concepts into concrete, executable operations, it lowers the barrier for engineers, computer scientists, and technical leaders to build intuition around quantum advantage and algorithmic behavior.
This approach serves three strategic purposes. First, it functions as a practical learning platform, accelerating workforce readiness in quantum computing by emphasizing hands‑on experimentation over formal theory. Second, it acts as a development and validation environment, allowing teams to prototype and reason about quantum algorithms in advance of scalable, fault‑tolerant hardware. Third, it provides organizational insight into where quantum advantage originates, clarifying which classes of problems — such as search, factoring and combinatorial optimization — are most likely to benefit from future quantum systems.
By grounding quantum computation in familiar programming concepts and executable workflows, this simulator helps demystify the field and supports informed decision‑making about investment, talent development and long‑term quantum strategy. It enables organizations to engage with quantum computing today — practically and credibly — while preparing for tomorrow's hardware capabilities.
Engineer summary
This whitepaper presents an operational view of quantum computing, treating the quantum state not merely as a mathematical abstraction but as a functional set of bitstring–amplitude pairs. By interacting directly with a purpose‑built Quantum Simulator, core concepts of quantum information are demonstrated through concrete, executable examples.
The simulator provides a complete lifecycle for quantum programs—from state initialization through gate execution, algorithmic composition, and measurement — allowing learners to move beyond abstract linear algebra into a practical, programmatic understanding of quantum computation.
Key features of the simulator
The simulator supports a comprehensive range of quantum operations:
- Initialization and state management
Quantum registers can be initialized with arbitrary numbers of qubits and optional classical registers. States can be inspected at any time. - Universal gate set
A complete suite of single‑qubit gates (H, X, Y, Z, S, T, and rotations) and multi‑qubit gates (controlled operations, Toffoli, SWAP) enables universal quantum computation. - Algorithmic support
Built‑in demonstrations cover foundational algorithms including Deutsch–Jozsa, Bernstein–Vazirani, Simon, Grover search, Shor factoring, and variational optimization methods. - Validation and debugging
Utilities for normalization checks, Bell‑state verification, and guided tutorial narration support both learning and experimentation.
Implementation notes
The simulator serves multiple purposes. Its primary role is as a self‑guided teaching tool for learners new to quantum computing. Secondarily, it provides a development framework for practitioners who understand quantum algorithms but lack access to physical quantum hardware. Finally, the implementation itself is educational, illustrating how complex gates and algorithms can be constructed from first principles using familiar functional programming concepts.
Quantum computation via simulation
The building block: The qubit
Unlike a classical bit, which is strictly 0 or 1, a qubit can exist in a superposition of states. Operationally, the simulator represents a quantum state as a collection of key–value pairs, where each key is a bitstring and each value is a complex amplitude. The probability of observing a particular bitstring upon measurement is given by the squared magnitude of its amplitude, with the total probability across all states summing to one.
Understanding a single qubit — visualization
A single qubit is often visualized using the Bloch sphere, where its state corresponds to a point on the surface of a unit sphere parameterized by two angles. In this representation, single‑qubit gates act as rotations of the state vector, providing intuition for superposition, phase, and interference. While useful for conceptual understanding, the Bloch sphere applies only to single‑qubit states and does not capture entanglement.
Qubit representation in the simulator
The simulator does not store qubit states using Bloch sphere coordinates. Instead, it represents all quantum states — single‑qubit and multi‑qubit — as explicit mappings from bitstrings to complex amplitudes. For single‑qubit cases, this representation corresponds exactly to a point on the Bloch sphere, while naturally extending to multi‑qubit systems and entangled states. This explicit data‑structure view allows users to directly inspect, manipulate and reason about quantum state evolution throughout program execution.
Quantum states are described using Dirac (bra–ket) notation. In the standard computational basis, the fundamental single‑qubit states are denoted
and
with superpositions expressed as linear combinations of these basis states. The simulator represents qubits right to left, consistent with common practice in computer science and engineering.
Simulator example: Initialization
To create a three‑qubit register initialized to the ground state:
QSIM> INIT 3
QSIM> DISPLAY
000> (1.000000 + 0.000000i) Prob: 1.000000
Superposition and the Hadamard gate
The Hadamard (H) gate operationally implements superposition by transforming a single basis state into an equal‑weight distribution over multiple bitstrings.
Applying H to qubit 0 in a three‑qubit register produces:
QSIM> H 0
QSIM> DISPLAY
000> (0.707107 + 0.000000i) Prob: 0.500000
001> (0.707107 + 0.000000i) Prob: 0.500000
Entanglement and correlated states
Entanglement arises when the quantum state of multiple qubits cannot be decomposed into independent single‑qubit states. This phenomenon is typically produced using controlled gates.
Simulator example: Bell State
QSIM> INIT 2
QSIM> H 0
QSIM> CX 0 1
QSIM> DISPLAY
00> (0.707107 + 0.000000i) Prob: 0.500000
11> (0.707107 + 0.000000i) Prob: 0.500000
In this maximally entangled state, measuring either qubit immediately determines the outcome of the other.
Measurement
Measurement probabilistically collapses a quantum state into a single basis outcome, converting quantum information into classical results. For entangled systems, measuring one qubit constrains the remaining state according to the observed outcome. In most quantum algorithms, measurements can be deferred until the end of computation without affecting final outcome statistics.
Quantum advantage and algorithms
Quantum algorithms derive their power from constructive and destructive interference, using carefully designed transformations to amplify correct answers while suppressing incorrect ones.
Grover's search
Grover's algorithm provides a quadratic speedup for searching an unstructured database by repeatedly amplifying the amplitude of a marked state through oracle evaluation and diffusion.
QSIM> GROVER
Shor's algorithm
Shor's algorithm factors composite integers efficiently by reducing factoring to a period‑finding problem solved using the Quantum Fourier Transform.
QSIM> SHOR
The simulator includes reference implementations of foundational quantum algorithms (Deutsch–Jozsa, Bernstein–Vazirani, Grover, Shor) and optimization workflows (QUBO and QAOA), enabling direct inspection of interference, entanglement and measurement behavior.
Summary of classical vs. quantum computation
| Concept | Classical | Quantum |
| Information unit | Bit | Qubit |
| Logic | Boolean gates | Unitary transformations |
| Execution | Sequential | Parallel via superposition |
| Readout | Deterministic | Probabilistic measurement |
Conclusion
By framing quantum states as manipulable data structures rather than abstract vectors, the Quantum Simulator provides a direct and intuitive path from theory to practice. Learners can observe interference, entanglement, and measurement as concrete program behaviors rather than purely mathematical constructs.
This hands‑on approach allows classical engineers and computer scientists to engage meaningfully with quantum algorithms, understand sources of quantum advantage, and develop the intuition required to program future quantum hardware.
Appendix: Simulator Availability
The simulator is implemented in C++ using functional primitives inspired by Quantum Computing Without the Linear Algebra the additional gates and algorithms are inspired by Quantum Computing & Information, a scaffolding approach. A complete command reference, runnable examples and guided labs are provided in the project's GitHub repository, along with build instructions and documentation.
The simulator
To get it: git clone https://github.com/DonaldMolaro/quantum_sim.git
There are build instructions in the README.md file.
Once built: % ./quantum_sim
References
"Quantum Computing without the Linear Algebra". Aws Albarghouthi (2025) https://eprint.iacr.org/2025/1091.pdf
"Quantum Computing & Information, A scaffolding approach". Second Edition. Peter Y. Lee, Huiwen Ji, Ran Cheng. Polaris QCI Publishing 2025.
"Quantum Computing for Everyone". Chris Bernhardt. MIT Press 2019