Skip to content

[STIM] Improve error messages - #3667

Open
João Boechat (joao-boechat) wants to merge 6 commits into
mainfrom
joaoboechat/stim-improve-error-messages
Open

[STIM] Improve error messages#3667
João Boechat (joao-boechat) wants to merge 6 commits into
mainfrom
joaoboechat/stim-improve-error-messages

Conversation

@joao-boechat

@joao-boechat João Boechat (joao-boechat) commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR improves Stim compiler validation and diagnostics, passing the correct spans for argument related errors and adding repeated qubit errors.

Changes

  • Rejects repeated qubits within pair and triple target groups, highlighting the duplicate target instead of the full instruction.
  • Uses argument-level spans for invalid angles and probabilities, unsupported arguments, and incorrect argument counts; excess-argument errors now highlight only the unexpected values.
  • Validates individual probabilities and their total before constructing noise tables, producing instruction-specific errors and removing redundant internal validation paths.

@joao-boechat
João Boechat (joao-boechat) changed the base branch from main to joaoboechat/finalize-non-clifford-support August 29, 2026 00:12
@joao-boechat
João Boechat (joao-boechat) marked this pull request as ready for review August 31, 2026 18:30
Comment thread source/compiler/stim_compiler/src/qir/tests/noise_channels.rs
Comment thread source/compiler/stim_compiler/src/qir/tests/noise_channels.rs Outdated
Comment thread source/compiler/stim_compiler/src/parser.rs
Comment thread source/compiler/stim_compiler/src/qir.rs
Comment thread source/compiler/stim_compiler/src/qir.rs
Base automatically changed from joaoboechat/finalize-non-clifford-support to main September 1, 2026 18:12
@joao-boechat
João Boechat (joao-boechat) force-pushed the joaoboechat/stim-improve-error-messages branch from 7f55527 to 36737bd Compare September 2, 2026 19:26
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.

2 participants