Skip to content

Add some notes about shots and precision#5249

Open
jyu00 wants to merge 2 commits into
Qiskit:mainfrom
jyu00:shots-precision
Open

Add some notes about shots and precision#5249
jyu00 wants to merge 2 commits into
Qiskit:mainfrom
jyu00:shots-precision

Conversation

@jyu00

@jyu00 jyu00 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Per user feedback, this PR adds a note saying an error is raised if the primitive doesn't know how to divide shots among twirls when twirling is enabled.

Also closes #5082

@jyu00 jyu00 requested a review from a team June 11, 2026 13:13
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@qiskit-bot

Copy link
Copy Markdown
Contributor

One or more of the following people are relevant to this code:

"Although precision specified in the PUB and in `run` have higher precedence, the job would fail if `twirling` is enabled and the product of `num_randomizations` and `shots_per_randomization` is smaller than the shots needed to achieve the precision. In this scenario `EstimatorV2` does not know how to allocate the shots among the specified `num_randomizations`.\n",
"</Admonition>\n",
"\n",
"<Admonition type=\"note\">\n",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just confirming that you want two admonition boxes in a row - it's fine if intentional

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept them separate only because they refer to different things, but I don't feel too strongly either way. Do we usually use 1 box to group these together?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If they are related enough, we can list them as bullet points in the same admonition - but I think it's fine to keep these as two admonitions, even one after the other like this, since it adds readability and emphasis, which I think you want here. I just wanted to be sure that was the intent.

Comment thread docs/guides/estimator-options.ipynb Outdated
Comment thread docs/guides/sampler-options.ipynb Outdated
Co-authored-by: abbycross <across@us.ibm.com>

@abbycross abbycross left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add a note about target precision

3 participants