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.2.tar.gz (70.9 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.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for pyhubo-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cb474cc86d60e77f300e821a0a498e40dd25d5e99a649ad7a56f7b338d1a61ee
MD5 aa442b7252f2da6ce7f5b59d8f078306
BLAKE2b-256 a669c2044f6c9c7fb60c7619ac43934eddc1b2e752efad5295dd6f08fd295a1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhubo-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5351f95949a15f678918fc3b4b09eb3af7dce9097711be9114a9847350c416e4
MD5 9ee179d11f387bb63b44185b4805f4d4
BLAKE2b-256 a92c9ea239c902f9c476e174a692d155e53009f0323cc1ae5afb22c616b73caf

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