code for simulating message-passing decoders for the 2D toric code and 1D repetition code, as used in the following papers:
- offline decoding: arxiv:2506.03266
- real-time (fault-tolerant) decoding: arxiv:2510.08056
1d_local_simulation.jl,2d_local_simulation.jl: offline decoding: simulates confining interactions between anyons in space1d_windowed_simulation.jl,2d_windowed_simulation.jl: real-time decoding: simulates confining interactions between defects in spacetime1d_power_simulation.jl: decoding using instantly-generated power-law interactionssimulation_plotter.py: plots data output (as.jld2files, stored insim_data/) from simulation codes2d_history_visualizer.py: creates animations of spin+field histories for 2D simulationspair_distance_statistics.jl: computes statistics of anyon pair separations for iid noisefigure_commands.md: commands used to reproduce figures
- Julia files are designed to be run in the REPL; changes to parameter values should be made by making direct edits to the relevant lines.