Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
700 changes: 699 additions & 1 deletion BACKLOG.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Each backend implements a common `Backend` trait. The frontend, IR, parser, and
|5 |GPU backend (single-GPU) |2–3 months |cuQuantum integration + custom CUDA where it adds value |
|6 |Multi-GPU and distributed |2–3 months |NCCL intra-node + MPI inter-node |
|7 |Research instruments |Milestone-driven |Failure diagnosis, rare-event QEC, observable queries, robustness and deadline studies, near-Clifford expectations |
|8 |Performance audit and recovery |Milestone-driven |Public frontend parity, operation-aware memory, reproducible gains and measured research verdicts |

Estimates are aggressive solo full-time. Realistic part-time: roughly double.

Expand Down Expand Up @@ -155,6 +156,27 @@ efficiency and failure regimes, and include at least one end-to-end QEC diagnosi
one observable-query study. Research hypotheses are measured, not promised speedups;
modelled deadline outcomes must be distinguished from measured hardware capability.

### Phase 8 — Performance Audit and Recovery

Bring existing optimized execution into public frontends, remove unnecessary setup
and output work, and bound memory by the requested operations. Detailed specifications:
`BACKLOG.md`, P8-00 through P8-16; tracker [#550](https://github.com/aleph-sim/aleph/issues/550).

As of 2026-10-18, **13 of 16 capability issues are closed**. The
[integration report](docs/perf/p8-performance-recovery.md) links public API timings,
kernel/operation measurements, allocation evidence, adverse cases and raw provenance.
Phase 8 remains in progress: optimized CPU/Metal CLI execution (#551, draft #569),
competitive Metal MPS factorization (#561), and real multi-GPU plan validation
(#562) remain open. Explicit BP/paging opt-ins are completed research outcomes,
not default-routing or universal performance claims.

**Exit metric:** every capability has a verified repair or its explicitly allowed,
measured research verdict. The report must cover CPU CLI, CUDA Python counts-only,
large-state sampling and noisy trajectories; distinguish modelled reach from actual
allocations and kernel time from public caller time; smoke-run documented commands;
and preserve negative results. The tracker stays open until the three remaining
gates are resolved. This phase does not imply Phase 6 scaling or v1.0 completion.

-----

## 6. Algorithm Coverage (Benchmark Suite)
Expand Down
5 changes: 5 additions & 0 deletions docs/benchmarking.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ Don't upload local numbers to the project default testbed (`self-hosted-linux-x6

## Public-route experiment gates

The [Phase 8 recovery report](perf/p8-performance-recovery.md) provides the current
capability/adoption ledger, timing and memory boundaries, historical evidence and
remaining hardware gates. Phase 8 is still in progress; its separate speedup ratios
must not be multiplied into an aggregate claim.

Use the [P8-13 public workflow harness](../scripts/benchmarks/README.md) for
customer-visible CLI/Python A/B campaigns, in addition to Criterion's kernel-tier
measurements. It records provenance, exact workloads/argv, interleaved raw pairs,
Expand Down
31 changes: 31 additions & 0 deletions docs/perf/data/p8-00/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Phase 8 integration-report receipts

Collected 2026-10-18 from main `6114dab7e18c4deac0fda3039060e00f7661b653`.
The report changes documentation only; no benchmark or production source changed.
Command logs normalize trailing blank lines; test output content is otherwise retained.

- [status.json](status.json): GitHub issue/PR state snapshot; 13/16 capabilities
closed, #551/#561/#562 open. #550 stays open. PR heads and merge commits identify
integration history, not the historical binaries used by child campaigns.
- [validation.json](validation.json): current local platform/toolchain, freshly
built release CPU CLI SHA256, command argv and exits. RAYON_NUM_THREADS=2 bounds
local correctness checks. These are not accepted timing observations.
- [check-1.log](check-1.log): 13 public-workflow contracts including a real CPU CLI
call. Its test mocks resource admission to check output/receipt semantics on CI
or a busy Mac; it does not establish idle-machine performance.
- [check-2.log](check-2.log): 6 pure memory-policy tests.
- [check-3.log](check-3.log): 11 sampler/noise integration and stored oracle tests.
The Aer fixtures are stored references, not a new live Aer campaign.
- [check-4.log](check-4.log): 7 binomial + 8 bounded-experiment tests. One existing
external PyMatching test remains ignored; it is not counted as a pass.
- [check-5.log](check-5.log): 3 threshold-plot schema tests.
- [saved-receipts.json](saved-receipts.json): all six existing P8-13 server campaign
directories independently passed their saved-record consistency check. Four
have `executed` status and exit 0. The failed/contaminated records correctly
exit 2 and contain no successful summary. `passed` here means **revalidation of
the saved classification**, not successful original hardware execution.
- [cli-smoke.txt](cli-smoke.txt): documented Bell counts command on this CLI.

No GPU, Metal, remote-server or fresh performance campaign was run for this report.
Historical numerical results are linked from the report to their child evidence;
their timestamps/source hashes must not be replaced by this validation identity.
10 changes: 10 additions & 0 deletions docs/perf/data/p8-00/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
578b39c39aa057e42445f0ec8ac40f3cfad9b73c86d633b092231d7cb3adaaa9 README.md
b068e1be267fca2b994124eba39f02d0661067767f19adba029134a91c2a8cd5 check-1.log
2524aade8f370f1d04c6c4f23cf9d79721147b11474f7a745ab0f040b5935340 check-2.log
9d5736c2be9b5c3b1fea5d7b403ef8f6d38703072b9c8c2b30d2465cc8787c21 check-3.log
236d037c66f7b8cc5cfeccd0cbf9d802cf885a4af29c5562c589e13e3e5ecae2 check-4.log
dd73ae35517cf417c4448f3b0cc4b1de21bdc18a0d5cd10bcd351667d49f7f73 check-5.log
89efdf5502fda9fc49b0b0edfa277e06d9b06d038552af12c0fc7da11bb04def cli-smoke.txt
fcd2ef8151ee8546eae3443d67acac652314f2024a37e7630e5c34878877ed1b saved-receipts.json
9f0c8fb7344f7aa10488878936c24409a2fa73b4974c160174f125d8fb753a57 status.json
32246c29b3778a25b387707cac66e32303700b188b0d312022827fc6d2c362b4 validation.json
18 changes: 18 additions & 0 deletions docs/perf/data/p8-00/check-1.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
test_changed_executable_rejected_before_launch (test_public_workflow.Contracts) ... ok
test_contamination_aborts_without_launching (test_public_workflow.Contracts) ... ok
test_deterministic_workload_and_summary (test_public_workflow.Contracts) ... ok
test_gpu_settling_is_fixed_and_does_not_retry_until_quiet (test_public_workflow.Contracts) ... ok
test_missing_process_observer_cannot_claim_idle (test_public_workflow.Contracts) ... ok
test_paired_order_and_inert_parameter_stops_before_measurement (test_public_workflow.Contracts) ... ok
test_preserves_venv_executable_symlink (test_public_workflow.Contracts) ... ok
test_real_cpu_cli_entrypoint (test_public_workflow.Contracts) ... ok
test_receipt_missing_hardware_or_counters_is_failure (test_public_workflow.Contracts) ... ok
test_schema_and_amdahl_gate (test_public_workflow.Contracts) ... ok
test_skipped_hardware_never_passes (test_public_workflow.Contracts) ... ok
test_subprocess_failure_and_bad_receipt (test_public_workflow.Contracts) ... ok
test_successful_subprocess_with_wrong_receipt_fails (test_public_workflow.Contracts) ... ok

----------------------------------------------------------------------
Ran 13 tests in 1.140s

OK
17 changes: 17 additions & 0 deletions docs/perf/data/p8-00/check-2.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Compiling aleph-ir v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-ir)
Compiling aleph-backend v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-backend)
Compiling aleph-parser v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-parser)
Compiling aleph-test v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-test)
Compiling aleph-sv v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-sv)
Finished `test` profile [unoptimized + debuginfo] target(s) in 5.87s
Running unittests src/lib.rs (target/debug/deps/aleph_backend-a2fadda868659f85)

