Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/benchmark.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ jobs:
- name: Gosec
uses: securego/gosec@master
with:
args: -exclude=G115,G404 -exclude-dir=backend/braket -exclude-dir=observe/otelbridge -exclude-dir=observe/prombridge ./...
args: -exclude=G115,G404 -exclude-dir=backend/braket -exclude-dir=observe/otelbridge -exclude-dir=observe/prombridge -exclude-dir=textbook/wasm ./...
33 changes: 33 additions & 0 deletions .github/workflows/textbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Textbook

on:
push:
branches: [main]
paths:
- "textbook/**"
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: Build WASM
run: |
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" textbook/wasm_exec.js
cd textbook/wasm && GOOS=js GOARCH=wasm go build -ldflags="-w -s" -o ../main.wasm .

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./textbook
exclude_assets: ".github,wasm"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ go.work.sum

# Claude
docs/

# Textbook build artifacts
textbook/main.wasm
textbook/wasm_exec.js
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test test-race test-all lint vet fuzz bench bench-gpu-cuda test-gpu-cuda coverage clean hooks
.PHONY: test test-race test-all lint vet fuzz bench bench-gpu-cuda test-gpu-cuda coverage clean hooks textbook textbook-serve textbook-clean

test:
go test -count=1 -timeout=5m ./...
Expand Down Expand Up @@ -63,3 +63,14 @@ hooks:
clean:
rm -f coverage.out coverage.html
go clean -testcache

textbook:
cp "$$(go env GOROOT)/lib/wasm/wasm_exec.js" textbook/wasm_exec.js
cd textbook/wasm && GOOS=js GOARCH=wasm go build -ldflags="-w -s" -o ../main.wasm .

textbook-serve: textbook
@echo "Serving textbook at http://localhost:8080"
python3 -m http.server 8080 -d textbook

textbook-clean:
rm -f textbook/main.wasm textbook/wasm_exec.js
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Requires Go 1.24+.
| 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 |
| Education | 20 Jupyter notebooks from qubits to Shor's algorithm (Go kernel via [gonb](https://github.com/janpfeifer/gonb)) |
| Education | Textbook from qubits to Shor's algorithm (Go via [gonb](https://github.com/janpfeifer/gonb)) |

```
q0: ─H───@──
Expand All @@ -70,8 +70,7 @@ q1: ─────X──
## Documentation

- [API Reference](https://pkg.go.dev/github.com/splch/goqu)
- [Notebooks](notebooks/)
- [Benchmarks](https://splch.github.io/goqu/dev/bench/)
- [Textbook](https://splch.github.io/goqu/)

## Contributing

Expand Down
Loading
Loading