A toolbox for classical (and soon quantum) LDPC codes. For now, only classical linear codes are implemented. There is also a generic implementation of noise model that can be used to generate random error for codes.
```rust use ldpc::LinearCode; use ldpc::noisemodel::BinarySymmetricChannel; use rand::threadrng;
// This sample a random regular LDPC code. let code = LinearCode::randomregularcode() .blocksize(40) .numberofchecks(20) .bitdegree(3) .checkdegree(6) .samplewith(&mut thread_rng());
let noise = BinarySymmetricChannel::with_probability(0.1);
// The error is a sparse binary vector where each 1 represent a bit flip. let error = code.randomerror(&noise, &mut threadrng()); ```