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.

Note: PyQBPP 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

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. 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 8x8 binary matrix where each row and each column contains exactly one 1 (a one-hot constraint).

import pyqbpp.c32e64 as qbpp

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

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

f.simplify_as_binary()

solver = qbpp.EasySolver(f)
sol = solver.search({"target_energy": 0})

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

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.4.1-py3-none-manylinux_2_31_x86_64.whl (34.1 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyqbpp-2026.4.4.1-py3-none-manylinux_2_31_aarch64.whl (32.5 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ ARM64

File details

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

File metadata

  • Download URL: pyqbpp-2026.4.4.1-py3-none-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 34.1 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.31.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyqbpp-2026.4.4.1-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 96d7bb7ad2a06ce279d893e038020816a9741f4e9bd346d32d51d6b5689b7063
MD5 bc898a620dc8c4408b177bc63169b4db
BLAKE2b-256 18d39c584530d0f6c476ce67759259601b1f7a231ea23f87f837bbf5e7c0b22f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqbpp-2026.4.4.1-py3-none-manylinux_2_31_aarch64.whl
  • Upload date:
  • Size: 32.5 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.31.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyqbpp-2026.4.4.1-py3-none-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 fc90b82389ffa9bcb776cadb703bd9e7ac20aa1fff7b59501c291d7397652880
MD5 924febe58fbd9da3f8ca337e50b5efc1
BLAKE2b-256 d34b4e99338661908cd48dc0429475316adbfa3c49fd8dd0ef739f70988e6dc9

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