A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://qrisp.eu/reference/Algorithms/qaoa/QAOA.html below:

Quantum Approximate Optimization Algorithm — documentation

Quantum Approximate Optimization Algorithm#

This modules facilitates the execution of The Quantum Approximate Optimization Algorithm (QAOA) and related techniques called the Quantum Alternating Operator Ansatz.

The end goal in QAOA is to optimize the variational parameters \(\gamma_p\) and \(\beta_p\) in order to minimize the expectation value of the cost function with respect to the final state \(\ket{\psi_p}\). You can read more about the theoretical fundamentals behind QAOA in the tutorial Theoretical Overview. You can also find efficient implementations of this algorithm for MaxCut and Max-$\kappa$-Colorable Subgraph QAOA Implementation in an easy to read, insightful tutorials in which we describe the recipe to implement QAOA for other problem instances in a modular way, and independent of the encoding used.

The central data structure of the QAOA module is the QAOAProblem class.

QAOAProblem#

The QAOAProblem class is like a blueprint for a implementing QAOA for a specific problem instance we’re trying to solve. When we create an instance of this class, we need to provide three things:

Apart from the basic three ingredients mentioned above, some problems require the specification of the initial state. This can be achieved using the .set_init_function method.

The .run method prepares the initial state, applies \(p\) layers of phase separators and mixers, and compiles a quantum circuit with intended measurements. Subsequently, the optimization algorithm is executed and the measurement results of the optimized circuit are returned.

For benchmarking, we provide the .benchmark method, which allows you to collect performance data about your implementation.

Additionally, a circuit can be pretrained with the method .train_function . This allows preparing a new QuantumVariable with already optimized parameters, such that no new optimization is conducted. The results will therefore be the same.

QAOABenchmark#

As an approximation algorithm, benchmarking various aspects such as solution quality and execution cost is a central question for QAOA. The results of the benchmarks of QAOAProblem are represented in a class called QAOABenchmark. This enables convenient evaluation of several important metrics as well as visualization of the results.

Collection of mixers and implemented problem instances#

Qrisp comes with a variety of predefined mixers to tackle various types of problem instances:

The following problem instances have already been successfully implemented using the Qrisp framework:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4