Skip to main content

A python package for resource-efficient quantum optimization

Project description

PyHUBO

A Python package for resource-efficient quantum optimization

Python License: MIT Version

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

pyhubo-1.0.1.tar.gz (70.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyhubo-1.0.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file pyhubo-1.0.1.tar.gz.

File metadata

  • Download URL: pyhubo-1.0.1.tar.gz
  • Upload date:
  • Size: 70.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyhubo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 44b4f2aa4deb9fa93f199e3c119fe60fdc469c8c5efac85b669e831f5160cc3f
MD5 6ab58b1b2f1e2d00148cc27efc1cc99a
BLAKE2b-256 acb89451ded9919294366f42561447f3579bf62c82fb9a9cb5e99a07d70ef61f

See more details on using hashes here.

File details

Details for the file pyhubo-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyhubo-1.0.1-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

Hashes for pyhubo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae3570570f55e94f603b53f0f50498d3c811921f7b1a6342f5b303600793a005
MD5 760a91adb81bd0b669ec895e1ebdc2fc
BLAKE2b-256 ecbda391cdeb0c9e5b1ca89233c6f32781028e214e670473c70cd5b53310fb8c

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