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

Accept all hierarchical options if given flatly #764

Merged
merged 14 commits into from
Mar 30, 2023

Conversation

merav-aharoni
Copy link
Contributor

@merav-aharoni merav-aharoni commented Mar 23, 2023

Summary

Accept all options on given on level 1 and assign them to the appropriate hierarchical option type.

Details and comments

For example, if the user defines options = {"shots": 1024} as input to one of the primitives, we translate it to options = {"execution": {"shots": 1024}}.
Fixes #755.

@coveralls
Copy link

coveralls commented Mar 23, 2023

Pull Request Test Coverage Report for Build 4565427092

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 66.606%

Totals Coverage Status
Change from base Build 4565001730: -0.05%
Covered Lines: 3277
Relevant Lines: 4920

💛 - Coveralls

@merav-aharoni merav-aharoni marked this pull request as ready for review March 23, 2023 18:56
@merav-aharoni merav-aharoni requested a review from jyu00 March 23, 2023 18:56
@merav-aharoni merav-aharoni changed the title [WIP] Accept all hierarchical options if given flatly Accept all hierarchical options if given flatly Mar 23, 2023
@merav-aharoni merav-aharoni requested a review from kt474 March 29, 2023 07:30
Copy link
Collaborator

@jyu00 jyu00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jyu00 jyu00 added the Changelog: New Feature Include in the Added section of the changelog label Mar 29, 2023
@kt474 kt474 merged commit 5c4cd4d into Qiskit:main Mar 30, 2023
@merav-aharoni merav-aharoni deleted the options_level branch April 2, 2023 07:33
frankharkins pushed a commit to frankharkins/qiskit-ibm-runtime that referenced this pull request Apr 3, 2023
* Recognize first level options properly

* Cleaned up Sampler code. Copied same to Estimator

* Added test. Fixed error in skip_transpilation

* Release notes

* Cleaning code: Changed '_options' to 'self._options' in primitive constructors.

* Black

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
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.

Accept all options in a dictionary as first level
4 participants