# Stabilizer Codes
A **stabilizer code** is the dominant framework for [[Quantum Error Correction]]. It defines a protected space not by listing all valid states, but by listing a set of **parity-check operators** that every valid state must agree with.
## First principles
A **stabilizer** is an operator (built from Pauli $X$, $Y$, $Z$ checks on the qubits) whose value is guaranteed to be $+1$ for any uncorrupted codeword. The set of all such operators *stabilizes* the code — hence the name.
The logic runs:
1. Pick a group of commuting check operators (the stabilizers).
2. The **logical states** are exactly those that return $+1$ on every check.
3. To detect errors, measure the checks. An error that anticommutes with a check flips its outcome to $-1$. The pattern of $\pm1$ results — the **syndrome** — points to the error, without revealing the encoded data. (See [[Syndrome Extraction]].)
> [!intuition] Defining a thing by its invariants
> Rather than describe a sphere by every point on it, describe it as "all points exactly 1 unit from the centre." Stabilizers do the same for quantum codes: the codewords are whatever satisfies the checks.
## Why it matters
- Almost all leading codes are stabilizer codes: the [[Toric Code]], [[Surface Code]], and [[qLDPC Codes]] are all defined this way.
- The formalism makes error detection a routine of measuring parities, which is efficient and hardware-friendly.
> [!note] The boundary of the framework
> Some powerful schemes deliberately step *outside* this formalism — see [[Permutation-Invariant Codes]] — exploiting symmetries that stabilizer checks don't capture.
## Related
- [[Quantum Error Correction]]
- [[Syndrome Extraction]]
- [[Toric Code]]
- [[Surface Code]]
- [[qLDPC Codes]]
- [[Permutation-Invariant Codes]]