Quantum CTF field notes

Everything needed for the Quantum Village CTF at DEF CON 34 (Aug 7–9 2026), compressed to what actually gets used under time pressure. The Qiskit page is a crash course standing in for the 35-hour IBM curriculum; the rest is reference you read during a challenge, not before it.

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 in this repo — 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.

CategoryWhat it looks likePlaybook
OpenQASM circuits"Write a circuit ≤7 lines that outputs X" (e.g. XOR-bit-al, 200 pts)Circuit golf
Q# katasDistinguish unitaries U₁ vs U₋₁; oracle problemsKatas
QKD / BB84Rebuild a shared key from a bases/measurements transcript, decrypt the flagBB84
CHSH / BellBeat the classical 75% bound with an entangled strategyCHSH
Post-quantum cryptoMisuse of Kyber / Dilithium (SandboxAQ RWPQC style)PQC
AlgorithmsShor (factoring), Grover (search) framed as puzzlesGrover / Shor
Misc / stego / quizImage → transcription, QC triviaMisc

Reassurance that is actually load-bearing: many past winners had no prior quantum background. The linear algebra and protocol reasoning here is learnable in two weeks; the CTF rewards recognising which of seven patterns you are looking at far more than it rewards depth.

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).

External references