Skip to content

Solver Customization

The optimizer_preferences input to the GroundStateSolver class details the parameters of the VQE optimization scheme.

The GroundStateOptimizer class consists of the following parameters:

  1. name - (OptimizerType) Classical optimization algorithms: COBYLA, SPSA, ADAM, L-BFGS-B, NELDER MEAD.
  2. num_shots – (positive int) Number of measurements of the ansatz for each assignment of variational parameters.
  3. max_iteration – (positive int) Maximal number of optimizer iterations.
  4. tolerance – (positive float) Final accuracy of the optimization.
  5. step_size - (positive float) Step size for numerically calculating the gradient in L_BFGS_B and ADAM optimizers.
  6. initial_point - (List of floats) Initial values for the ansatz parameters.
  7. skip_compute_variance - (bool) If True, the optimizer will not compute the variance of the ansatz.


    "optimizer_preferences" : {
        "type": "COBYLA",
        "num_shots": 1000,
        "max_iteration": 30
from classiq.applications.chemistry import GroundStateOptimizer

optimizer_preferences = GroundStateOptimizer(