qrisp.cold.DCQOProblem.run#

DCQOProblem.run(qarg, N_steps, T, method, N_opt=None, CRAB=False, optimizer='COBYQA', objective='agp_coeff_magnitude', bounds=(), options={}, mes_kwargs={}, precision=0.01, exp_value_backend=None)[source]#

Run the specific DCQO problem instance with given quantum arguments, number of timesteps, evolution time and method.

There is also the option to choose if parameter optimization via the expectation value objective function should be done via a simulator or real quantum backend. If the user chooses a quantum backend this iterative optimization can potentially use a lot of computing time.

Parameters:
qargQuantumVariable

The argument to which the DCQO circuit is applied.

N_stepsint

Number of time steps for the simulation.

Tfloat

Evolution time for the simulation.

methodstr

Method to solve the QUBO with. Either LCD or COLD.

N_optint

Number of optimization parameters in H_control.

CRABbool

If True, the CRAB optimization method is being used. The default is False.

optimizerstr, optional

Specifies the SciPy optimization routine. We set the default to Powell.

optionsdict

A dictionary of solver options.

objectivestr

The objective function to be minimized (exp_value, agp_coeff_magnitude). Default is agp_coeff_magnitude.

boundstuple

The parameter bounds for the optimizer. Default is (-2, 2).

optionsdict

Additional options for the Scipy solver.

mes_kwargsdict, optional

The keyword arguments for the measurement function. Default is an empty dictionary.

precisionfloat, optional

Precision for expectation value calculations. Default is 0.01.

exp_value_backendBackendLike, optional

Backend for expectation value calculations, if exp_value is used as objective function. If provided, uses measurement-based expectation value with this backend. Default is the Qrisp statevector simulator.

Returns:
res_dictdict

The optimal result after running DCQO problem for a specific problem instance. It contains the measurement results after applying the optimal DCQO circuit to the quantum argument.