running 6 tests
test memory::tests::overflow_and_invalid_layouts_are_errors ... ok
test memory::tests::requested_views_scratch_and_host_limits_are_accounted ... ok
test memory::tests::executor_workspace_override_includes_shot_buffers_and_checks_overflow ... ok
test memory::tests::runtime_sizes_and_free_memory_drive_fit ... ok
test memory::tests::legacy_cdf_counts_do_not_fit_reference_card_despite_state_fitting ... ok
test memory::tests::counts_reach_scales_with_capacity_and_precision ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 36 filtered out; finished in 0.00s
30 changes: 30 additions & 0 deletions docs/perf/data/p8-00/check-3.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Compiling aleph-sv v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-sv)
Finished `test` profile [unoptimized + debuginfo] target(s) in 4.09s
Running tests/noise_driver.rs (target/debug/deps/noise_driver-f298de4eadb158cd)

running 3 tests
test empty_model_reproduces_noiseless_distribution ... ok
test deterministic_same_seed_same_counts ... ok
test noise_actually_fires_under_correct_gate_name ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.77s

Running tests/noise_oracle.rs (target/debug/deps/noise_oracle-526d05c514191d8c)

running 6 tests
test oracle_readout ... ok
test oracle_phase_damp ... ok
test oracle_combined_ghz3 ... ok
test oracle_amp_damp ... ok
test oracle_depol_cx ... ok
test oracle_depol_h ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.01s

