Algorithms such as Shor’s need long circuits and error-corrected qubits, and machines of that kind do not yet exist at the required scale. Hybrid algorithms take a different route: they ask the quantum processor only for what it can do today, which is to run short circuits, and leave everything else to a classical computer. Most work aimed at near-term applications follows this pattern.
Why are quantum and classical computers used together?
Today’s processors are limited: they have few qubits, every gate adds error, and qubits lose their state quickly. In this period, known as NISQ, deep circuits produce noise instead of a meaningful result. Classical computers, by contrast, are fast, reliable and cheap.
The work is divided accordingly. The quantum processor prepares and measures states that are hard to represent classically; the classical computer takes care of optimisation, bookkeeping and data handling. Error-corrected machines are also expected to work alongside classical computers, for control and for decoding errors, so the hybrid set-up in the wider sense is here to stay.
How does the variational loop work?
The most common hybrid pattern is the variational algorithm. Its loop has four steps:
- A parametrised circuit is chosen. Also called an ansatz, this circuit is made of gates whose rotation angles can be adjusted.
- The circuit is run on the quantum processor and measured. This is repeated many times in order to estimate a cost value, for example an energy.
- A classical optimiser looks at the cost and proposes new angles.
- The loop continues until the cost stops improving.
This is like adjusting the dials of a machine while watching a gauge. The comparison falls short in one respect: here the gauge reading is statistical and noisy, every reading takes many repetitions, and the number of dials can run into the hundreds or thousands.
What are VQE and QAOA?
VQE (Variational Quantum Eigensolver) estimates the lowest energy of a quantum system such as a molecule or a model of a material. The circuit prepares a trial state, its energy is measured, and the optimiser tries to lower that energy. The method rests on the variational principle: no trial state can have an energy below the true ground-state energy. The target fields are chemistry and materials science; experiments so far have been limited to small molecules.
QAOA (Quantum Approximate Optimisation Algorithm) is intended for combinatorial optimisation. The problem, usually written in QUBO form, is encoded as a cost function. The circuit alternates two kinds of layer: one applies the cost function, the other mixes between candidate solutions. The angles are tuned classically so that low-cost bit strings become more likely to appear on measurement. Adding layers can in principle improve the result, but it makes the circuit deeper and more exposed to noise.
| VQE | QAOA | |
|---|---|---|
| Goal | The lowest energy of a quantum system | A low-cost solution to a combinatorial problem |
| Typical fields | Chemistry, materials science | Routing, scheduling, portfolio selection |
| Output | An energy estimate | A bit string representing a candidate solution |
What are hybrid solvers in annealing?
The word “hybrid” is also used in quantum annealing. There, a hybrid solver is a piece of software that takes a large optimisation problem, works on it with classical heuristics and sends subproblems to a quantum annealer. This makes it possible to handle problems with far more variables than would fit on the quantum processor directly.
From the outside it is hard to tell how much of the result comes from the quantum part. Benchmarking against purely classical solvers is therefore important.
What are the known difficulties, and what is realistic to expect?
- Noise: gate and readout errors distort the measured cost. Error mitigation techniques help, but they require extra measurements.
- Measurement cost: every cost value is an average over many repetitions, and every optimisation step needs many values. The total number of circuit runs can become very large.
- Flat optimisation landscapes: for many circuit choices the cost surface flattens rapidly as the number of qubits grows; gradients vanish and the optimiser cannot tell which way to move. This phenomenon is known as a barren plateau.
- No proven advantage: variational algorithms are heuristics. So far there is no generally accepted demonstration that they outperform the best classical methods on a problem of practical value.
Hybrid algorithms are nevertheless the practical way to run something meaningful on today’s hardware: they suit learning, prototyping and benchmarking. Whether they will deliver an advantage before error correction arrives is an open question. Realistic outputs of a pilot project are a tested formulation, performance measured against a classical baseline, and resource estimates for future hardware.
How Q&Co can help
Hybrid classical-quantum algorithm development is one of the steps in Q&Co’s method; it is preceded by a suitability assessment and problem formulation, and followed by performance and resource assessment. To discuss your own use case, get in touch.