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 in development mode:
git clone https://github.com/dwavesystems/dwave-hybrid.git cd dwave-hybrid pip install -e .
Testing
Install test requirements and run unittest:
pip install -r tests/requirements.txt python -m unittest
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.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))
Documentation
Documentation for latest stable release included in Ocean is available as part of Ocean docs.
License
Released under the Apache License 2.0. See LICENSE file.
Contributing
Ocean’s contributing guide has guidelines for contributing to Ocean packages.
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
File details
Details for the file dwave-hybrid-0.6.12.tar.gz
.
File metadata
- Download URL: dwave-hybrid-0.6.12.tar.gz
- Upload date:
- Size: 64.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9f3278954e1795217d032c24f2b6d4d96e64ffc92981a273a11bc5d3bd2558 |
|
MD5 | 903bc19ca7bf5ec1b84905097bd0b04b |
|
BLAKE2b-256 | a970af71ddbb94f58c684eb5ef9ea18c88b4977e382f3c6194c5379509d9069a |
File details
Details for the file dwave_hybrid-0.6.12-py3-none-any.whl
.
File metadata
- Download URL: dwave_hybrid-0.6.12-py3-none-any.whl
- Upload date:
- Size: 77.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb078eef2b4576bd0a59f137ee1785f481ac97bbe430eab37c018da204b7893 |
|
MD5 | d82f2a220f593923425452feee617d51 |
|
BLAKE2b-256 | 8554325c4fe2077cdeaff05f5fed669115ef27e3721f996e0f5aa48f3927ca14 |