Skip to content

Added duration, stretch, delay and box type support#231

Merged
TheGupta2012 merged 6 commits intoqBraid:mainfrom
vinayswamik:feature/circuit-timing-operations
Jul 28, 2025
Merged

Added duration, stretch, delay and box type support#231
TheGupta2012 merged 6 commits intoqBraid:mainfrom
vinayswamik:feature/circuit-timing-operations

Conversation

@vinayswamik
Copy link
Copy Markdown
Collaborator

@vinayswamik vinayswamik commented Jul 16, 2025

Summary of changes

Added duration, stretch, delay and box support

  • Added time_unit attribute to the Variable class to associate duration variables with their time units.
  • Updated the loads function to accept device_cycle_time for better handling of duration calculations.
  • Implemented error handling for casting operations involving duration types in the QasmVisitor.
  • Added tests for duration variable declarations, assignments, and error scenarios related to casting.
  • Added support to Stretch and DelayInstruction operations.
  • Introduced the Box context in the QASM visitor and updated scope checking.
  • Implemented validation for Box duration and total delay duration.
  • Updated gate mappings to include 'nop' operation.

Closes #90
Closes #91
Closes #92
Closes #93
Closes #94

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vinayswamik vinayswamik changed the title Added Duration type support Added duration, stretch, delay type support Jul 17, 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.

Changes look good overall @vinayswamik ! Gave some suggestions about the refactoring of code.

@vinayswamik vinayswamik requested a review from TheGupta2012 July 17, 2025 18:47
@vinayswamik vinayswamik changed the title Added duration, stretch, delay type support Added duration, stretch, delay and box type support Jul 18, 2025
@vinayswamik vinayswamik requested a review from TheGupta2012 July 18, 2025 11:28
@vinayswamik vinayswamik force-pushed the feature/circuit-timing-operations branch from 3583e27 to 30e03f2 Compare July 18, 2025 11:47
- code restructured
- updated test cases
- code rebased
@vinayswamik vinayswamik reopened this Jul 18, 2025
@TheGupta2012
Copy link
Copy Markdown
Member

Gave some minor comments @vinayswamik , it should be good to merge post that. Also, can you add a small working example in the CHANGELOG?

Copy link
Copy Markdown
Member

@ryanhill1 ryanhill1 left a comment

Choose a reason for hiding this comment

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

…le is not constant when used in a local scope.
@vinayswamik vinayswamik requested a review from TheGupta2012 July 26, 2025 06:29
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 d7e558c into qBraid:main Jul 28, 2025
21 checks passed
@vinayswamik vinayswamik deleted the feature/circuit-timing-operations branch July 30, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants