solve_qaoa
- fireopal.solve_qaoa(problem, credentials, problem_type=None, backend_name=None)
Solve a QAOA problem.
- Parameters:
problem (Expr or nx.Graph) – The QAOA problem definition, represented as either an nx.Graph or sympy.Expr.
credentials (Credentials) – The credentials for running circuits on an IBM backend. Use the make_credentials_for_ibmq function from the credentials module to generate properly formatted credentials.
problem_type (str, optional) – The class of QAOA problem to solve. Required for graph problem definitions, which currently only includes support for “maxcut”.
backend_name (str, optional) – The backend device that should be used to run circuits. Defaults to None.
- Returns:
dict – The output consists of the following keys: final_aggregate_cost (float) final_bitstring_distribution (dict[str, int]) solution_bitstring (str) iteration_count (int)
- Return type:
dict