← Latest papers
💻 computer science

QAOA for Layered Architecture Recovery: Feasibility, Limits, and the Role of Decomposition

This paper investigates the feasibility of using the Quantum Approximate Optimization Algorithm (QAOA) for layered architecture recovery, finding that while monolithic QAOA struggles with larger instances and noise, an impact-guided decomposition strategy effectively overcomes qubit limitations to achieve high recovery accuracy on real-world systems.

Original authors: Julien Cardinal, Andrew Chedid, Imen Benzarti, Ghizlane El Boussaidi, Christophe Pere, Jean-Marc Robert

Published 2026-11-17
📖 5 min read🧠 Deep dive

Original authors: Julien Cardinal, Andrew Chedid, Imen Benzarti, Ghizlane El Boussaidi, Christophe Pere, Jean-Marc Robert

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Software systems are like living cities. Over years of growth, the original blueprints often fade, leaving behind a tangled web of dependencies where one part of the code relies on another in ways the architects never intended. This drift, known as architecture erosion, makes maintenance difficult and evolution risky. To fix it, engineers need to reconstruct the original layers of the system, sorting the thousands of code packages back into their proper hierarchical order. This is a massive puzzle: finding the single best arrangement among billions of possibilities is a task that grows exponentially harder as the system gets larger. For decades, researchers have relied on classical computer algorithms to solve this, but as systems grow, even the fastest classical machines struggle to explore the solution space effectively.

A new frontier in computing offers a different approach. Quantum computers, which operate on the principles of quantum mechanics, promise to handle complex optimization problems in ways classical machines cannot. One specific method, called the Quantum Approximate Optimization Algorithm, is designed to find good solutions by testing many possibilities simultaneously. However, these machines are currently in an early, noisy stage of development. They have very few "qubits," the basic units of quantum information, and they are prone to errors. The question facing researchers is whether this new technology can actually help with real-world software problems today, or if it remains a theoretical promise. A team of researchers at École de Technologie Supérieure in Montreal set out to test this directly, applying the quantum algorithm to the specific challenge of restoring layered software architectures.

The researchers began by translating the problem of sorting software packages into a format a quantum computer could understand. They treated the assignment of each package to a specific layer as a decision that could be either yes or no. By mapping the dependencies between packages onto a mathematical model, they created a landscape where the "best" arrangement was the one with the lowest total penalty for broken rules, such as a lower-level package calling a higher-level one. This model was then encoded into a quantum circuit, a sequence of operations performed on qubits. The goal was to let the quantum computer explore the vast space of possible arrangements and settle on the optimal one.

To test their method, the team used three real-world Java software systems, ranging from 15 to 24 qubits in size. They ran the quantum algorithm on high-performance simulators, which mimic the behavior of real quantum hardware, including the errors and noise that plague current devices. Their first discovery was that the size of the quantum circuit mattered less than the number of times they asked the machine to run the calculation. In the language of the field, the "sampling budget"—how many times the computer is asked to produce a result—proved to be the critical factor for accuracy. Increasing the depth of the circuit, which makes the calculation more complex, did not improve the results and only made the process slower. On the two smaller systems, the quantum approach was able to find the best possible arrangement in the vast majority of attempts, matching the performance of the best classical methods.

However, when they applied the same method to the largest system, which required 24 qubits, the monolithic approach failed. The quantum computer could not reliably find the correct solution, succeeding in only about 6.7% of the attempts. This highlighted a hard limit: the current quantum hardware is simply too small to handle the entire problem at once. The researchers then tried a different strategy called impact-guided decomposition. Instead of trying to solve the entire 24-qubit puzzle in one go, they broke it down into a series of smaller, manageable sub-problems. The algorithm would focus on a small group of packages at a time, optimizing their positions while holding the rest of the system steady, before moving on to the next group.

This decomposition changed everything. By limiting the quantum circuit to a small active set of packages, the researchers were able to recover the correct architecture for the large system with a success rate of 93.3%. Remarkably, this method worked even better with fewer samples. While the larger, single-circuit approach needed many samples to find a good answer, the decomposed approach found better results with fewer samples, suggesting that a little bit of randomness in the sampling process actually helped the algorithm escape local traps and find the global optimum. The study also showed that the quantum approach was robust against simulated noise; while the noise made the simulations take much longer to run, it did not significantly degrade the quality of the solutions found for the smaller systems.

The findings suggest that quantum computing is not yet ready to replace classical methods for software architecture recovery, but it is not useless either. On small or simple problems, it performs competitively. For larger, more complex systems, the key to success lies not in building bigger quantum circuits, but in breaking the problem down into smaller pieces that fit within the current hardware limits. The researchers concluded that in this early era of quantum technology, the ability to decompose a problem is more important than the size of the quantum machine itself. While the quantum algorithm did not outperform the best classical techniques in terms of speed or raw accuracy, it demonstrated a viable pathway for applying quantum optimization to real software engineering tasks, provided the problem is structured correctly to fit the constraints of the available technology.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →