Metadata-Version: 2.1
Name: pyqbpp
Version: 2026.5.6
Summary: Python bindings for QUBO++ (HUBO/QUBO symbolic computation)
Home-page: https://qubo-plus.github.io/python/
Author: Koji Nakano
Author-email: nakano@cs.hiroshima-u.ac.jp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# 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](https://pypi.org/project/pyqbpp/).
We recommend using a Python virtual environment (venv) to install PyQBPP.
No sudo privileges are required.

```bash
$ 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:
```bash
$ qbpp-license -a
```
If you have a QUBO++ license key, activate it as follows:
```bash
$ 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.

```python
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/
