Skip to content

Add Monte-Carlo FER simulator with BER sweep, CMake target, and CI artifact export - #1

Closed
sparkainlp-x with Copilot wants to merge 3 commits into
mainfrom
copilot/create-monte-carlo-fer-simulation
Closed

sparkainlp-x with Copilot wants to merge 3 commits into
mainfrom
copilot/create-monte-carlo-fer-simulation

Conversation

Copilot AI commented Aug 26, 2026 •

Copy link
Copy Markdown

This PR adds a Monte-Carlo Frame Error Rate workflow for the qLDPC decoder to measure FER across configurable BER points and produce machine-consumable curve outputs. It also wires the simulator into build and CI so FER generation is part of the software validation stage.

  • Monte-Carlo FER executable (monte_carlo.cpp)

    • Adds monte_carlo_sim to run BER sweeps with configurable trials, BER list, RNG seed, and progress interval.
    • Injects random channel errors with std::mt19937 + std::bernoulli_distribution, computes noisy syndromes, runs BP decode, and records frame failures.
    • Computes per-BER statistics: FER, standard error, and 95% confidence interval.
    • Exports required CSV schema: BER,FER,FramesAtBER,ErrorsAtBER,Timestamp; optional JSON includes full stats.
  • Build integration (CMakeLists.txt)

    • Adds BUILD_MONTE_CARLO_SIM (default ON).
    • Adds monte_carlo_sim target linked against ldpc and OpenMP.
    • Registers a focused CTest smoke target for Monte-Carlo execution.
  • CI integration (.github/workflows/ci.yml)

    • Extends software-ci to run Monte-Carlo with configurable MONTE_CARLO_TRIALS (default 10000).
    • Uploads fer_curve.csv as a CI artifact.
  • Documentation (README.md)

    • Adds Monte-Carlo usage and output details, including optional JSON export.
./build/monte_carlo_sim \
  --trials 10000 \
  --ber-list 0.001,0.005,0.01,0.02,0.05 \
  --csv fer_curve.csv \
  --json fer_curve.json

Copilot AI and others added 2 commits August 26, 2026 04:39
Co-authored-by: sparkainlp-x <281253927+sparkainlp-x@users.noreply.github.com>
Co-authored-by: sparkainlp-x <281253927+sparkainlp-x@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Monte-Carlo Frame Error Rate simulation for qLDPC decoder Add Monte-Carlo FER simulator with BER sweep, CMake target, and CI artifact export Aug 26, 2026
Copilot AI requested a review from sparkainlp-x August 26, 2026 04:47
Copilot AI added a commit that referenced this pull request Aug 27, 2026
- Integrate monte_carlo.cpp from PR #1 (BER sweep, FER statistics, CSV/JSON export)
- Update CMakeLists.txt with monte_carlo_sim target and smoke test
- Update CI workflow to run Monte-Carlo simulation and upload fer_curve.csv artifact
- Replace minimal README with comprehensive scientific documentation (20 improvements)
- Add PERFORMANCE.md with FER analysis, latency benchmark results, and reproducibility guide

Co-authored-by: sparkainlp-x <281253927+sparkainlp-x@users.noreply.github.com>
@sparkainlp-x

Copy link
Copy Markdown
Owner

Closing as overlapping #2, which contains the same Monte-Carlo FER simulator plus the CMake/CI changes. The branch is kept for reference.

@sparkainlp-x
sparkainlp-x deleted the copilot/create-monte-carlo-fer-simulation branch September 27, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants