qrisp.cold.DCQOProblem.optimization_routine#
- DCQOProblem.optimization_routine(qarg, N_opt, N_steps, T, qc, CRAB, optimizer, options, objective, bounds)[source]#
Subroutine for the optimization method used in COLD. The initial values are set and the optimization via is conducted here.
- Parameters:
- qargQuantumVariable
The argument to which the H_prob circuit is applied.
- N_optint
Number of optimization parameters in
H_control.- N_stepsint
Number of time steps for the simulation.
- Tfloat
Evolution time for the simulation.
- qcQuantumCircuit
The COLD circuit that is applied before measuring the qarg.
- CRABbool, optional
If
True, the CRAB optimization method is being used. The default isFalse.- optimizerstr
Specifies the SciPy optimization routine.
- optionsdict
A dictionary of solver options.
- objectivestr
The objective function to be minimized (
exp_value,agp_coeff_magnitude,agp_coeff_amplitude). Default isexp_value.- boundstuple
The parameter bounds for the optimizer. Default is (-2, 2).
- Returns:
- res.x: array
The optimized parameters of the problem instance.