Skip to main content

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

https://qubo-plus.github.io/python/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyqbpp-2026.4.30-py3-none-manylinux_2_31_x86_64.whl (88.9 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyqbpp-2026.4.30-py3-none-manylinux_2_31_aarch64.whl (84.3 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ ARM64

File details

Details for the file pyqbpp-2026.4.30-py3-none-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for pyqbpp-2026.4.30-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8ba950fd0b069f3482d2116a88309f335c36aa818704e8c4d89ab491d672605b
MD5 7f8b79e270310cae3ec3cc5b948c9e52
BLAKE2b-256 27fc4d83191836defc2f24cc05a4e35e0cfe109743c1b03baeebd0153e651f56

See more details on using hashes here.

File details

Details for the file pyqbpp-2026.4.30-py3-none-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for pyqbpp-2026.4.30-py3-none-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 1b8b5bac970d359abc2131ba7e5f69ef1c404e27796d27f6cf6c480e0da5bac6
MD5 c68a62cc5cbced5ca852026a33fdad88
BLAKE2b-256 04010ad3eb393655856cca2ef3cbc8a95f8febf657e296e6036c0006b7248a61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page