code relating to the construction and analysis of 1) Tsirelson's 1d memory [1] and its generalizations, and 2) a local Tsirelson-inspired decoder for the 2d toric code. work done jointly with Shankar Balasubramanian and Margarita Davydova [2].
circuit_simulator.jlmain simulation code capable of computing the following quantities for the codes listed below:- time evolution of logical fidelity
- relaxation times
- spacetime trajectories under custom noise realizations
- searches over low-weight noise realizations that lead to logical errors
- statistical properties in long-time steady states (various moments of magnetization, statistics of domain wall sizes, etc.)
gate_builder.jlbuilds circuits for below-listed codesgate_applier.jlapplies circuits to states in the presence of various types of noisenilpotence_tester.jlused to verify the "nilpotence" property of gadgets used in the toric code automatonhelper_functions.jlcontains miscellaneous auxillary functionssimulation_parameters.jlcontains a repository of parameter values to be used bycircuit_simulator.jl(threshold values, default number of samples, etc.)circuit_plotter.pyplots data output (as.jld2files) fromcircuit_simulator.jl1d_circuit_visualizer.pydraws diagrams of circuits (and spacetime spin configurations) for 1d codes2d_circuit_visualizer.pyan interactive visualizer for the toric code automatonscaling_plotter.pymakes interactive plots for examining scaling collapses near critical points
- 1d Tsirelson's automaton with base codes
- 3- and 5-bit repetition codes
- a [5, 2, 3] code
- A 2d version of Tsirelson's automaton based on 9-bit reptition codes
- 2d toric code
- "wire noise" (default): gates are implimented reliably, and iid noise is applied to each spin after the gates in a given layer have acted. for all but the toric code, the noise replaces a given spin by
$\pm1$ with probability$p(1\pm \eta)/2$ , and does nothing with probability$p$ . for the toric code, a given spin is flipped with probability$p$ . - "measurement noise": each syndrome measurement independently gives the wrong outcome with probability
$p$ . - "gadget noise": each gadget fails independently with probability
$p$ . when a gadget fails, its spacetime support incurrs a randomly chosen error from a pre-defined set (toric code), or the spins in the support are randomized (other codes). for the toric code, the supports of each gadget and the errors that occur when they fail can be modified incircuit_simulator.jl. - each type of noise model also allows for a specific spacetime history of noise to be applied by appropriately modifying
noise_histincircuit_simulator.jl.
- as written,
circuit_simulator.jlis designed to be run in the REPL; changes to parameter values should be made by making direct edits to the relevant lines. - the fps and length of animations produced by
2d_circuit_visualizer.pyneeded to be specified by hand by editing the relevant section of code. - don't judge the lack of type declarations :)
- finish enumeration of threshold values in
simuation_parameters.jland default scaling exponents for critical points of different codes
- Tsirelson's original paper (see page 26)
- Our paper