wai-quantum-qec.yml runs the codes, decoders, texts, mitigation and the error-correction call in release on linux, requires each new test by name, holds the texts to their conformance vectors, and checks every feature set the hosts build without warnings; the catalog no longer warns when built without mitigation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
152 lines
8.6 KiB
YAML
152 lines
8.6 KiB
YAML
name: wai-quantum error correction and mitigation
|
|
|
|
# Error correction and mitigation (wai/wai-quantum): the colour codes and
|
|
# their decoder (quantum_color), distance certificates (quantum_distance),
|
|
# the circuit and error-model texts and their conformance vectors
|
|
# (quantum_qec_text, quantum-conformance/qec-text/), correlated matching
|
|
# (quantum_match), sliding-window decoding (quantum_window), the frame
|
|
# simulator's Pauli-target observables and tags (quantum_frame), mitigation
|
|
# in a job (engine::mitigate), twirling and decoupling as compile passes
|
|
# (engine::compile) and the error-correction call every host makes
|
|
# (engine::qec).
|
|
#
|
|
# Every decoder is held to the exhaustive ground truth: every error below
|
|
# half the distance corrected to a trivial residual (at circuit level, every
|
|
# edge set below half the graph's distance). A release build runs the larger
|
|
# distances (colour codes to d = 9, bivariate-bicycle certificates to 144
|
|
# qubits); the crate's suites run the rest in debug elsewhere
|
|
# (wai-energy-receipts.yml).
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/quantum-conformance/qec-text/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-qec.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/quantum-conformance/qec-text/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-qec.yml'
|
|
|
|
jobs:
|
|
relevant:
|
|
name: does this change touch it
|
|
runs-on: linux-arm64
|
|
outputs:
|
|
run: ${{ steps.gate.outputs.run }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- id: gate
|
|
run: |
|
|
set -euo pipefail
|
|
r=$(python3 scripts/pr-touches-paths.py .github/workflows/wai-quantum-qec.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches error correction or mitigation: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
native:
|
|
name: codes, decoders, texts and mitigation · linux, release
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Rust 1.98.0
|
|
shell: bash
|
|
run: |
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
command -v rustup >/dev/null 2>&1 || \
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
|
|
rustup toolchain install 1.98.0 --profile minimal
|
|
rustup default 1.98.0
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
# A module filter is satisfied by any one test of the module, so each
|
|
# new test is required by name to have run and passed.
|
|
- name: Codes, decoders, texts, mitigation and the error-correction call
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --release --features full --lib -- \
|
|
quantum_color:: quantum_distance:: quantum_qec_text:: quantum_window:: quantum_match:: quantum_frame:: \
|
|
engine::mitigate:: engine::qec:: \
|
|
engine::compile::tests::twirling_and_decoupling_keep_the_program \
|
|
engine::compile::tests::every_frame_is_carried_through_its_gate \
|
|
quantum_noisy::tests::steps_reproduce_the_evolution 2>&1 | tee "$RUNNER_TEMP/qec.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]+ passed; 0 failed' "$RUNNER_TEMP/qec.log" || { echo "::error::the error-correction tests did not pass"; exit 1; }
|
|
for t in quantum_color::tests::every_error_below_half_the_distance_is_corrected \
|
|
quantum_color::tests::matching_alone_misses_some_correctable_errors \
|
|
quantum_color::tests::the_triangular_codes_are_colour_codes \
|
|
quantum_color::tests::decoding_is_deterministic_and_distance_helps \
|
|
quantum_color::tests::the_empty_syndrome_needs_no_correction \
|
|
quantum_distance::tests::the_search_agrees_with_brute_force \
|
|
quantum_distance::tests::the_codes_have_their_distances \
|
|
quantum_distance::tests::bivariate_bicycle_codes_have_their_distances \
|
|
quantum_distance::tests::the_lightest_explanation_is_never_heavier_than_the_error \
|
|
quantum_distance::tests::the_symmetric_search_agrees_with_brute_force_on_a_bivariate_bicycle_code \
|
|
quantum_distance::tests::a_tampered_certificate_or_symmetry_is_refused \
|
|
quantum_qec_text::tests::every_target_kind_and_a_tag_round_trip \
|
|
quantum_qec_text::tests::any_layout_reads_to_its_rewritten_form \
|
|
quantum_qec_text::tests::what_does_not_read_is_refused_with_its_line \
|
|
quantum_qec_text::tests::a_model_unrolls_with_its_offsets_tags_and_parts \
|
|
quantum_window::tests::narrow_windows_correct_every_edge_set_below_half_the_distance \
|
|
quantum_window::tests::a_window_over_everything_is_the_batch_decoder \
|
|
quantum_window::tests::narrow_windows_track_the_batch_decoder \
|
|
quantum_window::tests::a_window_too_short_for_the_model_is_refused \
|
|
quantum_match::tests::matching_corrects_every_edge_set_below_half_the_distance \
|
|
quantum_match::tests::decomposed_faults_are_counted \
|
|
quantum_match::tests::the_matched_edges_explain_the_shot \
|
|
quantum_match::tests::correlated_matching_is_not_worse_on_the_same_shots \
|
|
quantum_frame::tests::a_pauli_target_is_flipped_by_what_anticommutes_with_it \
|
|
quantum_frame::tests::pauli_targets_agree_between_sampler_and_model \
|
|
quantum_frame::tests::tags_reach_the_model_and_its_text \
|
|
quantum_frame::tests::the_text_round_trips \
|
|
engine::mitigate::tests::pauli_channels_round_trip_through_rates_and_fidelities \
|
|
engine::mitigate::tests::the_twirled_circuit_is_the_job_where_the_noise_is_pauli \
|
|
engine::mitigate::tests::the_exact_inverse_undoes_the_noise \
|
|
engine::mitigate::tests::each_method_reduces_the_bias_and_states_its_error \
|
|
engine::mitigate::tests::the_trace_with_a_pauli_is_the_expectation \
|
|
engine::mitigate::tests::readout_inversion_recovers_the_distribution \
|
|
engine::mitigate::tests::a_job_carries_its_mitigation_and_its_refusals_name_their_code \
|
|
engine::mitigate::tests::refusals_say_why \
|
|
engine::qec::tests::every_family_reads_and_certifies_its_distance \
|
|
engine::qec::tests::each_decoder_corrects_every_single_error \
|
|
engine::qec::tests::circuit_level_decoding_reads_every_model_form \
|
|
engine::qec::tests::a_threshold_is_measured_and_distance_helps_below_it \
|
|
engine::qec::tests::an_answer_is_sealed_and_a_changed_one_does_not_verify \
|
|
engine::compile::tests::twirling_and_decoupling_keep_the_program \
|
|
engine::compile::tests::every_frame_is_carried_through_its_gate \
|
|
quantum_noisy::tests::steps_reproduce_the_evolution; do
|
|
grep -q "^test $t \.\.\. ok$" "$RUNNER_TEMP/qec.log" || { echo "::error::$t did not run and pass"; exit 1; }
|
|
done
|
|
- name: The circuit and model texts against their conformance vectors
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --release --features full --test qec_text_conformance 2>&1 | tee "$RUNNER_TEMP/text.log"
|
|
grep -q '^test the_conformance_set_holds \.\.\. ok$' "$RUNNER_TEMP/text.log" || { echo "::error::the conformance vectors did not run and hold"; exit 1; }
|
|
# Without warnings: a feature gate that leaves code unreachable or a
|
|
# value unused in one feature set shows here.
|
|
- name: Each feature set the hosts build still builds, without warnings
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
run: |
|
|
set -euo pipefail
|
|
cargo check --locked --no-default-features --features quantum_engine --lib
|
|
cargo check --locked --no-default-features --features quantum_qec --lib
|
|
cargo check --locked --no-default-features --features quantum_engine,quantum_receipt,quantum_qec,quantum_noise --lib
|