Running tests/single_shot.rs (target/debug/deps/single_shot-0cb2b9914ec5be40)

running 2 tests
test noise_with_pauli_kraus_and_readout_is_worker_invariant ... ok
test single_and_many_draws_match_analytic_distribution ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.54s
29 changes: 29 additions & 0 deletions docs/perf/data/p8-00/check-4.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Compiling aleph-qec v0.3.0 (/Users/ex/GitHub/aleph/crates/aleph-qec)
Finished `test` profile [unoptimized + debuginfo] target(s) in 3.19s
Running tests/binomial_interval.rs (target/debug/deps/binomial_interval-1df52106e512bb6d)

running 7 tests
test boundaries_no_evidence_and_invalid_tallies ... ok
test conditional_paired_comparison_does_not_assume_independent_rates ... ok
test large_counts_and_overlap_semantics ... ok
test reference_values ... ok
test exact_small_sample_coverage ... ok
test random_direct_counts_produce_ordered_finite_bounds ... ok
test ordered_monotone_symmetric_bounds ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s

Running tests/bounded_dem_experiment.rs (target/debug/deps/bounded_dem_experiment-98b2a3e0c79ee9be)

running 9 tests
test pymatching_batch_boundaries_and_zero_observables ... ignored, requires numpy + stim + pymatching; set PYMATCHING_PYTHON
test zero_batch_size_is_rejected_even_for_zero_shots ... ok
test huge_requested_count_does_not_materialize_all_shots ... ok
test zero_observables_require_exact_empty_corrections ... ok
test deterministic_mechanisms_produce_exact_tallies ... ok
test batch_bound_tail_and_absolute_stream_are_preserved ... ok
test short_long_empty_or_wrong_width_predictions_are_rejected_in_later_batches ... ok
test default_limit_splits_campaign_and_reports_late_schema_index ... ok
test fixed_seed_matches_full_artifact_path_across_batches_and_workers ... ok

test result: ok. 8 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.08s
8 changes: 8 additions & 0 deletions docs/perf/data/p8-00/check-5.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test_asymmetric_bounds_and_zero_trials (scripts.python.test_qec_threshold_plot.TestThresholdBounds) ... ok
test_bad_counts_and_bounds (scripts.python.test_qec_threshold_plot.TestThresholdBounds) ... ok
test_legacy_half_width_is_not_reinterpreted (scripts.python.test_qec_threshold_plot.TestThresholdBounds) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.003s

OK
3 changes: 3 additions & 0 deletions docs/perf/data/p8-00/cli-smoke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
counts (32 shots, seed=7):
|00⟩ 18 (0.5625)
|11⟩ 14 (0.4375)
44 changes: 44 additions & 0 deletions docs/perf/data/p8-00/saved-receipts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"directory": "docs/perf/data/p8-13/server/cpu-control-run",
"status": "executed",
"exit_code": 0,
"expected_exit_code": 0,
"passed": true
},
{
"directory": "docs/perf/data/p8-13/server/cuda-disabled-run",
"status": "failed",
"exit_code": 2,
"expected_exit_code": 2,
"passed": true
},
{
"directory": "docs/perf/data/p8-13/server/cuda-f32-run",
"status": "executed",
"exit_code": 0,
"expected_exit_code": 0,
"passed": true
},
{
"directory": "docs/perf/data/p8-13/server/cuda-fusion-run",
"status": "contaminated",
"exit_code": 2,
"expected_exit_code": 2,
"passed": true
},
{
"directory": "docs/perf/data/p8-13/server/cuda-fusion-settled",
"status": "executed",
"exit_code": 0,
"expected_exit_code": 0,
"passed": true
},
{
"directory": "docs/perf/data/p8-13/server/cuda-small-run",
"status": "executed",
"exit_code": 0,
"expected_exit_code": 0,
"passed": true
}
]
Loading
Loading