Skip to content

Fixed: Duplicate qubits not detected in function call & Error in function call with aliased qubit#260

Merged
TheGupta2012 merged 5 commits intomainfrom
bugs
Sep 4, 2025
Merged

Fixed: Duplicate qubits not detected in function call & Error in function call with aliased qubit#260
TheGupta2012 merged 5 commits intomainfrom
bugs

Conversation

@vinayswamik
Copy link
Copy Markdown
Collaborator

@vinayswamik vinayswamik commented Sep 3, 2025

…ocessor

Summary of changes

Enhance QASM validation by moving unique qubit check to subroutine processor

  • Add validate_unique_qubits method to Qasm3SubroutineProcessor for improved qubit uniqueness validation across function calls.
  • Remove the previous implementation from Qasm3Validator.

Enhance alias handling in QASM by including alias register sizes for target qubit resolution and improving duplicate qubit validation for aliased arguments.
Add a test case to validate dynamic indexed qubit aliases as function arguments.

Closes #80
Closes #108

@vinayswamik vinayswamik requested review from TheGupta2012 and removed request for TheGupta2012 September 3, 2025 02:37
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…target qubit resolution and improving duplicate qubit validation for aliased arguments.
@vinayswamik vinayswamik changed the title Fixed: Duplicate qubits not detected in function call Fixed: Duplicate qubits not detected in function call & Error in function call with aliased qubit Sep 3, 2025
Copy link
Copy Markdown
Member

@TheGupta2012 TheGupta2012 left a comment

Choose a reason for hiding this comment

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

Lgtm

@TheGupta2012 TheGupta2012 merged commit 83ee2e9 into main Sep 4, 2025
22 checks passed
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.

[BUG] Error in function call with aliased qubit [BUG] Duplicate qubits not detected in function call

3 participants