← Opera№ I of VII
Senior design · Quantum + classical

Vectora

Can a quantum algorithm route a delivery fleet? I built the whole system to find out, from the solver to the dispatch console to the app in the driver's hand.

Role
Sole engineer
Year
2025 – 2026
Solver
Python · Qiskit · OR-Tools
Platform
Laravel 13 · React 19 · Flutter
Instances
9 · 50 / 100 / 200 nodes
i
The question

The routing problem is older than the computer, and it still isn't solved.

The Vehicle Routing Problem asks for the cheapest set of routes that lets a fleet of capacity-limited vehicles visit every customer and return home. It's NP-hard: the number of possible solutions grows factorially, and exact methods give up long before a city-sized fleet. Every logistics company in the world runs heuristics and hopes they're close enough.

QAOA, the Quantum Approximate Optimisation Algorithm, is one of the leading near-term candidates for this kind of problem. But today's quantum hardware has only a few qubits, and a 100-customer instance needs thousands. So the real research question was never "can QAOA solve VRP?" It was: how do you break the problem down until the quantum part has something it can actually do, and how honest are the results once you do?

A thesis is only worth reading if it reports where the quantum approach loses, too.

ii
The method

Recursive decomposition, then quantum.

The solver splits the instance recursively until each leaf is small enough to encode as a QUBO within the qubit budget. QAOA solves each leaf, every leaf is checked against a brute-force optimum, and the routes are stitched back together. A classical polishing pass then runs on top: 2-opt within routes, plus Or-opt and 2-opt* between them.

01 · SplitDivide the customers recursively into leaf sub-problems
02 · EncodeTurn each leaf into a QUBO that fits the qubit budget
03 · QAOASolve the leaf on Qiskit and check it against the true optimum
04 · PolishStitch the routes and apply 2-opt, Or-opt and 2-opt*

Everything runs from one launcher across nine benchmark instances: RioClaroPostToy at 50, 100 and 200 nodes, with a sweep over vehicle counts. Results land in a instance/K_vehicles/[plots|data|logs] folder tree as CSV, JSON and Markdown, so any run can be reproduced exactly.

Live lab · real algorithms in your browser
Customers — Vehicles — Capacity — Total distance — vs. best seen —

The lab runs the same classical baselines the thesis compares against, rebuilt in plain JavaScript on random capacitated instances. Try Sweep, then Clarke-Wright, then switch on 2-opt and watch the total drop.

iii
The results

The quantum leaves come back optimal. The whole fleet is a harder problem.

At the leaf level the QAOA circuit performs very well. Across hundreds of sub-problems it found the proven optimum almost every time, and never once returned an invalid route on the 50- and 100-node instances.

Instance sizeOptimalFeasibleFailed
50 nodes98.5%1.5%0.0%
100 nodes98.1%1.9%0.0%
200 nodes95.2%3.8%1.0%

Against the classical baselines: 100 nodes, 7 vehicles

Stitching optimal leaves together doesn't make the whole fleet optimal. Here is the full benchmark, reported as is:

AlgorithmDistanceGap to best
Clarke-Wright Savings63,461.400.0%
OR-Tools (Guided Local Search)63,461.400.0%
Recursive QAOA + 2-opt81,057.7127.7%
Recursive QAOA88,903.9140.1%
Nearest-neighbour91,602.2744.3%
Sweep159,355.07151.1%

The hybrid solver beats nearest-neighbour and sweep but trails the savings heuristic by 27.7%. Most of that gap comes from the decomposition boundaries, not the quantum step itself. That points clearly at the next piece of work: smarter partitioning and inter-route repair. Classical 2-opt polishing alone already recovers about 12 points.

iv
The product

Then I built the company around it.

A solver in a notebook is a result. To make it a product, I wrapped the engine in a dispatch platform and an app for the drivers who actually do the routes.

i
Optimisation engine

Python · Qiskit

  • QAOA leaf solver with brute-force check
  • Tabu Search, Simulated Annealing, Savings, NN
  • OR-Tools baseline and benchmarking suite
ii
Dispatch console

Laravel 13 · React 19

  • Fleet management and route visualisation
  • Live tracking and re-optimisation via Broadcasting
  • Weighted fairness metric to balance driver workload
  • Sanctum API, roles, audit logs
iii
Driver app

Flutter · Riverpod

  • Background GPS tracking and sync
  • Offline-first local persistence
  • Proof-of-delivery capture
  • Dio client with automatic token refresh and retry

The fairness metric was the product insight: the shortest plan isn't always one your drivers will accept.