Python bindings for QUBO++ (HUBO/QUBO symbolic computation)
Project description
PyQBPP: Python Interface for QUBO++
PyQBPP is a Python wrapper for the QUBO++ library, allowing you to model and solve combinatorial optimization problems using QUBO/HUBO formulations directly from Python.
Features
- Symbolic construction of QUBO/HUBO expressions in Python
- Access to QUBO++ solvers (Easy Solver, Exhaustive Solver, ABS3)
- Familiar Python syntax with the full power of the QUBO++ engine
Supported Environment
- Linux (Ubuntu 20.04 or later)
- x86_64 or arm64 (aarch64) CPUs
- CUDA-enabled NVIDIA GPUs
- Python 3.8 or later
Installation
PyQBPP is available on PyPI. We recommend using a Python virtual environment (venv) to install PyQBPP. No sudo privileges are required.
$ python3 -m venv ~/qbpp-env
$ source ~/qbpp-env/bin/activate
$ pip install pyqbpp
After installation, activate your QUBO++ license. The following command will activate an anonymous trial license:
$ qbpp-license -a
If you have a QUBO++ license key, activate it as follows:
$ qbpp-license -k YOUR-LICENSE-KEY -a
Quick Example
The following program solves a simple QUBO problem by expanding and minimizing the expression f = (a + 2b + 3c - 4)^2.
import pyqbpp as qbpp
a = qbpp.var("a")
b = qbpp.var("b")
c = qbpp.var("c")
f = qbpp.sqr(a + 2 * b + 3 * c - 4)
f = qbpp.simplify_as_binary(f)
print("f =", f)
solver = qbpp.EasySolver(f)
sol = solver.search(time_limit=10, target_energy=0)
print("sol =", sol)
Output:
f = 16 -7*a -12*b -15*c +4*a*b +6*a*c +12*b*c
sol = Sol(energy=0, {a: 1, b: 0, c: 1})
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqbpp-2026.5.6-py3-none-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pyqbpp-2026.5.6-py3-none-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 89.5 MB
- Tags: Python 3, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2813cef6c10226ad3193db09d7c41989ed598f867bb36293a590415c78ee01d
|
|
| MD5 |
9b07e25d8436968f8c04feafc8df8f48
|
|
| BLAKE2b-256 |
bf549c568bf4a0adaa04e98e1fe0210f1f240bdf1ea89ec5ad890b04260fabb9
|
File details
Details for the file pyqbpp-2026.5.6-py3-none-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: pyqbpp-2026.5.6-py3-none-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 84.9 MB
- Tags: Python 3, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
175a3232105c9712f51d7fe45504b6e3c5fe411616222ae2f37e49a4552bc8f6
|
|
| MD5 |
ea33a7ced5910e39c19e912c3b37d8f0
|
|
| BLAKE2b-256 |
5e931b9f2e90a966414a8f98ae3b3737b261892bc836b1fcd82f8ff558079015
|