qrisp.qiro.QIROProblem.run_qiro#

QIROProblem.run_qiro(qarg, depth, n_recursions, mes_kwargs={}, max_iter=50)[source]#

Run the specific QIRO problem instance with given quantum argument, depth of QAOA circuit, number of recursions, measurement keyword arguments (mes_kwargs) and maximum iterations for optimization (max_iter).

Parameters:
qargQuantumVariable

The quantum variable to which the QAOA circuit is applied.

depthint

The amount of QAOA layers.

n_recursionsint

The number of QIRO replacement iterations.

mes_kwargsdict, optional

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

max_iterint, optional

The maximum number of iterations for the optimization method. Default is 50.

Returns:
opt_resdict

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