
When developers first approach quantum computing, they usually encounter gates, circuits, qubits, and algorithms such as Grover’s or Shor’s. It can all seem like a maze if you have not read a few introductory books on the subject.
However, there is another way to use quantum phenomena to solve problems: quantum annealing.
The basic idea is relatively simple to express: instead of describing an algorithm step by step using a gate-based circuit, we formulate an optimization problem so that its best solution corresponds to the lowest-energy state of a physical system. Then we let the system evolve, aiming to end up in precisely that state. This approach is currently finding the greatest applicability in real-world use cases, mainly through the company D-Wave.
If you think about it, isn’t this exactly what we have always done when translating a problem into data structures and algorithms in classical computing?
For a programmer, this shift in perspective is important: the work is less about writing a sequence of instructions and more about correctly modeling and adapting the problem we want to solve.
From a software problem to an energy landscape
Let me briefly explain what quantum annealing is.
Suppose we have to choose, from among many possible combinations, the route or path that minimizes a cost. This could involve scheduling, resource allocation, routing, or any other combinatorial problem that can be expressed using binary variables.
A common formulation is QUBO (Quadratic Unconstrained Binary Optimization):
Here, represents a vector of binary decisions, and contains the costs and interactions between them. The diagonal terms represent linear contributions, while the remaining terms describe interactions between variables.
The interesting thing is that a QUBO can be transformed into an Ising model, a formulation from statistical physics in which variables take the values or :
The coefficients represent individual biases, and represent interactions between variables. Solving the problem means finding a configuration that minimizes .
In other words, we have turned a problem we recognize as developers into an energy landscape whose lowest point represents a good solution.
And if you look at the mathematical formulation above, it is not complicated at all.
Where does the quantum part come in?
The process begins by preparing an initial Hamiltonian whose ground state is easy to find (sorry, this comes from quantum mechanics). The system then gradually evolves toward another Hamiltonian that encodes the problem we actually want to solve.
Ideally, if the evolution were sufficiently slow and the conditions of the adiabatic theorem were met, the system would remain close to its ground state throughout the evolution. At the end, we would measure a configuration associated with the minimum of the problem Hamiltonian.
In real devices, the situation is more complicated. The system interacts with its environment, the temperature is not zero, and dynamic effects mean that the result is not necessarily the global minimum. That is why an annealer is usually used as a sampler: we run the problem repeatedly and obtain different samples, each accompanied by its energy.
One relevant mechanism is quantum tunneling, which can allow the system to pass through certain barriers in the energy landscape instead of having to overcome them thermally. This is a conceptual difference from simulated annealing, although whether it becomes a practical computational advantage depends heavily on the problem, the formulation, and the hardware.
Quantum annealing is not simulated annealing
The names can be confusing. Simulated annealing is a classical algorithm inspired by the cooling of materials. It introduces randomness and occasionally accepts worse solutions to escape local minima; that probability decreases as the process progresses.
Quantum annealing uses a physical quantum system and a controlled evolution of its Hamiltonian. Both approaches aim to explore difficult optimization landscapes, but their physical and computational mechanisms are not the same.
This comparison is also useful in experiments: we can formulate the same QUBO and compare a classical solver based on simulated annealing with samples obtained from a quantum annealing processor.
It does not guarantee that we will magically find the optimal path
The fact that a problem can be expressed as a QUBO does not mean that a quantum annealer will solve it better than the best classical algorithms. Nor should we interpret every good experimental result as proof of a genuine quantum advantage.
There are additional costs to consider: correctly formulating constraints and penalties, adapting the problem to the available physical connectivity and, in some cases, performing an embedding that represents a logical variable using several physical qubits. Hybrid methods also frequently combine classical processing with access to the QPU.
That is precisely why quantum annealing is interesting to developers even before we talk about advantages. It makes us practice something we know well from software engineering: how we represent a problem determines much of its solution.
A different way to think about quantum algorithms
Quantum annealing expands our view of what it means to program a quantum computer, because it is not all about building gate-based circuits. In this paradigm, programming means translating an optimization problem into binary variables, building an objective function, expressing constraints through penalties, and analyzing the samples returned by the system.
That shift feels especially natural to those of us who come from software development. First, we model. Then we run. Finally, we measure, validate, and compare with classical alternatives.
And perhaps that is the most important idea to take away: quantum annealing does not eliminate the difficulty of the problem; it shifts it toward a mathematical formulation that the hardware can physically explore, and this hardware already exists commercially. Understanding that formulation is far more important than being impressed by the number of qubits in a machine.