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

Options: adapt shots upper bound #165

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Options: adapt shots upper bound #165

merged 4 commits into from
Jun 5, 2024

Conversation

airwoodix
Copy link
Collaborator

@airwoodix airwoodix commented Jun 4, 2024

Summary

The cloud portal now accepts shots settings up to 2000. This is not the case for direct-access resources, where the limit is 200.

This PR updates the shots upper bound for cloud resources. This requires having distinct options models for different resource types.

Details and comments

Qiskit BackendV2._default_options

The default options reported by BackendV2._default_options are now aligned with the actual defaults provided by the relevant model. Since BackendV2._default_options must be a classmethod, the options model is retrieved from the _ResourceBase type argument. An alternative would be to use a subclass hook, but this would be more invasive.

Documentation

Sphinx support for type variables is provided by the new development dependency sphinx-toolbox.

Autodoc's autoclass/autoproperty directives seem to assume that method return types are classes (!), thus the link to the _OptionsType type variable for the options property is not rendered and needs a nitpicky exception. The _ResourceBase type argument is properly linked.

@airwoodix airwoodix self-assigned this Jun 4, 2024
@airwoodix airwoodix changed the title options: adapt shots upper bound Options: adapt shots upper bound Jun 4, 2024
@airwoodix airwoodix marked this pull request as ready for review June 4, 2024 11:09
@airwoodix airwoodix merged commit fa34104 into master Jun 5, 2024
15 checks passed
@airwoodix airwoodix deleted the adapt-shots-limit branch June 5, 2024 07:23
@jbrixon jbrixon mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants