feat: cross-architecture comparison profiling#33
Merged
Conversation
Dispatch logical_error_rate exponent by CodeType: surface/Steane use (d+1)/2, color code (4.8.8) and qLDPC use d/2 per literature refs. Relax code distance validation for qLDPC (even d >= 2 allowed). Add reference hardware models for color code d=9 and qLDPC BB d=12.
New comparison module runs Monte Carlo against multiple hardware models on the same circuit and produces pairwise runtime, qubit count, and space-time product comparisons with relative diffs and winners.
Wire up the Compare CLI subcommand to run_comparison, accepting 2+ hardware model paths and printing per-model summaries with pairwise relative diffs and space-time winners.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Compare a circuit's execution profile across multiple QEC architectures (surface code, color code, qLDPC, Steane) with a single CLI command.
Why
Pirx could only profile one hardware model at a time. Evaluating architecture trade-offs (e.g. surface code d=17 vs qLDPC BB d=12) required separate runs and manual comparison. This adds first-class support for side-by-side profiling with pairwise diffs, making architecture selection data-driven.
How
Three layers, one per crate:
logical_error_rate()now dispatches the suppression exponent byCodeType— surface/Steane use(d+1)/2, color code (4.8.8) and qLDPC used/2per published thresholds. Validation relaxed for qLDPC to accept even distances (e.g. BB [[144,12,12]] has d=12). Two reference TOML models added (color code d=9, qLDPC Gross d=12).comparisonmodule runs Monte Carlo on the same circuit against N hardware models, then produces per-model summaries and pairwise relative diffs (runtime, qubit count, space-time product) with a winner per pair.pirx compare --hw model1.toml --hw model2.toml [--hw ...]subcommand wiring.Testing
make cipasses locally (fmt + clippy + test + audit)Checklist
unwrap()/expect()in production code