tangelo.toolboxes.optimizers package

Submodules

tangelo.toolboxes.optimizers.rotosolve module

tangelo.toolboxes.optimizers.rotosolve.rotosolve(func, var_params, *func_args, ftol=1e-05, maxiter=100)
Optimization procedure for parameterized quantum circuits whose

objective function varies sinusoidally with the parameters. Based on the work by arXiv:1905.09692, Mateusz Ostaszewski.

Parameters:
  • func (function handle) – The function that performs energy estimation. This function takes variational parameters as input and returns a float.

  • var_params (list) – The variational parameters.

  • ftol (float) – Convergence threshold.

  • maxiter (int) – The maximum number of iterations.

  • *func_args (tuple) – Optional arguments to pass to func.

Returns:
  • float – The optimal energy found by the optimizer.

  • list of floats – Optimal parameters.

tangelo.toolboxes.optimizers.rotosolve.rotosolve_step(func, var_params, i, *func_args)

Gradient free optimization step using specific points to characterize objective function w.r.t to parameter values. Based on formulas in arXiv:1905.09692, Mateusz Ostaszewski

Args:
func (function handle): The function that performs energy

estimation. This function takes variational params as input and returns a float.

var_params (list of float): The variational parameters. i (int): Index of the variational parameter to update. *func_args (tuple): Optional arguments to pass to func.

Returns:

list of floats: Optimal parameters.

Module contents