Skip to content

enh: expose qLDPC resource model as reviewer-runnable CLI path (#478) - #480

Draft
arniber21 wants to merge 1 commit into
docs/fix-stale-non-clifford-claimsfrom
enh/qldpc-cli-path-478
Draft

enh: expose qLDPC resource model as reviewer-runnable CLI path (#478)#480
arniber21 wants to merge 1 commit into
docs/fix-stale-non-clifford-claimsfrom
enh/qldpc-cli-path-478

Conversation

@arniber21

Copy link
Copy Markdown
Owner

The qLDPC workload IR + resource model landed in #285 (quon_qec/src/qldpc.rs)
with CodeFamily::HighRateQldpcLike sizing (architecture_model.md §10.3), but
was reachable only via cargo test fixtures — never from quonc. A reviewer
could run surface/repetition artifacts end-to-end but not produce a
high_rate_qldpc_like report themselves. This surfaces it as a standalone CLI
path that skips the compile pipeline entirely (no source file or backend
target required).

Two modes, both emitting JSON or Markdown (path-extension-selected) with the
analytic evidence labels (ADR-0020):

  • Graph mode: --qldpc-graph loads a parity-check graph, validates it,
    and runs QldpcResourceEstimate::estimate — emitting n_data, n_checks,
    distance, max/avg check weight, edge count, movement pressure, peak atoms,
    estimated cycles/round.
  • Net-rate sizing mode: --qldpc-net-rate n/d computes atoms_per_logical =
    ceil(d/n) via the existing family formula, mirroring the [[144,12,12]]
    architecture-model example (rate 1/24, 12 logical -> 24 atoms/logical, 288
    physical).

Adds:

  • 6 CLI args (--qldpc-graph, --qldpc-net-rate, --emit-qldpc-report,
    --qldpc-rounds, --qldpc-grid-width, --qldpc-logical-qubits) under a new
    help heading.
  • examples/na_qec/qldpc_5qubit.json: checked-in toy [[5,1,3]] parity-check
    graph (the toy_5qubit_graph() constructor serialized).
  • quonc/tests/qldpc_resource_model.rs: 8 CLI tests (graph estimate, rounds
    scaling, net-rate sizing, markdown output, mutual-exclusivity, missing
    emit flag, bad format, missing file).
  • Runnable-command notes in architecture_model.md §10.3,
    qldpc_workload_ir.md, website architecture/na-model.md, and the README CLI
    usage section.

Verified: all 8 qldpc tests pass; na_stats_emit (7) pass; clippy clean;
cargo fmt clean; assert-validation-docs + assert-docs-corpus pass.

The qLDPC workload IR + resource model landed in #285 (quon_qec/src/qldpc.rs)
with CodeFamily::HighRateQldpcLike sizing (architecture_model.md §10.3), but
was reachable only via cargo test fixtures — never from quonc. A reviewer
could run surface/repetition artifacts end-to-end but not produce a
high_rate_qldpc_like report themselves. This surfaces it as a standalone CLI
path that skips the compile pipeline entirely (no source file or backend
target required).

Two modes, both emitting JSON or Markdown (path-extension-selected) with the
analytic evidence labels (ADR-0020):

- Graph mode: --qldpc-graph <json> loads a parity-check graph, validates it,
  and runs QldpcResourceEstimate::estimate — emitting n_data, n_checks,
  distance, max/avg check weight, edge count, movement pressure, peak atoms,
  estimated cycles/round.
- Net-rate sizing mode: --qldpc-net-rate n/d computes atoms_per_logical =
  ceil(d/n) via the existing family formula, mirroring the [[144,12,12]]
  architecture-model example (rate 1/24, 12 logical -> 24 atoms/logical, 288
  physical).

Adds:
- 6 CLI args (--qldpc-graph, --qldpc-net-rate, --emit-qldpc-report,
  --qldpc-rounds, --qldpc-grid-width, --qldpc-logical-qubits) under a new
  help heading.
- examples/na_qec/qldpc_5qubit.json: checked-in toy [[5,1,3]] parity-check
  graph (the toy_5qubit_graph() constructor serialized).
- quonc/tests/qldpc_resource_model.rs: 8 CLI tests (graph estimate, rounds
  scaling, net-rate sizing, markdown output, mutual-exclusivity, missing
  emit flag, bad format, missing file).
- Runnable-command notes in architecture_model.md §10.3,
  qldpc_workload_ir.md, website architecture/na-model.md, and the README CLI
  usage section.

Verified: all 8 qldpc tests pass; na_stats_emit (7) pass; clippy clean;
cargo fmt clean; assert-validation-docs + assert-docs-corpus pass.
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quon Ready Ready Preview Aug 5, 2026 8:13am

Copy link
Copy Markdown
Owner Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

1 participant