Skip to content
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

Fix resilience options #778

Merged
merged 9 commits into from
Apr 4, 2023
1 change: 1 addition & 0 deletions qiskit_ibm_runtime/options/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class Options:
"execution": ExecutionOptions,
"environment": EnvironmentOptions,
"simulator": SimulatorOptions,
"resilience": ResilienceOptions,
}

@staticmethod
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/fix_resilience_input-0a7497265109794e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
When creating an Option object and passing an input option to ``resilience_options``, this option was
included in ``resilience_options``, but the other, default options were removed.
This was fixed, so now inputs are handled correctly, like other option types.
2 changes: 2 additions & 0 deletions test/unit/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def test_init_options_with_dictionary(self):
"transpilation": {"initial_layout": [1, 2], "layout_method": "trivial"},
"execution": {"shots": 100},
},
{"resilience": {"noise_amplifier": "GlobalFoldingAmplifier"}},
{"environment": {"log_level": "ERROR"}},
]

for opts_dict in options_dicts:
Expand Down