Skip to content

Solving a QUBO instance

Solving a QUBO instance means feeding an Instance to a solver. qubosolver gives you two ways to do that:

  • Call the classical or quantum pipeline functions directly, composing transforms and solvers as needed.
  • Or use Solver with a SolverConfig, which wraps a common pipeline (transform → solve → lift) behind a single call, and lets you switch between a classical and a quantum approach by configuration alone.

Composition of solvers and transforms

A solve is a pipeline: an optional chain of transforms reduces or adapts the instance, a solver produces a solution for the transformed instance, and each transform is "lifted" in reverse to map that solution back to the original instance.

Composition of solvers and transforms

An optional chain of transforms reduces the instance, a solver produces a solution, then each transform is lifted in reverse to map that solution back to the original instance.

Solver/SolverConfig builds this pipeline for you: preprocessing=True chains the configured transforms before solving, postprocessing=True chains refinement solvers after, and the solver itself is either the classical or quantum pipeline depending on solving. See Transforms and Solvers for the building blocks.

The quantum pipeline

Solving with a quantum approach turns the instance into a program that runs on a neutral-atom device — an embedding step maps variables onto atoms, drive shaping builds the laser pulse, and the result is compiled and run on a backend (a local emulator, a remote emulator, or a real QPU).

The quantum pipeline

Embedding maps the instance onto a register of atoms; drive shaping builds the drive from that register; both feed into a compiled QuantumProgram, which a backend (a QPU or an emulator) runs. run returns a Job as soon as it's queued — the Solution is fetched later through that job, via an async fetch, once it's ready.

See The quantum pipeline for the full walkthrough, including a runnable example and how to plot the register and drive.

Where to go next