Skip to content

Unify BoxDuration and Delay duration representation#15624

Open
arnavk23 wants to merge 5 commits intoQiskit:mainfrom
arnavk23:fix-15377-unify-box-delay-duration
Open

Unify BoxDuration and Delay duration representation#15624
arnavk23 wants to merge 5 commits intoQiskit:mainfrom
arnavk23:fix-15377-unify-box-delay-duration

Conversation

@arnavk23
Copy link
Contributor

Renamed BoxDuration to InstructionDuration to make it a general-purpose type that can be used for both Box and Delay operations. The new type represents a duration value that can be either a concrete Duration or a delayed-resolution expression (Expr).

Fixes #15377

Renamed BoxDuration to InstructionDuration to make it a general-purpose
type that can be used for both Box and Delay operations. The new type
represents a duration value that can be either a concrete Duration or
a delayed-resolution expression (Expr).

Added InstructionDuration::from_delay_unit_and_param() method to convert
from Delay's representation (DelayUnit + Param) to the unified
InstructionDuration representation.

All usages of BoxDuration across the codebase have been updated to use
InstructionDuration instead.

Fixes Qiskit#15377
@arnavk23 arnavk23 requested a review from a team as a code owner January 29, 2026 12:10
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jan 29, 2026
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@arnavk23 arnavk23 marked this pull request as draft January 29, 2026 12:13
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21478368130

Details

  • 27 of 66 (40.91%) changed or added relevant lines in 5 files are covered.
  • 19 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.03%) to 87.929%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/circuit/src/circuit_instruction.rs 10 12 83.33%
crates/circuit/src/dag_circuit.rs 11 13 84.62%
crates/circuit/src/operations.rs 2 37 5.41%
Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/symbol_expr.rs 3 72.87%
crates/qasm2/src/lex.rs 4 92.29%
crates/qasm2/src/parse.rs 12 97.15%
Totals Coverage Status
Change from base Build 21468038257: -0.03%
Covered Lines: 100005
Relevant Lines: 113734

💛 - Coveralls

@arnavk23 arnavk23 marked this pull request as ready for review January 29, 2026 17:37
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @mtreinish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Unify BoxDuration and the duration of Delay

3 participants