QAOA Solvers

The Quantum Approximate Optimization Algorithm (QAOA) solvers construct a cost Hamiltonian from the binary problem formulation and returns a distribution of candidate solutions.

Base Class

class engioptiqa.solvers.vqa_solvers.qaoa.solver_base.QAOASolverBase(token_file=None, proxy=None, *args, **kwargs)

Shared QAOA formulation and workflow contract for backend-specific solvers.

abstractmethod solve_problem(problem, num_layers=1, **kwargs)

Solve an optimization problem using a backend-specific QAOA evaluator.

PennyLane Solver

class engioptiqa.solvers.vqa_solvers.qaoa.solver_pennylane.QAOASolverPennylane(token_file=None, proxy=None, *args, **kwargs)
solve_problem(problem, num_layers=1, mode='fixed', device='lightning.qubit', circuit='probs', shots=None, tau=None, optimization_iterations=10)

Solve an optimization problem using a backend-specific QAOA evaluator.

QAOASolverPennylane.solve_problem supports the following parameter modes:

  • fixed uses a deterministic linear parameter schedule.

  • linear_ramp optimizes two parameters that scale the linear schedule.

  • optimize independently optimizes every QAOA beta and gamma parameter.

Use optimization_iterations to control either optimization mode. Set circuit="probs" for a probability distribution or circuit="sample" with a positive shots value for sampled frequencies.

AQT Solver

class engioptiqa.solvers.vqa_solvers.qaoa.solver_aqt.QAOASolverAQT(token_file=None, proxy=None, backend_noise=False, backend=None, optimization_level=3, *args, **kwargs)

Shot-based QAOA solver on AQT backends through OpenQASM and Qiskit.

solve_problem(problem, num_layers=1, shots=None, tau=None)

Solve an optimization problem using a backend-specific QAOA evaluator.

The AQT solver uses PennyLane to export the QAOA ansatz to OpenQASM, then runs the Qiskit circuit through qiskit-aqt-provider’s AQTSampler. It supports the fixed parameter schedule and shot-based results.

Install offline AQT simulator support with:

pip install 'engioptiqa[aqt]'

By default, the solver obtains an AQT offline simulator backend. To run on hardware, create a compatible backend in the calling application and provide it through the backend constructor argument.

optimization_level configures AQTSampler’s Qiskit transpilation level and defaults to 3.