Hybrid Asynchronous Decomposition Solver Framework
Project description
D-Wave Hybrid
A general, minimal Python framework for building hybrid asynchronous decomposition samplers for quadratic unconstrained binary optimization (QUBO) problems.
dwave-hybrid facilitates three aspects of solution development:
Hybrid approaches to combining quantum and classical compute resources
Evaluating a portfolio of algorithmic components and problem-decomposition strategies
Experimenting with workflow structures and parameters to obtain the best application results
The framework enables rapid development and insight into expected performance of productized versions of its experimental prototypes.
Your optimized algorithmic components and other contributions to this project are welcome!
Installation or Building
Install from a package on PyPI:
pip install 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
import hybrid
# Construct a problem
bqm = dimod.BinaryQuadraticModel({}, {'ab': 1, 'bc': -1, 'ca': 1}, 0, dimod.SPIN)
# Define the workflow
iteration = hybrid.RacingBranches(
hybrid.Identity(),
hybrid.InterruptableTabuSampler(),
hybrid.EnergyImpactDecomposer(size=2)
| hybrid.QPUSubproblemAutoEmbeddingSampler()
| hybrid.SplatComposer()
) | hybrid.ArgMin()
workflow = hybrid.LoopUntilNoImprovement(iteration, convergence=3)
# Solve the problem
init_state = hybrid.State.from_problem(bqm)
final_state = workflow.run(init_state).result()
# Print results
print("Solution: sample={.samples.first}".format(final_state))
License
Released under the Apache License 2.0. See LICENSE file.
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
Hashes for dwave_hybrid-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da383908ce1134cb1a69607615e3ce86ec3ea6d2a5788a246aa4d5c39be2d438 |
|
MD5 | 753073c545af6e077e7254a809d511ac |
|
BLAKE2b-256 | 50770f6012e2502d5dc731b134ff1c3d9a1a269cf3eb7006e1a591c2e4bbe30e |