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
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.
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.
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.
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.
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 size | Optimal | Feasible | Failed | |
|---|---|---|---|---|
| 50 nodes | 98.5% | 1.5% | 0.0% | |
| 100 nodes | 98.1% | 1.9% | 0.0% | |
| 200 nodes | 95.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:
| Algorithm | Distance | Gap to best | |
|---|---|---|---|
| Clarke-Wright Savings | 63,461.40 | 0.0% | |
| OR-Tools (Guided Local Search) | 63,461.40 | 0.0% | |
| Recursive QAOA + 2-opt | 81,057.71 | 27.7% | |
| Recursive QAOA | 88,903.91 | 40.1% | |
| Nearest-neighbour | 91,602.27 | 44.3% | |
| Sweep | 159,355.07 | 151.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.
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.
Python · Qiskit
- QAOA leaf solver with brute-force check
- Tabu Search, Simulated Annealing, Savings, NN
- OR-Tools baseline and benchmarking suite
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
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.