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

Level 1 measurement support in Sampler options #1594

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

gadial
Copy link
Collaborator

@gadial gadial commented Apr 9, 2024

Summary

This PR adds support for level 1 measurement options in SamplerV2

Details and comments

This PR extends ExecutionOptionsV2 to a new class, SamplerExecutionOptionsV2 having an additional field meas_type which can accept the values "classified", "kerneled", "avg_kerneled", where "classified" represents the usual measurement level 2 output, and the other options represent measurement level 1 output.

Fixes part of #1554

Copy link
Collaborator

@ihincks ihincks left a comment

Choose a reason for hiding this comment

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

Thanks @gadial , one minore comment.

More generally, is the testing here in line with the standards of this library? I have an IQBackendWrapper < Backend class implement elsewhere if we want to use it.

qiskit_ibm_runtime/options/sampler_execution_options.py Outdated Show resolved Hide resolved
@gadial
Copy link
Collaborator Author

gadial commented Apr 10, 2024

More generally, is the testing here in line with the standards of this library? I have an IQBackendWrapper < Backend class implement elsewhere if we want to use it.

I added relevant tests for this PR to the existing ones; there are no extensive tests as far as I can see. However, Such a wrapper sounds like a good idea and I can add more exhaustive tests around it.

@coveralls
Copy link

coveralls commented Apr 10, 2024

Pull Request Test Coverage Report for Build 8650143258

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 83.615%

Totals Coverage Status
Change from base Build 8620306713: 0.02%
Covered Lines: 6236
Relevant Lines: 7458

💛 - Coveralls

@gadial gadial requested a review from ihincks April 11, 2024 06:14
@gadial gadial merged commit 68fb4a8 into Qiskit:main Apr 11, 2024
20 checks passed
@gadial gadial deleted the sampler_execution_options branch April 11, 2024 16:58
@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Apr 15, 2024
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.

None yet

4 participants