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 arguments, depth of QAOA circuit, 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 depth of the QAOA circuit.

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.