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

Cast ParameterExpression to float in RZXBuilder and RZXCalibrationBuilderNoEcho #8965

Merged
merged 8 commits into from
Oct 25, 2022

Conversation

nbronn
Copy link
Contributor

@nbronn nbronn commented Oct 19, 2022

Summary

Fixes Issue 8963.

Details and comments

Explicitly casts ParameterExpression to float before passing to numpy.isclose() method that requires safe type checking.

@nbronn nbronn requested a review from a team as a code owner October 19, 2022 23:30
@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 the following people are requested to review this:

  • @Qiskit/terra-core

@mtreinish mtreinish added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Oct 19, 2022
@coveralls
Copy link

coveralls commented Oct 19, 2022

Pull Request Test Coverage Report for Build 3323154536

  • 4 of 8 (50.0%) changed or added relevant lines in 1 file are covered.
  • 35 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.05%) to 84.364%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/calibration/rzx_builder.py 4 8 50.0%
Files with Coverage Reduction New Missed Lines %
src/optimize_1q_gates.rs 1 95.16%
src/sabre_swap/mod.rs 1 95.3%
qiskit/extensions/quantum_initializer/squ.py 2 79.78%
src/sabre_swap/neighbor_table.rs 7 69.23%
src/results/marginalization.rs 24 74.71%
Totals Coverage Status
Change from base Build 3318669917: -0.05%
Covered Lines: 61674
Relevant Lines: 73105

💛 - Coveralls

@mtreinish mtreinish added this to the 0.22.1 milestone Oct 20, 2022
@mtreinish mtreinish self-assigned this Oct 25, 2022
@mtreinish mtreinish changed the title cast ParameterExpression to float in rzx_builder.py Cast ParameterExpression to float in rzx_builder.py Oct 25, 2022
@mtreinish mtreinish changed the title Cast ParameterExpression to float in rzx_builder.py Cast ParameterExpression to float in RZXBuilder and RZXCalibrationBuilderNoEcho Oct 25, 2022
@mergify mergify bot merged commit de8e4dd into Qiskit:main Oct 25, 2022
mergify bot pushed a commit that referenced this pull request Oct 25, 2022
…lderNoEcho (#8965)

* committing changes but still debugging

* commiting to check necessary changes

* added explicit casting to get_calibration in rzx_builder.py in two places

* found a linting error in alap.py

* Remove redundant float cast

Co-authored-by: Matthew Treinish <[email protected]>
(cherry picked from commit de8e4dd)
mergify bot added a commit that referenced this pull request Oct 25, 2022
…lderNoEcho (#8965) (#8994)

* committing changes but still debugging

* commiting to check necessary changes

* added explicit casting to get_calibration in rzx_builder.py in two places

* found a linting error in alap.py

* Remove redundant float cast

Co-authored-by: Matthew Treinish <[email protected]>
(cherry picked from commit de8e4dd)

Co-authored-by: nick bronn <[email protected]>
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 stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants