The QPath Blog
QuantumPath® Agnostic QAOA:
Annealing optimization algorithms on quantum gate computers
QuantumPath® is agnostic in one of its most important functionalities since, in our opinion, in the tasks of designing and building quantum solutions, the “quantum analyst” should focus on the problem and its formulation, without having to worry about what it entails technologically.
In the case of gate-based technologies this has the clear advantage of designing quantum circuits in an abstract form that, thanks to QPath®, can be launched on any quantum computing technology provider without worrying about all the underlying elements: SDK, code, optimizations, requirements, versions, capabilities, supported gates, coding of the results, interaction with backends… that have a great impact when approaching a quantum project from a technological perspective.
Something similar happens in the case of technologies based on quantum annealing. When working with QuantumPath®, thanks to the agnostic design of the Hamiltonian-based formulations and its rules for encoding the requirements, the “quantum analysts” focus again on analyzing the formulation of the problem: variables, rules…. without the need to take into account the details of the technology in which they must be implemented. Until now, QuantumPath® performed the same actions as with gate technologies: providing the necessary ecosystem to launch quantum annealing problems in simulators/computers compatible with such technology.
But what if we were to take advantage of the generality of use of gate-based quantum computers to run optimization problems based on annealing principles? This is what inspired the creation of QuantumPath®’s new feature: Q Agnostic QAOATM.
Q Agnostic QAOATM is an important step forward in providing technology that facilitates the adoption of quantum software, as it extends the agnostic feature of QuantumPath® regarding the execution of optimization algorithms. It will be possible to launch the same optimization algorithms on different quantum hardware technologies and manufacturers. It will also provide an added value: democratizing access to them. Currently, quantum gate machines are of general use. After much study and research at university level, VQE/QAOA variational algorithms have been developed and demonstrated that separate the underlying mathematical problem-solving logic into two parts:
· A classical component driving the variational calculations (ansatz).
· A quantum component that supports the calculation of energies, taking advantage of the power of quantum computers. In such a way that it is possible to obtain quadratic algebraic advantages over the classical equivalents in the probability distribution of the fundamental state.
This way of solving an optimization problem demonstrates that an optimization algorithm can be constructed, taking advantage of these techniques, which could be launched on a gate-based computer by implementing the appropriate software algorithm. And this is what has been achieved at QuantumPath® with the new Q Agnostic QAOATM providers linked to the gate machines. Thanks to QPath®’s agnostic architecture, annealing algorithms already developed on the platform, which could only be launched on annealing computers, can now also be launched on all quantum gate computers without the need to alter the design. All the quantum developer has to do is add the new gate-based Quantum Approximate Optimization Algorithm (QAOA) providers to their solutions, transpile, and experiment with their problems on many more technologies than initially possible. This brings a multitude of advantages:
· Facilitate the execution of optimization algorithms on a wider variety of quantum computers from different vendors and different technologies without the need for reprogramming.
· Experiment on multiple vendors, assessing the advantages and power of different technology alternatives
· Experiment on different simulators, resulting in different times, types of results, costs, etc.
· Having a wider technological alternative: depending on the evolution of all the quantum technologies over time and their evolution, we will always be able to choose the one that best suits the proposed problem.
Of course, this is a feature of the CORE of QPath®, which means that all the product’s functionalities are based on this feature. For example, the qSOA® API will allow this new ability to be exploited from the integration layer, allowing a rich enterprise client to suddenly be able to see more suppliers in its list without modifying its code. And also, that the results returned by the system provide exactly the same format and binary encoding of the result, regardless of the type of technology used.
To illustrate all these advantages, we will now use the classic knapsack algorithm.
1) In the existing solution, it is sufficient to add new annealing providers (click on “Populate ANNEALING Devices” to add those providers that were not already linked in the solution):
It can be seen that native annealing providers coexist with gateway technologies under QAOA. In the screenshot, some of the possible ones have been selected.
2) Transpiling the flow:
After transpiling, it can be seen that where before there were 2 compilers, now there are 6 (depending on the devices linked to the solution).
3) Analyze Execute and experiment with gate machines and annealing machines. the results under the unified format of Annealing’s QuantumPath®:
Of course, we encourage the reader to test it directly with the product (you can even test it with the Free Developer Subscription).
To sum up:
· Solving NP Hard optimization problems in NISQ devices can be tackled with methods such as the one proposed by QAOA (Quantum Approximate Optimization Algorithm). As the capabilities of quantum technology and its quality increase, it is demonstrated that it is possible to obtain the probability functions that allow quantum advantage to be gained in energy distributions, making it possible to apply them to complex optimization problems that would not have been possible to run on classical hardware.
· The high expectations about the advantages offered by the Quantum Approximate Optimization Algorithm (QAOA) come from the clear capacity of application to use cases that affect critical processes in our society: financial processes, quantum simulations, distribution chains, pollution reduction in chemical processes… use cases that can clearly take advantage of the optimization algorithms proposed by QAOA.
· The central problem in the development of QAOA for different quantum gate computers comes from the construction of the ANSATZ algorithms needed to tackle the QUBO matrix optimization process. Depending on the design of the Hamiltonian, an optimization algorithm must be constructed that applies all the principles and theory in this type of problem, which involves algorithm, code, testing and coding of the data.
· Q Agnostic QAOATM offers a pre-parameterized implementation of agnostic ansatz capable of adapting to problems of different Hamiltonian definitions, variables and unified outcomes that will automatically trigger when selecting quantum gate providers in an annealing formulation problem. As QuantumPath® already offers for the development of algorithms and software solutions for quantum gates and annealing, in this case it extends the principle of full portability of quantum software also to QAOA: write once, run everywhere, be it quantum gate computers and/or annealing.