Binary symmetric channel (source code)

= Binary symmetric channel
{wiki}

A binary symmetric channel independently flips each transmitted bit with a fixed crossover probability $p$.
Its channel matrix is
$$
\begin{pmatrix}1-p&p\\p&1-p\end{pmatrix}.
$$