Skip to main content

Python QUBO++ Symbolic Computation Library (C++ backend)

Project description

PyQUBO++: Python Interface for QUBO++

PyQUBO++ is a Python wrapper for the QUBO++ library, allowing you to model and solve combinatorial optimization problems using QUBO/HUBO formulations directly from Python.

Note: PyQUBO++ is currently in alpha. The API may change without notice, and there may be bugs. Please report any issues to the author.

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
  • Python 3.8 or later

Installation

PyQUBO++ is available on PyPI. We recommend using a Python virtual environment (venv) to install PyQUBO++. No sudo privileges are required.

$ python3 -m venv ~/qbpp-env
$ source ~/qbpp-env/bin/activate
$ pip install pyqbpp

After installation, activate your QUBO++ license. Set the QBPP_LICENSE_KEY environment variable to your license key and run qbpp-license -a. If QBPP_LICENSE_KEY is not set, an anonymous trial license will be activated.

$ export QBPP_LICENSE_KEY=[Your QUBO++ license key]
$ qbpp-license -a

Quick Example

The following program finds an 8×8 binary matrix where each row and each column contains exactly one 1 (a one-hot constraint).

from pyqbpp import EasySolver, var, sum, vector_sum

n = 8
x = var("x", n, n)

# Each row and column has exactly one 1
f = sum(vector_sum(x, 0) == 1) + sum(vector_sum(x, 1) == 1)

f.simplify_as_binary()

solver = EasySolver(f)
solver.target_energy(0)
sol = solver.search()

for i in range(n):
    print([sol(x[i][j]) for j in range(n)])

Documentation

https://qbpp-doc.cs.hiroshima-u.ac.jp/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.3.12-py3-none-manylinux_2_31_x86_64.whl (18.6 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyqbpp-2026.3.12-py3-none-manylinux_2_31_aarch64.whl (18.0 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ ARM64

File details

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

File metadata

  • Download URL: pyqbpp-2026.3.12-py3-none-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 18.6 MB
  • Tags: Python 3, manylinux: glibc 2.31+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyqbpp-2026.3.12-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 0c62eb5113706c9c4e6a39a099301ccd0cdd0021a250d01409d86ff09b8bd414
MD5 e25fc64934c0eabb3b4864207be7c7a8
BLAKE2b-256 df26c5c82c4d69c2963ee948694cf4dd18c20309b851bcdf2803086b8c5d572b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqbpp-2026.3.12-py3-none-manylinux_2_31_aarch64.whl
  • Upload date:
  • Size: 18.0 MB
  • Tags: Python 3, manylinux: glibc 2.31+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyqbpp-2026.3.12-py3-none-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 9bd7b2916a9b100c6d55dd40406873a9c4a76935cfe000a56cc124673353b785
MD5 7036fbc35b8f7d46c933a21a3c09a3d5
BLAKE2b-256 1487b298104c680e29794ae5410bb2a92ac51d85b4ffca06bcf357668cff4557

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