Skip to content

Fix barrier unrolling to preserve multi-qubit barrier statements#295

Merged
TheGupta2012 merged 5 commits intomainfrom
feat/composer
Mar 11, 2026
Merged

Fix barrier unrolling to preserve multi-qubit barrier statements#295
TheGupta2012 merged 5 commits intomainfrom
feat/composer

Conversation

@ryanhill1
Copy link
Copy Markdown
Member

@ryanhill1 ryanhill1 commented Mar 5, 2026

Summary

  • Barriers now unroll as a single multi-qubit statement (e.g. barrier q[0], q[1], q[2]) instead of splitting into individual per-qubit barriers
  • Fixed physical qubit handling in the barrier consolidation path to iterate over all qubits instead of only the first

Summary by CodeRabbit

  • Bug Fixes
    • Barrier handling now preserves multi-qubit barrier statements as single directives (including ranges and mixed qubit specs) instead of splitting them into per-qubit barriers.
  • Tests
    • Updated and added tests to expect consolidated multi-qubit barrier output across QASM2/QASM3, device-qubit mapping, range unrolling, and visualization rendering.

Loading
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.

Minimal QASM-based circuit composer

3 participants