Skip to content

pub_result.data.meas.get_counts() should be pub_result.data.c.get_counts() #2874

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

Closed
1 of 5 tasks
lsunol opened this issue Mar 27, 2025 · 1 comment
Closed
1 of 5 tasks

Comments

@lsunol
Copy link

lsunol commented Mar 27, 2025

URL to the relevant documentation

https://docs.quantum.ibm.com/migration-guides/qiskit-runtime-examples#sampler-algorithm

Select all that apply

  • typo
  • code bug
  • out-of-date content
  • broken link
  • other

Describe the fix.

I'm quite new into the qiskit library, but I end up in this tutorial in how to migrate for old backend.run to the samplers new version of it and find out it crashes when trying to retreive the pub_result.data.meas.get_counts() saying "meas" does not exist in data object.
I then debugged the code and found out that there is a "c" object that actually seems to contain what it was expected to be found at "meas", not sure why, but it seems.

@lsunol lsunol added bug 🐛 content 📄 needs triage 🤔 this issue needs to be prioritized by the docs team labels Mar 27, 2025
@javabster
Copy link
Collaborator

thanks for the feedback @lsunol! We have found a few people are confused with this aspect of the pub result structure, and we have an issue open here to try to improve them: #2650

@javabster javabster removed the needs triage 🤔 this issue needs to be prioritized by the docs team label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants