Solver Customization
The execution_parameters
input to the construct_chemistry_model
function details the parameters of the VQE optimization scheme.
The ChemistryExecutionParameters
class consists of these parameters:
name: OptimizerType
– Classical optimization algorithms:COBYLA
,SPSA
,ADAM
,L_BFGS_B
,NELDER_MEAD
.max_iteration: int
– Maximal number of optimizer iterations.initial_point: Optional[np.ndarray]
– Initial values for the ansatz parameters.tolerance: float
– Final accuracy of the optimization.step_size: float
– Step size for numerically calculating the gradient inL_BFGS_B
andADAM
optimizers.skip_compute_variance: bool
– If True, the optimizer does not compute the variance of the ansatz.
Example
from classiq.applications.chemistry import ChemistryExecutionParameters
from classiq.execution import OptimizerType
execution_params = ChemistryExecutionParameters(
optimizer=OptimizerType.COBYLA,
max_iteration=30,
)