# qLDPC Codes
**Quantum low-density parity-check (qLDPC) codes** are [[Stabilizer Codes|stabilizer codes]] whose parity checks are *sparse* — each check involves only a few qubits, and each qubit is involved in only a few checks — but whose connectivity is **not restricted to a flat 2D grid**. This lets them protect the same information with far fewer physical qubits than the [[Surface Code|surface code]].
## First principles
"Low-density" refers to the parity-check structure (inherited from classical LDPC codes): keeping checks sparse means each [[Syndrome Extraction]] measurement stays simple and low-noise.
The surface code is technically a qLDPC code, but a deliberately *local* one — its checks only ever touch neighbours on a plane. General qLDPC codes relax that constraint: a check may connect qubits that are not physically adjacent. Allowing a few **long-range connections** dramatically improves efficiency.
$
\underbrace{\text{surface code}}_{\text{2D-local, high overhead}} \;\longrightarrow\; \underbrace{\text{general qLDPC}}_{\text{some long-range links, low overhead}}
$
> [!intuition] Friends across town
> If you may only check parity with next-door neighbours, you need a huge town to store one secure secret. Allow a handful of long-distance friendships and the same security needs far fewer people. The price is the wiring to reach across town.
## Why it matters
- **Lower overhead.** qLDPC codes can encode many [[Physical vs Logical Qubits|logical qubits]] per block, slashing the physical-qubit cost of fault tolerance — a major reason several roadmaps favour them.
- **Hardware demand.** They require **non-local connectivity**, which is hard on a fixed chip but natural where qubits can be moved or reach across the system — see [[Qubit Connectivity and Reconfigurability]].
> [!note] Codes are matched to machines
> Which code is "cheap" depends on what connectivity the hardware offers. qLDPC codes are attractive precisely on platforms that can realize their long-range checks.
## Related
- [[Stabilizer Codes]]
- [[Surface Code]]
- [[Qubit Connectivity and Reconfigurability]]
- [[Physical vs Logical Qubits]]
- [[Quantum Error Correction]]