QUBO++: A model-and-solve framework for combinatorial optimization via QUBO/HUBO
QUBO++ is a framework for formulating and solving combinatorial optimization problems as polynomials of binary variables (QUBO/HUBO). Declaring constraints explicitly with cons() lets the bundled solvers search efficiently for solutions that satisfy them.
More videos are on the Videos (Tutorials) and Videos (Case Studies) pages.
- C++ and Python — Use QUBO++ from C++ (QUBO++) or Python (PyQBPP).
- Easy installation —
sudo apt install qbppfor C++,pip install pyqbppfor Python. No build from source required. - Symbolic DSL — Write optimization models as mathematical expressions, not matrix indices. Use natural for-loops to build constraints, or leverage vector operations for loop-free formulations.
- Native constraints — Wrap a constraint in
cons()to declare it: the constraint is treated specially, and the bundled solvers search efficiently for solutions that satisfy it. This reduces the burden of penalty-weight tuning, and the same declarations are treated as hard constraints by the exact and MIP solvers. See Native Constraints (Python version) for details. - Native integer variables — Bounded integer variables are searched directly as integers, never expanded into binary variables. There is no limit on the bit width of the range (combined with arbitrary-precision integers, ranges beyond $10^{20}$ work), and they are passed to MIP solvers as integer variables as is. See Native Integer Variables (Python version) for details.
- Nonlinear functions — Absolute value
abs,relu,max, andmincan be used directly inside expressions. The bundled solvers handle the function values directly — no auxiliary variables or penalty polynomials to design. See Nonlinear Functions and Native Constraints (Python version) for details. - Unlimited-degree HUBO — Supports high-order terms of any degree, not just quadratic. Native support for negated literals (
~x) avoids the term explosion caused by replacing $\overline{x}$ with $1-x$. - Massive variable capacity — A single model can use up to 1,073,741,823 ($2^{30}-1$) binary variables and as many integer variables.
- Arbitrary-precision integer coefficients — Handles integer coefficients of unlimited bit width. No overflow worries, from 32-bit to thousands of digits.
- Real (double) coefficients — Besides integers, coefficients can be
double. Expressions are built indoubleand automatically quantized to the integer solver when solved, with the energy returned as adouble— so you work entirely in real numbers without dealing with the integer backend. - Three built-in solvers — Easy Solver (fast heuristic), Exhaustive Solver (complete search with optimality guarantee), and ABS3 (GPU+CPU heuristic).
- GPU-accelerated solving — The built-in ABS3 solver fully utilizes GPU resources for parallel search, with multi-GPU scaling. The Exhaustive Solver also automatically uses CUDA GPUs when available.
- CPU parallel acceleration — All solvers run multithreaded on multicore CPUs.
- Experimental third-party solver support — Call SCIP, HiGHS, GLPK, CBC, IBM Qiskit Optimization, dimod ExactSolver, the D-Wave samplers (Neal / Tabu / Steepest), OpenJij, TYTAN-SDK MIKAS, qubovert, Simulated Bifurcation, and Google OR-Tools CP-SAT through a unified
Solver.search()protocol. SCIP, HiGHS, GLPK, and CBC are available from C++ (QUBO++) as well; the others are available from PyQBPP. See MILP Solvers and CP Solvers. - Run anywhere — From a Raspberry Pi to a laptop, GPU servers, and supercomputers. Available for amd64 (x86_64) and arm64 Linux.
QUBO++ Solvers: Easy Solver, Exhaustive Solver, ABS3 Solver
Easy Solver
- Heuristic solver optimized for QUBO/HUBO: Searches for solutions to QUBO/HUBO models on multicore CPUs.
- Multithreaded acceleration: Parallel search on multicore CPUs.
- Unlimited integer coefficients: Supports integer coefficients of arbitrary magnitude.
Exhaustive Solver
- Enumerates all solutions to QUBO/HUBO formulations on multicore CPUs and CUDA GPUs.
- Optimality guaranteed: the global optimum is found and certifiable.
- Multithreaded acceleration: Parallel search on multicore CPUs.
- Unlimited integer coefficients: Supports integer coefficients of arbitrary magnitude.
- GPU acceleration: If a CUDA GPU is available, GPU workers automatically join the search alongside CPU threads. GPU acceleration is available for coefficients up to 128-bit integers; larger coefficients fall back to CPU-only search.
ABS3 Solver
- Heuristic solver on multicore CPUs and CUDA GPUs: Searches for solutions to QUBO/HUBO instances using both CPU threads and CUDA GPUs.
- Unlimited integer coefficients: Supports integer coefficients of arbitrary magnitude.
- Multi-GPU scaling: Uses all detected GPUs on a Linux host. GPU acceleration is available for coefficients up to 128-bit integers; larger coefficients fall back to CPU-only search.
Supported GPU architectures (ABS3 and Exhaustive Solver)
- sm_70 : NVIDIA V100, TITAN V (Volta)
- sm_75 : NVIDIA T4, Quadro RTX 6000/8000, GeForce RTX 2080 Ti/2080/2070/2060 (Turing)
- sm_80 : NVIDIA A100, A30 (Ampere)
- sm_86 : NVIDIA RTX A6000, A40, A10, GeForce RTX 3090/3080/3070 (Ampere)
- sm_89 : NVIDIA L4, L40, L40S, RTX 6000 Ada, GeForce RTX 4090/4080/4070 (Ada)
- sm_90 : NVIDIA H100 / H200 / GH200 (Hopper)
- sm_100 : NVIDIA B200 / GB200 (Blackwell, data center). B300 / GB300 (sm_103) are expected to run the sm_100 code
- sm_120 : GeForce RTX 5090/5080/5070(Ti)/5060(Ti)/5050, RTX PRO 6000/5000/4500/4000/2000 Blackwell (workstation)
- sm_121 : NVIDIA DGX Spark and other GB10 systems (Blackwell, arm64 build)
- GPUs not listed : The models above are examples, not a complete list. What matters is the GPU’s compute capability (
sm_XYcorresponds to X.Y;nvidia-smi --query-gpu=name,compute_cap --format=csvshows it). A GPU that is not listed is expected to work if its compute capability has the same major number as an entry above and the same or a higher minor number. For example, the GeForce RTX 3060 (8.6) runs the sm_86 code and the GeForce RTX 4060 (8.9) runs the sm_89 code. GPUs whose major number is not in the list (6.x and older, and generations released in the future) are not supported. - NVIDIA driver : 525 or later (CUDA 12), in a version that supports your GPU. The CUDA runtime is included in the QUBO++ libraries, so the CUDA Toolkit does not need to be installed.
- Note on verification : Verified on real hardware: V100, RTX 2080 Ti, A100, RTX A6000, RTX 3090, H200, GB200, RTX 5090 and GB10. sm_89 GPUs and B300 / GB300 have not been verified.
Performance note
- Arithmetic overflow checks are omitted to maximize performance.
Build Environment
The following environment was used to build QUBO++. QUBO++ is not limited to Ubuntu 20.04; it has also been tested on Ubuntu 22.04/24.04/26.04 and other Linux distributions (including CentOS/RHEL-based systems). Running it needs glibc 2.28 or later (it also runs on RHEL / Rocky Linux 8). To compile C++ programs, use the same or newer versions of the compiler and Boost listed below. CUDA is the version QUBO++ was built with; running QUBO++ does not need the CUDA Toolkit, only the NVIDIA driver (see “Supported GPU architectures” above).
- Operating System: Ubuntu 20.04.6 LTS
- C++ Standard: C++17
- glibc: 2.31 (the libraries built here need only glibc 2.28 or later at run time)
- Compiler: g++ 9.4.0
- Boost: 1.71.0
- CUDA: 12.8
QUBO++ Licensing
A free Trial license (30 days, 10,000 variables) is available via the QUBO++ User Portal. After installing QUBO++, run qbpp-license -s to obtain today’s sign-up code, then register at the portal to receive your Trial key. The Trial starts when you click Start/Renew in the portal.
For details on license activation, license types, and terms, see License Management.
Third-Party Libraries
The following libraries are linked into the QUBO++ shared objects (qbpp_*.so):
- Boost C++ Libraries — Boost Software License, Version 1.0. See https://www.boost.org/LICENSE_1_0.txt.
- xxHash — BSD 2-Clause License, Copyright © Yann Collet. See https://opensource.org/license/bsd-2-clause/.
- OpenSSL 1.1.1 — OpenSSL License and SSLeay License. See https://www.openssl.org/source/license-openssl-ssleay.txt.
The following library is built into the PyQBPP Python extension modules (_nb_*.so):
- nanobind — BSD 3-Clause License, Copyright © 2022 Wenzel Jakob. See https://github.com/wjakob/nanobind/blob/master/LICENSE.
Optional Solver Backends
Besides the three built-in solvers, QUBO++ can hand a model to a number of external solvers, grouped by the model form each one consumes:
- QUBO/HUBO Solvers — the model is taken directly (OpenJij, dimod samplers, …; PyQBPP only).
- MILP Solvers — the QUBO is linearized into a pure MILP first (SCIP, HiGHS, GLPK, CBC).
- CP Solvers — constraint programming (Google OR-Tools CP-SAT).
Third-party solvers are limited to the open-source ones listed below, whose license terms are clear. None of them is bundled with QUBO++; each must be installed separately:
| Solver | License |
|---|---|
| OpenJij | Apache-2.0 |
| dimod / dwave-samplers | Apache-2.0 |
| qubovert | Apache-2.0 |
| TYTAN-SDK | Apache-2.0 |
| simulated-bifurcation | MIT |
| Qiskit Optimization | Apache-2.0 |
| SCIP | Apache-2.0 |
| HiGHS | MIT |
| GLPK | GPL |
| CBC | EPL |
| Google OR-Tools CP-SAT | Apache-2.0 |
These integrations are experimental — their APIs may change without notice. See each page above for the full solver list, installation, and per-backend caveats.