Skip to content

bench(tableau): compare padded layouts with QuantumClifford - #226

Draft
Krastanov wants to merge 6 commits into
codex/traits-2-implfrom
Krastanov/codex/tableau-layout-study
Draft

Krastanov wants to merge 6 commits into
codex/traits-2-implfrom
Krastanov/codex/tableau-layout-study

Conversation

@Krastanov

@Krastanov Krastanov commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

This was a quick and dirty benchmark I wanted to run to look at various bitpacking strategies. I have not actually validated myself that any of this is done correctly, please disregard for the moment.

AI slop below:

PR 204 already pads each tableau major to 256 bits. This adds a reproducible comparison of its storage and public API with QuantumClifford.jl and a Rust prototype using 8/16/32/64/128-bit words and both packing axes. Production storage is unchanged.

The harness checks common deterministic inputs against an independent Pauli reference, rejects missing configurations, records unsupported cases, and runs workers sequentially across 16 sizes and three process launches. The report includes 32,400 timing samples, 1,170 additional arbitrary-input validation cases, raw results, plots, source/executable hashes and a replayable Julia dependency lock.

On the measured Apple M5 Pro at 1,024 qubits:

  • Public ppvm CNOT: 41.55 ns; best tested QuantumClifford: 5,358 ns.
  • Contiguous row multiplication: ppvm kernel 15.62 ns; QuantumClifford 8.80 ns.
  • Public ppvm row multiplication: 246.8 µs per row; internal batching including conversion: 135.65 ns per row.

The results support keeping generator-packed columns, amortizing row conversion, and evaluating QuantumClifford's phase kernel independently. Compact padding helps the experimental small-tableau cases; larger-tableau gains are modest and mixed. QC fastcolumn transposes words, while ppvm columns pack generator bits; the report explains this distinction and the comparison limits.

Full report · Run instructions

Validation: full Rust workspace tests (1,938 passed, three ignored), focused tableau and candidate tests, workspace Clippy/check, Rust formatting, Python lint/format, all benchmark checks, and exact Julia dependency replay. Local Rust is 1.96.0. The first upstream CI run uses newer Clippy and fails on chunks_exact_to_as_chunks in unchanged crates/stim-parser/src/pipeline/lower.rs:440; that unrelated parser code is outside this study.

Stacked on #204, pinned at 3befaf1b597033138d6c1bab394b967b09cd57fb. QuantumClifford is pinned at 1e553b25fdf12c67b55ccedfbc2f48f4dea78fcc.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Thanks for opening your first pull request against PPVM!

A quick note on contribution terms: by submitting this PR you
agree that your contribution is licensed under the
Apache License 2.0
and that you accept the
PPVM Contributor License Agreement.
Please skim those before a maintainer reviews — opening this PR
counts as your acceptance.

A few things that will speed up review:

  • Read CONTRIBUTING.md
    for the workflow, build commands, and style notes.
  • Run prek run --all-files locally; CI runs the same checks.
  • Use Conventional Commits
    for commit messages.

We'll get to your PR as soon as we can. Thanks for contributing!

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://QuEraComputing.github.io/ppvm/pr-preview/pr-226/

Built to branch gh-pages at 2026-09-25 06:01 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@Krastanov
Krastanov marked this pull request as ready for review September 25, 2026 05:57
@Krastanov
Krastanov marked this pull request as draft September 25, 2026 06:00

This branch has not been deployed

No deployments
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