documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Document primitive option precedence rules

Open ihincks opened this issue 1 year ago • 3 comments

URL, if applicable

No response

Describe the new content you are requesting.

When a user sets options like this,

from qiskit_ibm_runtime import EstimatorV2, QiskitRuntimeService
from qiskit import QuantumCircuit

service = QiskitRuntimeService()
backend = service.backend("ibm_auckland")

estimator = EstimatorV2(backend)

estimator.options.default_shots = 100
estimator.options.resilience_level = 0
estimator.options.resilience.zne_mitigation = True

it might not be clear how the resilience level might interact with the other options, because the resilience level itself can modify the mitigation strategy. In this example, does setting the resilience level to 0 have the effect of turning off the attempt to add zne_mitigation? (spoiler: no)

What needs to be documented is that that the resilience level is FIRST used to set a base configuration on any options it thinks are relevant, and THEN any other user-specified options are updated on top of that. So it would be possible, for example, though pointless, to completely undo the effect of setting the resilience level by reversing all of its intentions manually.

If this new content request is accepted, do you want to write the content?

I can help the team by providing enough information to write the material

ihincks avatar Apr 26 '24 18:04 ihincks

Which page do you envision this living on, @ihincks? The primitives examples page, the V2 migration guide, etc.

abbycross avatar Apr 26 '24 18:04 abbycross

how about this page: https://docs.quantum.ibm.com/run/configure-error-mitigation#custom-error-settings-v2-primitives

jyu00 avatar Apr 26 '24 19:04 jyu00

Thanks @ihincks! What is the timeline for this content? Are you ready to open a PR for it, and how can we support you with it? If it might be more than a few weeks before this is ready, I'll add it to our backlog.

abbycross avatar May 02 '24 18:05 abbycross

@ihincks , these pages are being revamped, so your suggested content ended up on the new options overview page. See this PR: #1499 It's not totally done yet, but you're welcome to give feedback.

beckykd avatar Jun 13 '24 17:06 beckykd