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

Bug when minimizer_kwargs is empty but the minimizer is not optimize.minimize #203

Open
artix41 opened this issue Mar 10, 2019 · 0 comments

Comments

@artix41
Copy link

artix41 commented Mar 10, 2019

When I try to use QAOA with scipy.optimize.fmin_l_bfgs_b as my minimizer and no minimize_kwargs (I want to use the default argument), I get the error:
fmin_l_bfgs_b() got an unexpected keyword argument 'method'

it's due to this line in grove/qaoa.py:

self.minimizer_kwargs = minimizer_kwargs or {
            'method': 'Nelder-Mead',
            'options': {
                'disp': True,
                'ftol': 1.0e-2,
                'xtol': 1.0e-2
            }
}

It should be replace by a more complex condition that verify if the minimizer is indeed optimize.minimize

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

No branches or pull requests

1 participant