Quantum Programming in C++ and Python
Learn quantum programming with a primary C++ track and Python for contrast and testing. CPU-only and container-first, on Fedora.
What this tutorial is
A chapter-based, hands-on path to writing real quantum programs, with a primary C++ track and a secondary Python track used for contrast and testing. You build intuition from the state vector up before reaching for a framework, then show each algorithm in C++ (Quantum++, with CUDA-Q's CPU target as a second option) and cross-check it against Python (Qiskit and Aer, Cirq, PennyLane). Everything runs on a normal Fedora workstation in Docker containers, CPU only: no GPU, no cloud account, and no special hardware. The qubit ceiling is about 25 to 30 on a workstation, which is enough for every classic algorithm here.
Prerequisites & Setup
Get a working C++ and Python quantum environment running in containers, CPU only.
Foundations
Qubits, state vectors, measurement and gates, built from the ground up.
First Programs
Your first circuits in C++ and Python, and the entanglement that makes them quantum.
Algorithms
The classic quantum algorithms, from Deutsch-Jozsa to a small Shor demo.
Hybrid & Variational
Variational methods that pair a quantum circuit with a classical optimizer: VQE and QAOA.
Going Further
Simulator limits, a framework comparison, and an optional run on real hardware.
Appendices
A linear-algebra reference, why post-quantum cryptography is a different subject from quantum computing, a glossary, and a guided demo you can run yourself.