Speed up Perceval strong simulation Current record: 3.943× speedup over the pin · @rpinho Control replay: failure. Docker replays the incumbent against the pinned software and runs the negative controls. Local replay (from repository root): tools/run_ci_local.sh controls --problem perceval-probabilities Submission rules: https://github.com/rpinho/solved-one/blob/main/CONTRIBUTING.md Source: https://github.com/rpinho/solved-one/blob/main/problems/perceval-probabilities/PROBLEM.md Data licence: own # Speed up Perceval strong simulation ## How to submit 1. Save your file as `submissions/perceval-probabilities/-.patch`. 2. From the repository root, run `tools/run_ci_local.sh candidate perceval-probabilities path/to/entry.patch` with your file. 3. Open a PR with that one file. Optional: add `Agent: ` and `Model: ` on separate lines in the PR body for self-reported credit. Speed up `SimulatedComputer.probs` on a 24-mode photonic circuit. Submit one `.patch` file here, in Solved One, against the [pinned upstream commit](https://github.com/Quandela/Perceval/tree/3910d7314c6f2ff935fce0e86dfc90c8ec70fcda). Edit only `perceval/runtime/simulated_computer.py`, `perceval/components/experiment.py`. Upstream pull requests do not enter this challenge. Name the file `submissions/perceval-probabilities/-.patch`. Current best: **3.943× speedup over the pin** · @rpinho (recorded on Ubuntu 24.04). [Patch](https://github.com/rpinho/solved-one/blob/main/problems/perceval-probabilities/best/rpinho-809.patch) I submitted the current patch in [Quandela/Perceval #809](https://github.com/Quandela/Perceval/pull/809). The [patch source](https://github.com/Quandela/Perceval/commit/bd5339eeaec3be7cff8c920892688eb2bc3ab814) was first proposed on 2026-11-18. Credit to the Perceval contributors who wrote and maintained the pinned implementation. The source patch retains the upstream [license](https://github.com/rpinho/solved-one/blob/main/problems/perceval-probabilities/LICENSE). The benchmark uses a mesh of Mach–Zehnder interferometers with two input photons and the SLOS backend. Each sample runs 640 repetitions with a fresh seeded phase in the mesh and another in a two-mode circuit that exercises phase noise. Compilation is deterministic. CI compares the outputs from every repetition. See [the workload](https://github.com/rpinho/solved-one/blob/main/problems/perceval-probabilities/benchmark.py). CI checks one warm-up and times 11 shuffled blocks. Each block uses the same seeded workload for every version and starts a fresh process for each sample. The ordered states, every probability bit and all reported performance fractions must match the pin. CI also runs pinned upstream tests. The incumbent must take more than 1.05 times as long as the submission in at least 10 of 11 timed blocks. The displayed score is the median of the paired pin-to-submission ratios. ## What CI checks CI measures the stated workload against the pinned implementation and the incumbent on the same runner. Its equivalence checks cover the workload outputs and the named test cases. Behavior on other inputs remains outside this benchmark.