Skip to content

Add durations of pulse gates from DAG calibrations#7463

Merged
mergify[bot] merged 8 commits into
Qiskit:mainfrom
nbronn:param-gates-for-dd
Jan 22, 2022
Merged

Add durations of pulse gates from DAG calibrations#7463
mergify[bot] merged 8 commits into
Qiskit:mainfrom
nbronn:param-gates-for-dd

Conversation

@nbronn
Copy link
Copy Markdown
Contributor

@nbronn nbronn commented Jan 3, 2022

Summary

The scheduling passes of the transpiler need to be informed of the durations of the gates. In the case of pulse gates, these durations need to be added from dag.calibrations to the node.op. The following PR fixes this by checking to see if a calibration exists in dag.calibrations for node.op.name and if so adds node.op.duration from it.

Details and comments

Ideally I would have used dag.has_calibration_for(node) to check for the existence of a calibration, but found the method did not always work. Perhaps I will raise this in a separate issue.

This additionally fixes an issue where a bound ParameterExpression is passed to a calibration builder by casting it to a float.

@nbronn nbronn requested a review from a team as a code owner January 3, 2022 19:08
@coveralls
Copy link
Copy Markdown

coveralls commented Jan 5, 2022

Pull Request Test Coverage Report for Build 1731452580

  • 6 of 11 (54.55%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.005%) to 83.145%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/scheduling/alap.py 3 4 75.0%
qiskit/transpiler/passes/scheduling/asap.py 0 4 0.0%
Totals Coverage Status
Change from base Build 1731292000: -0.005%
Covered Lines: 52005
Relevant Lines: 62547

💛 - Coveralls

Comment thread qiskit/transpiler/passes/scheduling/alap.py Outdated
@kdk kdk added the automerge label Jan 21, 2022
@kdk kdk added this to the 0.20 milestone Jan 21, 2022
@kdk kdk added the mod: pulse Related to the Pulse module label Jan 21, 2022
@mergify mergify Bot merged commit 27637b6 into Qiskit:main Jan 22, 2022
@itoko itoko mentioned this pull request Feb 10, 2022
1 task
@jakelishman jakelishman added the Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. mod: pulse Related to the Pulse module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants