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

Fix improper handling of BindingsArray in EstimatorPub.coerce() #11871

Merged

Conversation

ihincks
Copy link
Contributor

@ihincks ihincks commented Feb 23, 2024

Summary

There is a bug in EstimatorPub.coerce() where if an actual BindingsArray is passed in the third slot, then it attempts to send {params: bindings_array} to BindingsArray.coerce rather than bindings_array, which raises a ValueError. This PR fixes this behaviour by passing the bindings array through.

Details and comments

Since Neither BindingsArray not EstimatorPub are (currently) part of the public interface, this is a low impact bug for non-developers.

@ihincks ihincks 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 Feb 23, 2024
@ihincks ihincks added this to the 1.0.2 milestone Feb 23, 2024
@ihincks ihincks requested review from a team as code owners February 23, 2024 14:52
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core
  • @ajavadia
  • @ikkoham
  • @levbishop
  • @t-imamichi

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8020960195

Details

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 24 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 89.259%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 91.18%
crates/qasm2/src/parse.rs 18 96.23%
Totals Coverage Status
Change from base Build 8019880275: -0.03%
Covered Lines: 58880
Relevant Lines: 65965

💛 - Coveralls

Copy link
Member

@t-imamichi t-imamichi left a comment

Choose a reason for hiding this comment

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

LGTM

@t-imamichi t-imamichi added this pull request to the merge queue Feb 26, 2024
Merged via the queue into Qiskit:main with commit aba7c0f Feb 26, 2024
12 checks passed
mergify bot pushed a commit that referenced this pull request Feb 26, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 26, 2024
@ihincks ihincks deleted the primitives/fix-estimator-pub-coerce2 branch February 26, 2024 13:42
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