Closed chriseclectic closed 2 weeks ago
We don't map resilience_level=2
to zne_mitigation=True
in qiskit-ibm-runtime
, since it's up to the service to decide what resilience_level=2
means. We do, however, check if zne_mitigation=True
is set if one is to set other zne
options.
I think the best solution is to disable the zne_mitigation=True
check in the client and let the service decide if that's compatible with the resilience level. Note that we do the same for pec.
Describe the bug
When passing in a dict for Options when initializing an estimator, trying to modify options related to the resilience levels raises an exception.
Steps to reproduce
The following works to initialize a level 2 Estimator and set a custom ZNE extrapolator:
The following does not:
Expected behavior
Passing in a dict of options should be equivalent to modifying them after initialization.
Suggested solutions
This looks like a Pydantic validation issue.
Additional Information