  We survey the existing techniques for calculating code distances of classical
codes and apply these techniques to generic quantum codes. For classical and
quantum LDPC codes, we also present a new linked-cluster technique. It reduces
complexity exponent of all existing deterministic techniques designed for codes
with small relative distances (which include all known families of quantum LDPC
codes), and also surpasses the probabilistic technique for sufficiently high
code rates.
