Made a little diagram for seeing how the repetition code works:

0

The upper left box is in the input, which you can toggle between 0 and 1 by clicking on it. If you click the encode button, it is encoded in the three boxes to the right as a distance-3 repetition code. The bottom three boxes in the column show what happens to the encoding after it is corrupted by noise. To start with there is no noise, but when you click the generate noise button, the middle three boxes in the column are randomly populated with lightening bolts that flip the bits. Finally, so see whether you successfully recover the information, click the decode button to take a majority vote and populate the bottom left box, seeing if it’s the same as the upper left box.

Things I immediately would like to iterate on:

  1. Add arrows or something to communicate the flow.
  2. Label some more things (like the input and output).
  3. Let one vary the probability of the lightening bolts, and the distance of the repetition code.

Varying the parameters is probably something that could be introduced in a subsequent diagram if I were to make this a proper explorable trying to teach someone the repetition code. Then could start marching up the layers of abstraction by looking at how the probability of recovering the information depends on these parameters.