Quickstart
Install the library and run your first quantum circuit in minutes.
Core Concepts
Understand qubits, gates, superposition, entanglement, and measurement.
Algorithm Guides
Step-by-step walkthroughs of Bell states, teleportation, Grover, and Shor.
API Reference
Complete reference for the simulator, gates, qubits, and quantum channels.
Get started in three steps
What you can simulate
Standard quantum gates
H, X, Y, Z, S, T, R, RX, RY, RZ, and the universal U gate — all with multi-qubit support.
Controlled operations
CNOT, CCNOT, CCCNOT, CZ, CR, and arbitrary controlled unitaries via
C() and Controlled().Quantum Fourier Transform
Built-in
QFT and InvQFT for use in phase estimation and factoring algorithms.Density matrices & noise
Model open quantum systems with bit flip, phase flip, depolarizing, and amplitude damping channels.
q requires Go 1.23 or later and has zero external dependencies — it relies exclusively on the Go standard library.