Hybrid Asynchronous Decomposition Solver Framework
Project description
A general, minimal Python framework for building hybrid asynchronous decomposition samplers for quadratic unconstrained binary optimization (QUBO) problems. It facilitates experimentation with structures and parameters for tailoring a decomposition solver to a problem.
The framework enables rapid development and insight into expected performance of productized versions of its experimental prototypes. It does not provide real-time performance.
Installation or Building
Package not yet available on PyPI. Install in developer (edit) mode:
pip install -e git+https://github.com/dwavesystems/dwave-hybrid.git#egg=dwave-hybrid
or from source:
git clone https://github.com/dwavesystems/dwave-hybrid.git cd dwave-hybrid pip install -r requirements.txt python setup.py install
Example
import dimod
from hybrid.samplers import (
QPUSubproblemAutoEmbeddingSampler, InterruptableTabuSampler)
from hybrid.decomposers import EnergyImpactDecomposer
from hybrid.composers import SplatComposer
from hybrid.core import State
from hybrid.flow import RacingBranches, ArgMinFold, SimpleIterator
from hybrid.utils import min_sample
# Construct a problem
bqm = dimod.BinaryQuadraticModel({}, {'ab': 1, 'bc': -1, 'ca': 1}, 0, dimod.SPIN)
# Define the solver
iteration = RacingBranches(
InterruptableTabuSampler(),
EnergyImpactDecomposer(max_size=2)
| QPUSubproblemAutoEmbeddingSampler()
| SplatComposer()
) | ArgMinFold()
main = SimpleIterator(iteration, max_iter=10, convergence=3)
# Solve the problem
init_state = State.from_sample(min_sample(bqm), bqm)
solution = main.run(init_state).result()
# Print results
print("Solution: sample={s.samples.first}".format(s=solution))
Project details
Release history Release notifications | RSS feed
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 dwave-hybrid-0.0.3.tar.gz.
File metadata
- Download URL: dwave-hybrid-0.0.3.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14f7e5fb304941e5a94c3009b5a2af64fd3e22aea573bf50e0f89b2a5cce2ece
|
|
| MD5 |
8e4894b65a738048806ddbda193f3b8f
|
|
| BLAKE2b-256 |
7928a0d6aa94df169416da3c1e2a5393d239b2247c6a7124acd8eb2e73ffe309
|
File details
Details for the file dwave_hybrid-0.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: dwave_hybrid-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 48.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
234a611dd69797b69f774f5a010ae069c44b0a820b851a5c1c421b07b7a36668
|
|
| MD5 |
f9f2990effd073161ebb6c2c2c566e47
|
|
| BLAKE2b-256 |
323a845ecdf59cfb97ea77aad1f566de2e5166adeded4825b721c5a7a73f0d71
|