Simulation code for the paper Quantum Repeater with Encoding, built on a forked SeQUeNCe.
The simulator generates logical Bell pairs across a linear chain of quantum
routers using a CSS code (default Steane [[7,1,3]]) and one of four classical
post-processing modes: none, cec, qec, qec+cec.
- Python 3.10+
- The forked SeQUeNCe checked out as a sibling directory:
parent/ ├── QEC/ # this repo └── SeQUeNCe/ # https://github.com/SagarPatange/SeQUeNCe stim,numpy,matplotlib
python main.py \
--config_file config/standard_configs/line_6_2G.json \
--css_code "[[7,1,3]]" \
--correction_mode cec \
--run_duration_ms 1e5Output is written under log/<run_name>/.
| Path | Purpose |
|---|---|
main.py |
CLI entry point for one simulation run |
RequestLogicalPairApp.py |
App controller driving logical-pair generation |
QREProtocol.py |
QRE protocol (frame updates, classical messaging) |
TeleportedCNOT.py |
Teleported-CNOT protocol used by QRE |
css_codes.py |
CSS code definitions (Steane [[7,1,3]], etc.) |
router_net_topo_2G.py |
Network topology with 2nd-generation routers |
runner_*.py |
Parameter sweep drivers (distance, links, thresholds, …) |
process_log.py |
Post-processing of log/ output |
config/standard_configs/ |
Canonical line-topology configs (line_N_2G.json) |
threshold_plots.ipynb, final_graphs.ipynb |
Final plots |
runner.py,runner_final.py— main fidelity sweepsrunner_distance_and_link.py— sweeps over inter-node distance and chain lengthrunner_z.py— Z-basis experiment
Topology JSONs live under config/standard_configs/ (line_N_2G.json for
N nodes). config/config_generator_*.py regenerate these from templates.