Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relabel in adaptive conditional block should be disallowed #2155

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Feb 4, 2025

This adds a check at codegen time if a qubit relabel is occurring in an adaptive conditional. This will ensure we don't generate QIR with incorrect qubit IDs. The change ties the error to the dynamic qubit capability because if/when we support dynamic qubits we'll need to update relabel to become an intrinsic that is supported by backends to do a runtime relabel of qubit identifiers.

Fixes #2152

This adds a check at codegen time if a qubit relabel is occurring in an adaptive conditional. This will ensure we don't generate QIR with incorrect qubit IDs. The change ties the error to the dynamic qubit capability because if/when we support dynamic qubits we'll need to update relabel to become an intrinsic that is supported by backends to do a runtime relabel of qubit identifiers.

Fixes #2152
@swernli swernli requested a review from idavis as a code owner February 4, 2025 19:17
@swernli swernli added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit e24e690 Feb 4, 2025
18 checks passed
@swernli swernli deleted the swernli/issue2152 branch February 4, 2025 22:14
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.

Relabel in adaptive conditional block should be disallowed
3 participants