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

AQGD optimizer groups objective funtion calls by default #6305

Closed
woodsp-ibm opened this issue Apr 26, 2021 · 1 comment
Closed

AQGD optimizer groups objective funtion calls by default #6305

woodsp-ibm opened this issue Apr 26, 2021 · 1 comment
Labels
bug Something isn't working mod: algorithms Related to the Algorithms module

Comments

@woodsp-ibm
Copy link
Member

Optimizers are normally expected to use the objective function to evaluate a single point being returned a single value. This is as per scipy optimizers, upon which several are based.

However it was recognized that optimizers computing gradient, say by finite diff, want to evaluate a set of points independently, to compute the gradient, and as such this was parallelizable which could help performance. To inform an optimizer that it was able to do this, ie ask the objective function for the values of a lits of points, where the objective function provided supported that, a max_grouped_evals flag could be set on the optimizer to a number bigger than the default of 1. In this case an optimizer could ask for a list of points and get a list of values back, though. Given the current optimizer spec this should only be done if max_grouped_evals allows it. However it seems a change, not too long ago, altered AQGD to do this by default which violates the current accepted spec we have for optimizers.

So either we change the spec, and require all objective functions to support a list in/out, which I do not think I am in favor of, or we correct AGQD to honor max_grouped_evals. The failure to conform was noted when #6299 was looked where there is a test with Aer which ends up using the Aer qobj re-parameterization in Circuit Sampler, since it passes in multiple values, and fails in the test when it was attempted to be converted to the newer backend interface.

@woodsp-ibm woodsp-ibm added bug Something isn't working mod: algorithms Related to the Algorithms module labels Apr 26, 2021
@ElePT
Copy link
Contributor

ElePT commented Aug 22, 2023

Transferred to new repo: qiskit-community/qiskit-algorithms#50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod: algorithms Related to the Algorithms module
Projects
None yet
Development

No branches or pull requests

2 participants