This is Nakanishi-Fujii-Todo method (arXiv:1903.12166) for scipy.optimize.minimize
.
The optimization function have to satisfy three conditions written in [1].
pip install nftopt
or
pip3 install nftopt
from scipy.optimize import minimize
from nftopt import nakanishi_fujii_todo
res = minimize(
YOUR_FUNC,
YOUR_PARAM,
options={'maxfev': 2048},
method=nakanishi_fujii_todo,
callback=YOUR_EVAL_FUNC
)
[1] K. M. Nakanishi, K. Fujii, and S. Todo. 2019. Sequential minimal optimization for quantum-classical hybrid algorithms. arXiv preprint arXiv:1903.12166.
Apache-2.0 License (see LICENSE file).