A python package for resource-efficient quantum optimization
Project description
PyHUBO
A Python package for resource-efficient quantum optimization
PyHUBO provides an elegant mathematical framework for designing Higher-order Unconstrained Binary Optimization (HUBO) Hamiltonians for combinatorial optimization problems. Unlike traditional QUBO formulations, PyHUBO enables natural representation of complex constraints and objectives through higher-order interactions.
Why HUBO over QUBO?
Traditional QUBO (Quadratic Unconstrained Binary Optimization) formulations often require auxiliary variables and penalty methods limiting parameter optimization for example in QAOA, resulting in suboptimal solutions and extensive quantum resources. HUBO models can circumvent these limitations, enabling:
- Natural problem representation without penalty terms
- Reduced quantum resource requirements through more efficient encodings
- Direct modeling of multi-variable constraints and higher-order relationships
- Seamless integration with quantum annealers and classical optimization solvers
Key Features
- Intuitive Mathematical Interface: Build optimization problems using natural mathematical expressions
- Automatic Constraint Handling: Built-in conflict resolution and validation
- Flexible Variable Domains: Support for discrete variables with arbitrary value sets
- Quantum Integration: Direct conversion to quantum Hamiltonian representations
- Multiple Solver Examples: Openjij and pennylane implementations are shown in example scripts
Installation
Install PyHUBO from PyPI:
pip install pyhubo
Examples
We illustrate the usage of Pyhubo on three distinct combinatorial optimization problems:
An example for dealing with problems where the domain size is not to the power of two is also given in the Maximum k-colorable Subgraph Problem script.
Issues
Please email me (frederik.koch@uni-hamburg.de) in case you spot any issues or if you have any suggestions to improve pyhubo.
Citation
Citation for this work is provided in the GitHub repository ("About > Cite this repository").
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhubo-1.0.3.tar.gz.
File metadata
- Download URL: pyhubo-1.0.3.tar.gz
- Upload date:
- Size: 70.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
237a2bfb8f09450d4856f2858f7d6a8c85527f5e854bf179184b65caf1317da0
|
|
| MD5 |
1f7ae172c9785b1ccbf46e2a0dc6d6e6
|
|
| BLAKE2b-256 |
c3a47165ebe3db01ee4a1fc0829d345de16e879cd6736e8b575abefd7f2cfe5f
|
File details
Details for the file pyhubo-1.0.3-py3-none-any.whl.
File metadata
- Download URL: pyhubo-1.0.3-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b3252bdd64c77626a4309aec433bd26f830059a58656fdd58532f66be12b072
|
|
| MD5 |
8b5721f2220c3bf417f385f01ee7b567
|
|
| BLAKE2b-256 |
86d2c3262f104a985871652c40b1517e07161869fcb1a2d7b32e501dd0d07638
|