Kamehame-Hadamard!
A quantum computing SDK in pure Go — build, simulate, transpile, and run quantum circuits with zero external dependencies.
package main
import (
"fmt"
"github.com/splch/goqu/circuit/builder"
"github.com/splch/goqu/sim/statevector"
)
func main() {
c, _ := builder.New("bell", 2).
H(0).
CNOT(0, 1).
MeasureAll().
Build()
sim := statevector.New(2)
counts, _ := sim.Run(c, 1024)
fmt.Println(counts) // map[00:~512 11:~512]
}go get github.com/splch/goqu@latest
Requires Go 1.24+.
| Area | Details |
|---|---|
| Circuit Construction | Fluent builder, 40+ gates, immutable IR, symbolic parameters, dynamic circuits |
| Simulation | Statevector (28 qubits, auto-parallel), density matrix, Clifford (1000s of qubits), CUDA, Metal |
| Algorithms | Grover, Shor, VQE, QAOA, QPE, HHL, amplitude estimation, Trotter, VQC, and more |
| Error Mitigation | ZNE, readout correction, Pauli twirling, dynamical decoupling, PEC, CDR, TREX |
| Hardware Backends | IBM, IonQ, Google, Amazon Braket, Quantinuum, Rigetti |
| Transpilation | SABRE routing, 4 optimization levels, decomposition, gate cancellation, verification |
| Interop | OpenQASM 2/3 parser + emitter, Quil emitter |
| Visualization | Text, SVG, LaTeX circuits; histograms; Bloch spheres; state city plots |
| Pulse Programming | OpenPulse model, waveforms, defcal |
| Noise Modeling | Kraus operators, device noise models, depolarizing/amplitude-damping channels |
| Observability | Zero-dep hooks + OpenTelemetry and Prometheus bridges |
| Interactive Textbook | 42-chapter curriculum compiled to WASM, live circuit sandboxes, Bloch sphere explorer, spaced-repetition flashcards |
q0: ─H───@──
│
q1: ─────X──
Contributions welcome — open an issue or submit a PR. Run make test before submitting.
