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 marginal_counts on memory with non-zero indices #8047

Merged
merged 2 commits into from
May 11, 2022

Conversation

jakelishman
Copy link
Member

Summary

The marginalisation could previously return the empty string instead of
"0" if the given indices were too high for a given memory slot,
causing a later error in binary-to-hex conversion.

Details and comments

Fix #8044.

@jakelishman jakelishman 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 May 11, 2022
@jakelishman jakelishman added this to the 0.20.2 milestone May 11, 2022
@jakelishman jakelishman requested a review from a team as a code owner May 11, 2022 11:05
@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

The marginalisation could previously return the empty string instead of
`"0"` if the given indices were too high for a given memory slot,
causing a later error in binary-to-hex conversion.
@coveralls
Copy link

coveralls commented May 11, 2022

Pull Request Test Coverage Report for Build 2307080453

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.376%

Totals Coverage Status
Change from base Build 2306697285: 0.0%
Covered Lines: 54497
Relevant Lines: 64588

💛 - Coveralls

Copy link
Contributor

@taalexander taalexander left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you 😄

@jakelishman jakelishman added the on hold Can not fix yet label May 11, 2022
@mtreinish mtreinish removed the on hold Can not fix yet label May 11, 2022
@jakelishman
Copy link
Member Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented May 11, 2022

refresh

✅ Pull request refreshed

@jakelishman
Copy link
Member Author

I still haven't quite figured out how to make the mergify bot update its statuses correctly. Probably it just needs to run through the test suite again.

@mergify mergify bot merged commit 9374449 into Qiskit:main May 11, 2022
mergify bot pushed a commit that referenced this pull request May 11, 2022
The marginalisation could previously return the empty string instead of
`"0"` if the given indices were too high for a given memory slot,
causing a later error in binary-to-hex conversion.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9374449)
mergify bot added a commit that referenced this pull request May 11, 2022
The marginalisation could previously return the empty string instead of
`"0"` if the given indices were too high for a given memory slot,
causing a later error in binary-to-hex conversion.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9374449)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
@jakelishman jakelishman deleted the fix-marginal-memory-zeros branch May 11, 2022 19:04
ajavadia pushed a commit to ajavadia/qiskit that referenced this pull request May 31, 2022
The marginalisation could previously return the empty string instead of
`"0"` if the given indices were too high for a given memory slot,
causing a later error in binary-to-hex conversion.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

marginal_counts cannot marginalize over previously Result object in main branch
5 participants