Quantum CTF field notes
Reference for the Quantum Village CTF at DEF CON 34, Aug 7–9 2026: Qiskit crash course, gate cheat sheet, math primer, per-category attack playbooks, toolkit API, day-of logistics.
Read in this order
1. Math
Kets, inner products, unitaries, tensor products, Bloch sphere. ~45 min. Skip only if this is already comfortable.
2. Qiskit crash course
The ~20% of the IBM course that covers ~95% of CTF challenges. ~3 h with the exercises.
3. Category playbooks
Per-category recognition + attack pattern: QASM golf, BB84, CHSH, Q# katas, Grover/Shor, PQC, misc.
4. Cheat sheet
Gate matrices, identities, Qiskit API, QASM syntax. The page kept open in a tab on con day.
5. Toolkit API
The pre-built solvers: signatures and copy-paste call patterns.
6. Day-of playbook
Registration, triage order, timeboxing, what to bring. Read once the week before.
What the CTF tests
Drawn from DEF CON 29 (2021), 31, and 32 (QOLOSSUS), plus adjacent quantum CTFs. Each category opens with an easy intro challenge that unlocks the harder ones in that category — clear the intros first.
| Category | What it looks like | Playbook |
|---|---|---|
| OpenQASM circuits | "Write a circuit ≤7 lines that outputs X" (e.g. XOR-bit-al, 200 pts) | Circuit golf |
| Q# katas | Distinguish unitaries U₁ vs U₋₁; oracle problems | Katas |
| QKD / BB84 | Rebuild a shared key from a bases/measurements transcript, decrypt the flag | BB84 |
| CHSH / Bell | Beat the classical 75% bound with an entangled strategy | CHSH |
| Post-quantum crypto | Misuse of Kyber / Dilithium (SandboxAQ RWPQC style) | PQC |
| Algorithms | Shor (factoring), Grover (search) framed as puzzles | Grover / Shor |
| Misc / stego / quiz | Image → transcription, QC trivia | Misc |
Many past winners had no prior quantum background. The CTF rewards recognising which of the seven patterns above you are looking at far more than it rewards depth in any one.
Environment
python3.12 -m venv .venv && source .venv/bin/activate
pip install -U pip && pip install -r env/requirements.txt
./run_selftests.sh # all seven toolkit modules green == ready
Python 3.12 specifically — 3.14 lacks wheels for parts of this stack. Post-quantum needs
native liboqs first (brew install liboqs).