Skip to content

Fix bug in BindingsArray.__getitem__()#11800

Merged
chriseclectic merged 1 commit into
Qiskit:mainfrom
ihincks:primitives/fix-bindings-array-getitem
Feb 14, 2024
Merged

Fix bug in BindingsArray.__getitem__()#11800
chriseclectic merged 1 commit into
Qiskit:mainfrom
ihincks:primitives/fix-bindings-array-getitem

Conversation

@ihincks
Copy link
Copy Markdown
Contributor

@ihincks ihincks commented Feb 14, 2024

Summary

This PR fixes a critical bug in BindingsArray.__getitem__() that causes this method not to work at all, and adds tests for it.

Details and comments

The tests that used to test the behaviour of this function were somehow removed in the process of porting this class into Qiskit from a prototype library. This bug was introduced by #11642.

@ihincks ihincks requested review from a team as code owners February 14, 2024 19:51
@qiskit-bot
Copy link
Copy Markdown
Collaborator

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

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

@chriseclectic chriseclectic added this to the 1.0.0 milestone Feb 14, 2024
@mtreinish mtreinish added stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge. priority: high Changelog: None Do not include in the GitHub Release changelog. labels Feb 14, 2024
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7906614575

Details

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 11 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 89.229%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.81%
crates/qasm2/src/lex.rs 4 92.44%
crates/qasm2/src/parse.rs 6 97.62%
Totals Coverage Status
Change from base Build 7906377610: 0.02%
Covered Lines: 58845
Relevant Lines: 65948

💛 - Coveralls

@chriseclectic chriseclectic added this pull request to the merge queue Feb 14, 2024
Merged via the queue into Qiskit:main with commit d603f83 Feb 14, 2024
mergify Bot pushed a commit that referenced this pull request Feb 14, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Feb 14, 2024
(cherry picked from commit d603f83)

Co-authored-by: Ian Hincks <ian.hincks@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog. stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants