Reject NaN RZZ angles during primitive validation - #3069
Open
sankalpsthakur wants to merge 1 commit into
Open
Conversation
sankalpsthakur
force-pushed
the
fix-2452-reject-nan-rzz
branch
3 times, most recently
from
July 23, 2026 05:09
6cd785e to
cbb89b5
Compare
Evaluate parameter expressions before validating their effective RZZ angle so algebraically eliminated NaN inputs remain valid.
sankalpsthakur
force-pushed
the
fix-2452-reject-nan-rzz
branch
from
July 28, 2026 10:09
cbb89b5 to
ea62061
Compare
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.
Summary
Reject fixed and parameterized
RZZangles whose evaluated value isNaN. This keeps invalid input inside the existingIBMInputValueErrorvalidation path instead of accepting a fixed NaN or leaking a raw Qiskit binding error.Details and comments
bind_allbefore validating the resulting angleValidation:
python -m pytest -q test/unit/test_sampler.py: 43 passed, 3 subtests passedruff checkon touched Python files: passedruff format --checkon touched Python files: passedmypy --no-incrementalon touched Python files: passedgit diff --check: passedWhy this matters
NaN gate angles should fail fast at validation time with a clear error, not propagate into backend execution or produce undefined results on real hardware.
Related
Fixes #2452
AI/LLM disclosure