DEV Community

Cover image for When Quantum Helps the Cops: How D-Wave’s Hybrid Computer Optimized Police Response Times
David Graves
David Graves

Posted on

When Quantum Helps the Cops: How D-Wave’s Hybrid Computer Optimized Police Response Times

“Hybrid-quantum application reduced time to solution from four months to four minutes and cut average incident response times by nearly 50%.”
— D-Wave & North Wales Police, September 2025

A Real-World Quantum Success Story

For years, “quantum advantage” has felt like something perpetually just out of reach. But this fall, North Wales Police quietly showed the world that the future might already be here.

In a partnership with D-Wave, they built a hybrid quantum application that helped optimize where police vehicles should be placed across their region, balancing coverage and minimizing response times.

And it worked: what once took months of planning was reduced to minutes, and average response times fell by nearly half. That’s not just theory…that’s quantum physics helping people on the ground.

The Optimization Problem in Plain English

Think of the challenge like this:

You’ve got a limited number of patrol cars and a map divided into different zones. You can park each vehicle somewhere, but you don’t know exactly where incidents will happen next.

The challenge? Put the vehicles where they’ll be most useful, so that no matter where the next call comes from, someone can get there fast.

The tricky part is that there’s no single “right” answer…just an insane number of possible combinations. If you have 10 cars and 20 zones, that’s billions of potential arrangements. Even the best classical algorithms can bog down trying to find the ideal balance between distance, demand, and coverage.

That’s where quantum annealing comes in. Instead of checking every possible configuration one by one, it uses quantum effects to explore many possibilities at once. Think of it like watching marbles roll across a bumpy landscape. Each valley is a potential solution. The goal is to find the deepest one, the global best.

A Toy Example: Placing Patrol Cars with Python

Here’s a simplified demo that shows what this kind of optimization feels like in code. We’ll use D-Wave’s open-source dimod library and a simulated annealer (which you can later replace with a real D-Wave solver).

from dimod import BinaryQuadraticModel
from dwave.samplers import SimulatedAnnealingSampler

vehicles = ['A', 'B']
zones = [1, 2, 3]
demand = {1: 2.0, 2: 1.0, 3: 3.0}
distance = {
    (1,1): 0, (1,2): 5, (1,3): 9,
    (2,1): 5, (2,2): 0, (2,3): 4,
    (3,1): 9, (3,2): 4, (3,3): 0
}

Q = {}
penalty = 50.0

# Objective: minimize expected response time to incidents
demand_weight = 0.5
for v in vehicles:
    for i in zones:
        response_cost = sum(demand[j] * distance[(i, j)] for j in zones)
        Q[((v, i), (v, i))] = response_cost - demand_weight * demand[i]

# Constraint 1: each vehicle assigned to exactly one zone
for v in vehicles:
    for i in zones:
        Q[((v, i), (v, i))] = Q.get(((v, i), (v, i)), 0) - 2 * penalty
    for i in zones:
        for j in zones:
            if i < j:
                Q[((v, i), (v, j))] = Q.get(((v, i), (v, j)), 0) + 2 * penalty

# Constraint 2: no two vehicles assigned to the same zone
for i in zones:
    for v1_idx, v1 in enumerate(vehicles):
        for v2 in vehicles[v1_idx + 1:]:
            # Penalize both vehicles being in the same zone
            Q[((v1, i), (v2, i))] = Q.get(((v1, i), (v2, i)), 0) + 2 * penalty

# Solve
bqm = BinaryQuadraticModel.from_qubo(Q)
sampler = SimulatedAnnealingSampler()
result = sampler.sample(bqm, num_reads=100).first

print(f"Energy: {result.energy}")
print("\nBest configuration:")
assigned_zones = {}
for var, val in result.sample.items():
    if val:
        v, i = var
        assigned_zones[v] = i
        print(f"  Vehicle {v} -> Zone {i}")
        avg_response = sum(demand[j] * distance[(i, j)] for j in zones) / sum(demand.values())
        print(f"    Expected response time: {avg_response:.2f}")
Enter fullscreen mode Exit fullscreen mode

This little model tries to “place” each patrol car in the zone that best balances travel cost and incident likelihood. In real-world versions, dozens (or hundreds) of such constraints are modeled at once: travel time, shift overlap, coverage radius, even historical crime data.

The real D-Wave solver does the same thing on a much larger scale, using quantum annealing to explore solutions faster than classical methods can.

From Demo to Deployment

The North Wales Police project took this concept out of simulation and into daily operations. They fed real geographic data, historical incident logs, and shift schedules into a hybrid quantum-classical solver hosted by D-Wave.

The hybrid model used quantum annealing to explore thousands of deployment configurations, while classical algorithms refined and verified the best candidates.

The results were dramatic:

4 months to 4 minutes: time to generate new deployment strategies
~50% improvement in average response times
90% of incidents responded to within the target window
Enter fullscreen mode Exit fullscreen mode

That’s not just faster computing, that’s faster help arriving where it’s needed most. The same logic can optimize ambulance routes, delivery fleets, or even power grids.

The Quiet Revolution

The North Wales Police project shows something profound: quantum computing doesn’t need to replace classical systems to be valuable. It just needs to amplify them. By combining quantum exploration with classical logic, we’re beginning to see a new kind of intelligence, one that finds better answers not by thinking harder, but by thinking differently.

Quantum computing isn’t a future headline anymore. It’s quietly making cities safer, one optimized decision at a time.

Top comments (0)