Static Error Rate Channel

Warning: if you do not have a copy of our bitbucket repository, these examples will not work!

Creation of a channel

{{{id=1| F = VectorSpace(GF(7), 7) Ch = ChannelStaticErrorRate(F, 3) Ch /// }}}

Transmission of an element through our channel

{{{id=2| v = F.random_element() print v /// }}} {{{id=15| y = Ch.transmit(v) print y /// }}} {{{id=16| print v == y /// }}}

What if I just want a random number of errors in a specific range?

{{{id=8| Ch = ChannelStaticErrorRate(F, (1,4)) print Ch /// }}}

I try to transmit a vector through this new channel

{{{id=19| v = F.random_element() print v /// }}}

First transmission

{{{id=18| y = Ch.transmit(v) print y print len((v - y).nonzero_positions()) /// }}}

Second transmission

{{{id=22| y = Ch.transmit(v) print y print len((v - y).nonzero_positions()) /// }}}

Third transmission

{{{id=3| y = Ch.transmit(v) print y print len((v - y).nonzero_positions()) /// }}}

Error-Erasure Channel

{{{id=10| F = VectorSpace(GF(7), 7) Ch = ChannelErrorErasure(F, 2, 3) Ch /// }}}

Transmission example

{{{id=33| v = F.random_element() print v /// }}}

Transmit vector

{{{id=26| (y, era) = Ch.transmit(v) print y /// }}}

Erasure vector

{{{id=13| print era /// }}}