gala-quantum-algorithms
Implement quantum algorithms in Gala — QFT, Grover, phase estimation, adders, oracles
Skill by gala-pl
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/gala-pl-gala-quantum-algorithms
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/gala-quantum-algorithms
Tools it pre-approves 10
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(cargorun--bingala*)ReadWriteEditGlobGrep
What's inside
- Skill name
gala-quantum-algorithms- Description
- Implement quantum algorithms in Gala — QFT, Grover, phase estimation, adders, oracles
- License
- Apache-2.0
- Allowed tools
- Bash(cargo, run, --bin, gala, *), Read, Write, Edit, Glob, Grep
- Instructions
- 188 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
## Task
$ARGUMENTS
## Overview
Gala's standard library (`gala.algorithms`) provides building blocks, but you often need custom algorithms. This skill covers implementing core quantum algorithms with Gala's linear types and automatic uncomputation.
## Standard Library Algorithms
```gala
import gala.algorithms.{ qft, iqft, grover, phase_estimation, ripple_adder }
```
| Algorithm | Module | Properties |
|-----------|--------|------------|
| QFT/iQFT | `gala.algorithms.qft` | `#[property(unitary)]`, `#[property(reversible)]` |
| Grover | `gala.algorithms.grover` | `#[property(unitary)]` |
| Phase Estimation | `gala.algorithms.phase_est` | `#[property(unitary)]` |
| Ripple Adder | `gala.algorithms.arithmetic` | `#[property(uncomputes)]` |
## Writing Custom Algorithms
### 1. Quantum Fourier Transform (QFT)
```gala
import gala.gates.{ h, cx, rz }
fn qft(qs: Qubits<N>) -> Qubits<N> quantum {
let n = N // const generic
for i in 0..n {
h(qs[i])
for j in (i+1)..n {
// Controlled rotation: R_k where k = j-i+1
let angle = 2.0 * PI / (2.0_f64.powi((j - i + 1) as Int))
// Controlled RZ
let (ctrl, target) = (qs[i], qs[j])
// Use controlled-phase or decompose
cp(ctrl, target, angle)
}
}
// Swap for bit-reversal
for i in 0..(n/2) {
swap(qs[i], qs[n-1-i])
}
qs
}
```
### 2. Grover's Search
```gala
fn grover(oracle: fn(Qubits<N>) -> Qubits<N> quantum, iterations: Int) -> Qubits<N> quantum {
let qs = qubits<N>()
// Initial superposition
for i in 0..N { h(qs[i]) }
for _ in 0..iterations {
// Oracle
qs = oracle(qs)
// Diffusion
qs = diffusion(qs)
}
qs
}
fn diffusion(qs: Qubits<N>) -> Qubits<N> quantum {
for i in 0..N { h(qs[i]); x(qs[i]) }
// Multi-controlled Z
mcz(qs)
for i in 0..N { x(qs[i]); h(qs[i]) }
qs
}
```
### 3. Reversible Arithmetic (with Auto-Uncomputation)
```gala
fn ripple_adder(a: Qubits<N>, b: Qubits<N>) -> (Qubits<N>, Qubits<N>) quantum {
// Uses ancilla for carry — automatically uncomputed on scope exit
let carry = qubit() // Ancilla, auto-uncomputed at }
// ... adder circuit using carry
(a, b) // carry goes out of scope → adjoint synthesized
}
```
**Key:** Ancilla `carry` is liftable → compiler inserts `adjoint(carry_provenance)` at `}`
### 4. Phase Estimation
```gala
fn phase_estimation(
unitary: fn(Qubits<N>) -> Qubits<N> quantum,
eigenstate: Qubits<N>,
precision: Int
) -> (Qubits<precision>, Qubits<N>) quantum {
let eval_reg = qubits<precision>()
let state = eigenstate
// Hadamards on evaluation register
for i in 0..precision { h(eval_reg[i]) }
// Controlled unitary powers
for i in 0..precision {
let power = 2^i
controlled_unitary_power(eval_reg[i], state, unitary, power)
}
// Inverse QFT on eval register
iqft(eval_reg)
(eval_reg, state)
}
```
## Property Testing Your Algorithms
Add attributes to enable compiler-verified properties:From gala-pl/gala, Apache-2.0.
More from gala-pl/gala
- 0.584score
gala-diff
gala-pl
Work with Gala's native differentiation — parameter-shift for quantum params, reverse-mode autodiff for classical, chain-rule composition
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-hardware-backends
gala-pl
Run Gala programs on quantum hardware — backend selection, capability checking, QIR emission, vendor SDKs
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-language-basics
gala-pl
Learn Gala language fundamentals — syntax, types, effects, linear qubits, basic quantum operations
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-noise-modeling
gala-pl
Model and simulate noise in Gala — typed noise models, QuEST noise channels, error mitigation
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-performance
gala-pl
Optimize Gala program performance — gate count, circuit depth, gradient cost, compilation time
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-python-interop
gala-pl
Call Gala from Python — PyO3 bridge, Jupyter kernel, PyTorch integration, NumPy arrays
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-vqa-programming
gala-pl
Build variational quantum algorithms in Gala — encoders, ansätze, optimizers, native grad
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-ast
gala-pl
Work with Gala's AST — add node types, implement visitors, maintain CST/AST separation
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-codegen-classical
gala-pl
Work with Gala's classical codegen — Cranelift (debug) and LLVM (release) for orchestration layer
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-driver
gala-pl
Work with Gala's compilation driver — salsa DB orchestration, incremental queries, pipeline wiring
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
debug-compiler
gala-pl
Debug a compiler error or unexpected behavior in Gala source code
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-cookbook
gala-pl
Gala recipes — common patterns, idioms, algorithms, VQA templates, error handling
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 23, 2026 (4 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/gala-pl/gala
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from gala-pl
- 0.584score
gala-diff
gala-pl
Work with Gala's native differentiation — parameter-shift for quantum params, reverse-mode autodiff for classical, chain-rule composition
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-language-basics
gala-pl
Learn Gala language fundamentals — syntax, types, effects, linear qubits, basic quantum operations
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-noise-modeling
gala-pl
Model and simulate noise in Gala — typed noise models, QuEST noise channels, error mitigation
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-performance
gala-pl
Optimize Gala program performance — gate count, circuit depth, gradient cost, compilation time
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-python-interop
gala-pl
Call Gala from Python — PyO3 bridge, Jupyter kernel, PyTorch integration, NumPy arrays
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gala-hardware-backends
gala-pl
Run Gala programs on quantum hardware — backend selection, capability checking, QIR emission, vendor SDKs
SkillAFreshness: A★ 1Claude Code +9
Cite this page
gala-quantum-algorithms skill. Agent Mart. https://agentmart.dev/skills/gala-pl-gala-quantum-algorithms (last updated 2026-10-24)