Beginner-friendly Python walkthrough: solving a binary quadratic problem with gurobipy
▲ 30 r/ScientificComputing+9 crossposts

Beginner-friendly Python walkthrough: solving a binary quadratic problem with gurobipy

I created a practical Python walkthrough for programmers interested in mathematical optimization with gurobipy.

The example formulates Max-Cut as a quadratic binary optimization problem and covers:

- creating a Gurobi model;

- adding binary decision variables;

- constructing a quadratic objective from a matrix;

- calling optimize();

- extracting the binary solution and objective value;

- benchmarking randomly generated problem instances;

- and understanding how MIPGap affects runtime.

It assumes familiarity with Python, and Jupyter notebooks, but no previous optimization experience.

Video: https://youtu.be/TB1ny8o4ImQ

Code: https://github.com/supreethmv/Quantum-Algorithms-and-Applications

I’d particularly appreciate feedback on whether the gurobipy implementation and explanation are approachable for Python developers encountering quadratic optimization for the first time.

u/Future_Ad7567 — 1 day ago
▲ 13 r/GraphTheory+1 crossposts

Hey everyone, I made a video explaining QUBO using the MaxCut problem, aimed at programmers and IT professionals with no physics background required.

It starts from a weighted graph, shows how MaxCut becomes QUBO, explains the matrix form, and then walks through a Jupyter notebook demo.

If you’ve ever heard “QUBO” in quantum computing and felt it sounded more mysterious than it should, this might help.

I wanted this one to be digestible even if your background is mainly:
Python, algorithms, optimization, ML, or general software engineering.

Would genuinely love feedback from developers:
Does this style make quantum optimization feel more approachable?

u/Future_Ad7567 — 4 months ago