-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
marginal_counts is broken for pulse results #6430
Comments
What happens if you do Of course, that's independent of this bug though we should fix the function for pulse results too. |
Thanks, Matthew. This works but as you noted there still is a 🐛
…On Mon, May 17, 2021, 6:23 PM Matthew Treinish ***@***.***> wrote:
What happens if you do marginal_counts(job.result.get_counts()),
indices=[0])? That's my normal workflow for using marginal_counts()
because using it with results ends up deepcopying and making it too slow.
Of course, that's independent of this bug though we should fix the
function for pulse results too.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6430 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL3LNVE62QMVGM6UBBL5WLTOGCORANCNFSM45BHEM7A>
.
|
…s if creg_sizes is an attribute in the object and executes related code, only if it is.
I am new to quantum computing and would love to work on this issue. |
Thanks @a-freakish! Assigning to you 😄 |
This issue already has an open pr in progress: #6486 |
The referenced pr #6486 appears to be closed (b/c no further work done) ? Should someone pick up this PR and finish it? |
yes please @chetmurthy ! Remember to respect the @rithikaadiga's authorship in branch off their code. Shall I assign you? |
Luciano, I'm new to the org, and to QC. But this seems sufficiently "just a software problem" that, yes, I think I should have a go at it. You can mark me down for working on it. |
) * fix marginal_counts (which failed on pulse backend) this is code copied from @rithikaadiga 's branch, but it's so small I just copied it, b/c didn't want to deal with applying all the changes since in the main trunk. * add release-note * Update qiskit/result/utils.py Co-authored-by: Luciano Bello <[email protected]> * Update releasenotes/fix-marginal_counts-on-pulse-backend.yaml Co-authored-by: Luciano Bello <[email protected]> * Update releasenotes/fix-marginal_counts-on-pulse-backend.yaml Co-authored-by: Luciano Bello <[email protected]> * fix formatting (black) Co-authored-by: rithikaadiga <[email protected]> * minor cleanup to suggested fix. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch fix-marginal_counts-on-pulse-backend # Your branch is up to date with 'my-fork/fix-marginal_counts-on-pulse-backend'. # # Changes to be committed: # modified: qiskit/result/utils.py # * Update releasenotes/fix-marginal_counts-on-pulse-backend.yaml Co-authored-by: Luciano Bello <[email protected]> * Update releasenotes/fix-marginal_counts-on-pulse-backend.yaml Co-authored-by: Luciano Bello <[email protected]> * Update test/python/result/test_result.py Co-authored-by: Luciano Bello <[email protected]> * redo test per suggestion from @1ucian0 # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch fix-marginal_counts-on-pulse-backend # Your branch is up to date with 'my-fork/fix-marginal_counts-on-pulse-backend'. # # Changes to be committed: # modified: test/python/result/test_result.py # * Update test/python/result/test_result.py Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: rithikaadiga <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Information
What is the current behavior?
marginal_counts
is broken for pulse jobs. ISteps to reproduce the problem
Gives output
What is the expected behavior?
Suggested solutions
It seems like it is assuming
creg
will be present in the header. This is not true for pulse jobs which do not have classical registers and therefore this field won't be present. The fix should make marginal_counts work when the header is empty.The text was updated successfully, but these errors were encountered: