• Stars
    star
    120
  • Rank 295,910 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A shared API for QUBO/Ising samplers.
https://circleci.com/gh/dwavesystems/dimod.svg?style=svg

dimod

dimod is a shared API for samplers. It provides:

  • classes for quadratic models---such as the binary quadratic model (BQM) class that contains Ising and QUBO models used by samplers such as the D-Wave system---and higher-order (non-quadratic) models.
  • reference examples of samplers and composed samplers.
  • abstract base classes for constructing new samplers and composed samplers.

(For explanations of the terminology, see the Ocean glossary.)

Example Usage

>>> import dimod
...
>>> # Construct a problem
>>> bqm = dimod.BinaryQuadraticModel({0: -1, 1: 1}, {(0, 1): 2}, 0.0, dimod.BINARY)
...
>>> # Use dimod's brute force solver to solve the problem
>>> sampleset = dimod.ExactSolver().sample(bqm)
>>> print(sampleset)
   0  1 energy num_oc.
1  1  0   -1.0       1
0  0  0    0.0       1
3  0  1    1.0       1
2  1  1    2.0       1
['BINARY', 4 rows, 4 samples, 2 variables]

See the documentation for more examples.

Installation

Installation from PyPI:

pip install dimod

License

Released under the Apache License 2.0. See LICENSE file.

Contributing

Ocean's contributing guide has guidelines for contributing to Ocean packages.

dimod includes some formatting customization in the .clang-format and setup.cfg files.

Release Notes

dimod makes use of reno to manage its release notes.

When making a contribution to dimod that will affect users, create a new release note file by running

reno new your-short-descriptor-here

You can then edit the file created under releasenotes/notes/. Remove any sections not relevant to your changes. Commit the file along with your changes.

See reno's user guide for details.

More Repositories

1

qbsolv

Qbsolv,a decomposing solver, finds a minimum value of a large quadratic unconstrained binary optimization (QUBO) problem by splitting it into pieces solved either via a D-Wave system or a classical tabu solver. (Note that qbsolv by default uses its internal classical solver. Access to a D-Wave system must be arranged separately.)
q
912
star
2

dwave-ocean-sdk

Installer for D-Wave's Ocean tools
Python
388
star
3

dwave-networkx

D-Wave Systems extension of the NetworkX Python package for graphs and graph algorithms.
Python
88
star
4

dwave-system

An API for easily incorporating the D-Wave system as a sampler, either directly or through Leap's cloud-based hybrid samplers
Python
87
star
5

dwave-hybrid

Hybrid Asynchronous Decomposition Sampler prototype framework.
Python
79
star
6

dwave-cloud-client

A minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.
Python
57
star
7

dwave-neal

An implementation of a simulated annealing sampler for general Ising model graphs in C++ with a dimod Python wrapper.
Python
48
star
8

docs

D-Wave Ocean Documentation
Python
46
star
9

minorminer

minorminer is a heuristic tool for minor embedding: given a minor and target graph, it tries to find a mapping that embeds the minor into the target.
C++
46
star
10

demos

WARNING: This repo is obsolete. For D-Wave Ocean code examples, go to the `dwave-examples` GitHub account.
36
star
11

dwave-qiskit-plugin

D-Wave Ocean plugin for IBM Qiskit.
Python
31
star
12

chimera-embedding

Python
27
star
13

dwave-tabu

Tabu solver for QUBO/Ising problems.
C++
20
star
14

dwavebinarycsp

Map constraint satisfaction problems with binary variables to binary quadratic models.
Python
20
star
15

dw_sa_chi

Simulated annealing solvers
C++
19
star
16

penaltymodel

Utilities and interfaces for using penalty models.
Python
19
star
17

dwave-pimc

C++
19
star
18

qboost

WARNING: The Qboost demo is now maintained in a different GitHub account. To find this repo, please visit dwave-examples/qboost.
Python
15
star
19

dwave-gate

dwave-gate is a software package for constructing, modifying and running quantum circuits on the provided state-vector simulator.
Python
14
star
20

dwave-scikit-learn-plugin

A plugin to scikit-learn for quantum-classical hybrid solving
Python
13
star
21

dwave_embedding_utilities

Provides utilities for mapping between source and target models.
Python
9
star
22

dwave_micro_client_dimod

dimod wrapper for the D-Wave Micro Client
Python
7
star
23

dwave_sapi_dimod

dimod wrapper for D-Wave's SAPI Client Library
Python
7
star
24

dwave-inspector

D-Wave Problem Inspector
Python
5
star
25

dwave-samplers

Classical algorithms for solving binary quadratic models
C++
5
star
26

beartooth-demo

Python
5
star
27

homebase

platform independent access to user data folders.
Python
4
star
28

spin-boson-chain

Python
4
star
29

leapide-docs

LeapIDE documentation
4
star
30

dwave-preprocessing

Common preprocessing tools that can aid in solving binary quadratic models (BQM).
C++
4
star
31

ocean-docker

Ocean docker images generator
Python
3
star
32

hss-overview-benchmarks

Benchmarks for the whitepaper D-Wave Hybrid Solver: An Overview (2020-02-25)
3
star
33

dwave-greedy

Greedy binary quadratic model solvers.
Python
2
star
34

shimming-tutorial

Python
2
star