  The techniques of distance verification known for general linear codes are
re-applied to quantum stabilizer codes. Then distance verification is addressed
for classical and quantum LDPC codes. New complexity bounds for distance
verification with provable performance are derived using the average weight
spectra of the ensembles of LDPC codes. These bounds are expressed in terms of
the erasure-correcting capacity of the corresponding ensemble. We also present
a new irreducible-cluster technique that can be applied to any LDPC code and
takes advantage of parity-checks' sparsity for both classical and quantum LDPC
codes. This technique reduces complexity exponents of all existing
deterministic techniques designed for generic stabilizer codes with small
relative distances, which also include all known families of quantum LDPC
codes.
