Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add durations of pulse gates from DAG calibrations #7463

Merged
merged 8 commits into from
Jan 22, 2022

Conversation

nbronn
Copy link
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

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

@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: Bugfix Include in the "Fixed" section of the 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: Bugfix Include in the "Fixed" section of the changelog mod: pulse Related to the Pulse module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants