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 finds an 8x8 permutation matrix (each row and column has exactly one 1).

import pyqbpp 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]))

Example output:

[0, 1, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 1, 0, 0, 0, 0]
[0, 0, 0, 0, 1, 0, 0, 0]
[0, 0, 0, 0, 0, 1, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 1]
[1, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 1, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 1, 0]

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

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyqbpp-2026.4.10-py3-none-manylinux_2_31_aarch64.whl (33.4 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ ARM64

File details

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

File metadata

  • Download URL: pyqbpp-2026.4.10-py3-none-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 35.0 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.4.10-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 834633dbd43489be8c55d60dcd4b3894558489e8305f0f755256177454e29acf
MD5 7fe4fdb22d242cca1876a7dab1758e13
BLAKE2b-256 ae10f87980d6dec8f8177cfdab5e1a6f89b394b8f4876c1c6a4a40f0b7c49050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqbpp-2026.4.10-py3-none-manylinux_2_31_aarch64.whl
  • Upload date:
  • Size: 33.4 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.4.10-py3-none-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 c5baa385ad6a268cfcd44f4674a3701a5d1e1ccf14a821d1dd5370d05b2b4aad
MD5 5e26f40d75e9a466e929764f4772c95f
BLAKE2b-256 35831d232b9275a4f1c92facc12300a686551a8f4e6969a7670019f4cf758c14

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