Skip to content

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

@artix41

Description

@artix41

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions