dwave-hybrid#
Reference documentation for dwave-hybrid:
About dwave-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!
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))
Usage Information#
Concepts for terminology
dwave-hybrid Development Framework for an introduction to using this package
Leap Service’s Hybrid Solvers for an introduction to using hybrid solvers in the Leap service
Quantum Research for documentation on using D-Wave quantum computers.
Hybrid Usage Examples for detailed usage examples.