Quantum Information, Game Theory, and the Future of Rationality
From Towers of Hanoi to Towers of Jebel Ali: A Quantum Approach to Port Logistics
Behind the clean geometry of a container port lies a mess: stacks that reshuffle endlessly, wasting time, fuel, and money. This post follows my work with DP World to tame that chaos using quantum annealing. The problem shares a spirit with the classic Towers of Hanoi — but unlike that tidy puzzle, this one comes with no elegant formula, only a vast configuration space and real-world stakes.
Faisal Shah Khan, PhD
9/1/20254 min read


From a distance, container ports look immaculate: towers of steel containers arranged with geometric precision, cranes gliding smoothly overhead, cargo ships docked in silent formation. However, beneath that clean symmetry lies a deeply repetitive problem—one that quietly wastes enormous amounts of time, energy, and money. It occurs when a truck arrives to collect a specific container. More often than not, that container is not sitting conveniently on top. It is somewhere in the middle of a stack. To reach it, cranes must lift other containers out of the way, only to place them right back again once the target is retrieved. These unnecessary movements are called “reshuffles,” and they happen constantly.
A rough industry estimate from 2021 puts the cost of a single unproductive move at approximately $5. Now multiply that across global terminals. In 2024, DP World handled approximately 88.3 million containers. Even assuming just two reshuffles per container, the result is staggering: 88.3 million × 2 × $5 = $883 million per year in inefficiency. That is a cost the port must absorb. It cannot be passed to customers. It is operational drag: silent, relentless, and very expensive.
In 2021, DP World commissioned my team at Dark Star Quantum Lab to study this problem, specifically exploring whether quantum annealing could be used to reduce reshuffling. This was not a curiosity-driven project. It was a proof-of-concept study with a specific goal: to test whether a quantum annealer could generate optimal container configurations that minimize future reshuffling. The first step was not quantum computing—it was mathematics. We modeled the container yard as a classic Quadratic Assignment Problem (QAP), a well-known structure in operations research. The idea was to capture not just the cost of placing a container in a certain spot, but also the relational impact between containers—that is, which containers tend to be retrieved together, and how far apart we are placing them.
To do this, we used correlation matrices to represent historical relationships between containers (how likely two containers are to be retrieved close together in time), and distance matrices to represent the spatial structure of the container bay. These two ingredients—relationships and layout—form the backbone of the QAP cost function. The result was a precise mathematical expression that balanced individual placement costs with the combinatorial impact of container-to-container interactions. From there, we reformulated the problem into a QUBO: Quadratic Unconstrained Binary Optimization, the standard format required for quantum annealers. In QUBO form, the objective becomes finding a binary configuration that minimizes this expression. And that is exactly what quantum annealers are designed to do. Therefore, while the end result was executed on a quantum device, the heavy lifting, mathematically, occurred before the machine was ever turned on.
Of course, the moment we began modeling, the scale of the challenge became obvious. For just fifteen containers, the number of possible configurations exceeds a trillion. This is an NP-hard problem: the kind of problem where computation time grows too fast for brute force to be practical. Even the classic Towers of Hanoi puzzle, exponential as it is, appears gentle in comparison. That puzzle is often used to illustrate how complexity grows: three disks take seven moves, ten disks take over a thousand, and sixty-four would take longer than the age of the universe to complete if one moved a disk every second. However, at least Hanoi has a clean, recursive solution. With container stacking, the complexity grows factorially, not exponentially. There is no tidy formula, just a vast, tangled solution space and the simple question: which arrangement avoids the most reshuffles?
Some have proposed avoiding the stacking problem altogether by replacing it with large-scale horizontal rack systems, where every container has its own pull-out slot, like a book in a shelf. And indeed, that idea exists. A few automated inland logistics hubs use these systems to great effect. However, they do not scale to global ports. The infrastructure costs are enormous, the land requirements are impractical, and, most importantly, container ships still deliver their cargo in vertical stacks. Unstacking everything into racks would require more handling, not less. Therefore, stacking remains. And with it, the optimization problem.
Once in QUBO form, we executed the model on a quantum annealer. The machine explored the vast solution space and returned stacking configurations that reduced reshuffling. The results were promising. Even small improvements—5 percent efficiency gains—translate to major operational savings. For a company the size of DP World, that is worth tens (if not hundreds) of millions of dollars annually. And that does not even touch the second-order effects: less fuel, faster turnaround, reduced crane wear, and lower emissions.
However, quantum annealing, like the horizontal racking systems, is not without limitations. Today’s quantum hardware is still evolving. Current annealers are bounded in size, connectivity, and integration capabilities. In that sense, the quantum solution and the racking solution are mirrors of each other: both scalable in principle, but not yet at global port scale in practice.
What is encouraging, however, is the flexibility of the quantum approach. It does not require concrete or steel. It fits into existing operations. And while it cannot yet solve everything, it can already solve enough to matter. Perhaps the most exciting part is that this is not just about containers. The same structure—quadratic cost, binary choices, complex relationships—shows up everywhere: in workforce scheduling, in traffic systems, in investment portfolios. Once one can write the problem in the right form, the same quantum logic applies, potentially solving related problems for ports.
In the end, no one notices a well-stacked container. However, when fewer cranes move, when fewer hours are lost, when fewer gallons of fuel are burned, that is real progress: quiet, practical, and measurable.
If you are curious about the modeling, the QUBO formulation, or the quantum annealing process, I would be glad to talk more. Feel free to reach out.