https://github.com/splch/goqu
A zero-dependency quantum computing SDK for Go
https://github.com/splch/goqu
go quantum quantum-computing sdk
Last synced: 2 months ago
JSON representation
A zero-dependency quantum computing SDK for Go
- Host: GitHub
- URL: https://github.com/splch/goqu
- Owner: splch
- License: mit
- Created: 2026-03-10T17:22:42.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-10T23:55:03.000Z (2 months ago)
- Last Synced: 2026-04-11T01:22:38.598Z (2 months ago)
- Topics: go, quantum, quantum-computing, sdk
- Language: Go
- Homepage: https://splch.github.io/goqu/
- Size: 12.2 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Goqu
*Kamehame-Hadamard!*
[](https://pkg.go.dev/github.com/splch/goqu)
[](https://github.com/splch/goqu/actions/workflows/ci.yml)
[](https://codecov.io/gh/splch/goqu)
[](https://goreportcard.com/report/github.com/splch/goqu)
A quantum computing SDK in pure Go - build, simulate, transpile, and run quantum circuits with zero external dependencies.
```go
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]
}
```
## Install
```
go get github.com/splch/goqu@latest
```
Requires Go 1.24+.
## Features
| 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, QIR emitter + parser (LLVM IR), 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──
```
## Documentation
- [API Reference](https://pkg.go.dev/github.com/splch/goqu)
- [Textbook](https://splch.github.io/goqu/)
## Contributing
Contributions welcome - open an issue or submit a PR. Run `make test` before submitting.
## License
[MIT](LICENSE)