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

Add support for noise model and level 1 data to local sampler #1990

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

wshanks
Copy link
Collaborator

@wshanks wshanks commented Oct 22, 2024

This change passes through the simulator.noise_model option to the BackendSamplerV2 as a noise_model option of run_options if the primitive supports the run_options option (support was added in Qiskit 1.3).

Additionally, this change translates the execution.meas_type option into meas_level and meas_return options of run_options if the BackendSamplerV2 supports run_options. This change allows support for level 1 data in local testing mode, where otherwise the default is only to return classified data.

@wshanks
Copy link
Collaborator Author

wshanks commented Oct 22, 2024

It doesn't make sense to merge this unless Qiskit/qiskit#13357 is also on a path to being merged. If that is the case though, it should be safe to merge this because it should not change behavior if the added options are not used and also it checks that the options are defined before using them, so it doesn't need to wait for Qiskit/qiskit#13357 to be released first.

This change passes through the `simulator.noise_model` option to the
`BackendSamplerV2` as a `noise_model` option under `run_options` if
the primitive supports the `run_options` option (support was added in
Qiskit 1.3).

Additionally, this change translates the `execution.meas_type` option
into `meas_level` and `meas_return` options under `run_options` for the
`BackendSamplerV2` if it supports `run_options`. This change allows
support for level 1 data in local testing mode, where otherwise the
default is only to return classified data.
@wshanks wshanks force-pushed the local-primitive-options branch from 603808f to 0ed915f Compare November 18, 2024 23:25
@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Nov 19, 2024
@kt474 kt474 added this to the 0.34.0 milestone Nov 19, 2024
@kt474 kt474 merged commit 9fe8275 into Qiskit:main Nov 19, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants