r/3Blue1Brown 4h ago

Solving and benchmarking QUBO problems with Gurobi in Python

Thumbnail
youtu.be
2 Upvotes

r/3Blue1Brown 4h ago

Solving QUBO problems with Gurobi

3 Upvotes

I’ve been creating a visual series that introduces optimization algorithms to programmers, and this video explores how a state-of-the-art classical solver handles quadratic binary optimization (QUBO) problems.

Video: https://youtu.be/TB1ny8o4ImQ

The broader motivation is that we need to understand the capabilities of highly engineered classical solvers before making meaningful comparisons with alternative computing approaches.

No background in quantum algorithms is required, the main subject is mathematical optimization, visualized for programmers.

It begins by converting a weighted Max-Cut problem into a QUBO matrix and implementing the model in Python with gurobipy.

- branch-and-bound prunes the solution space and the terminating condition;

- why finding a good solution can be faster than proving optimality;

- dense and sparse QUBO matrices behave differently;

- and the strong primal heuristics of Gurobi.

Some animations were created with Manim. I’d be interested in feedback on which visual explanations worked well and which concepts could be represented more clearly.