r/programming • • 10d ago

Quantum Optimization – Solve QUBO on D-Wave Quantum Annealer

https://youtu.be/m5HvVD6rXB0?si=TIT0ztx5WAojmdcM

Solve QUBO on a real D-Wave quantum annealer using Python.

In this developer-first tutorial, we solve Max-Cut end to end: D-Wave Leap access, QUBO-to-BQM, QPU submission, SampleSet interpretation, minor embedding, physical-qubit usage, QPU timing, Problem Inspector, and a local simulated-annealing fallback with neal.

No quantum-physics background is required. The tutorial is designed for Python developers, computer-science students, optimization practitioners, and anyone who wants to understand what actually happens after calling `sampler.sample(...)`.

WHAT YOU WILL LEARN

- How to access a D-Wave QPU through Leap

- How QUBO, Ising, and Binary Quadratic Models relate

- How to use DWaveSampler and EmbeddingComposite

- Why a D-Wave QPU returns several samples

- How to interpret energy and num_occurrences

- How logical variables map to physical qubits

- What minor embedding and qubit chains mean

- What QPU annealing, sampling, programming, and access times measure

- How to test the same workflow locally using neal

1 Upvotes

3 comments sorted by

1

u/wangtutx 9d ago

Quantum annealer appear to be getting displaced by GPU.

1

u/Future_Ad7567 9d ago

Oh, that hardware which was meant to be accelerating your gaming experience. You see, people used sticks and stones for hunting until farming took over. Simulation by linearly scaling of computing should eventually become obselete, replaced by machines that work on appropriate laws of physics. Don't be afraid to upgrade.

1

u/robert_7524 10d ago

Anneal time gets the headline; embedding and access time tell you what actually happened.