A shared API for binary quadratic model samplers.
Project description
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
Compatible with Python 3.6+:
pip install dimod
To install from source (requires pip>=10.0.0):
pip install -r requirements.txt
python setup.py install
When developing on dimod, it is often convenient to build the extensions in place:
pip install -r requirements.txt
python setup.py build_ext --inplace
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.
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 Distributions
Hashes for dimod-0.10.6-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b047b663b4d670d5499d1b1c115b578d66ee71429614ac7289fdd93ddc06ea2c |
|
MD5 | f126e28a0a3defac40f483977f4c255b |
|
BLAKE2b-256 | 3cb7e415ccdd76770c51cb7aafe3f6fffb079bffe9d3b00b7ff19b9d36a46404 |
Hashes for dimod-0.10.6-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8260f67799c2923b2664e79e95293130045a77d90a42d30aac125c2717c40a9e |
|
MD5 | 8f7132080c552689bbfb8d13579321e6 |
|
BLAKE2b-256 | c13a5430cc568cf016bd237722762460ef9faa129e21d0d4a29446dfbdb85353 |
Hashes for dimod-0.10.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f8696b25ffe834e2a380d18cfcfd33a4d69a00d1393789d4c68e0507fd2373 |
|
MD5 | a771fb3dd58a5c6b9d9df8be400763f7 |
|
BLAKE2b-256 | b215d83a8db60b24fbfa19e846383d74ec5b39b80ef7ee7ffd88327779731bfb |
Hashes for dimod-0.10.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fb703f909064e98aaf689a3705dca495a2fc4638d9514b5d7d5a0b8925e26a2 |
|
MD5 | 8730cee68320078fb8bc8b818ff1e8a0 |
|
BLAKE2b-256 | ae2f18cd8126818c95b6781ea223b30557f870e6e447ce8fb993963e95a17fc7 |
Hashes for dimod-0.10.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20979f1929bc8c841bef9e864763844f2de3025e1745fe36772e8cf7251ef2c9 |
|
MD5 | 1e500e870e49a68ef5c8a98b3a432926 |
|
BLAKE2b-256 | b634cde23004a011100b405d3833b661717559774bf10b2b4fd39a2ea2c1ec65 |
Hashes for dimod-0.10.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86dcff3a846ffa0ab4b3d0f5ca7ff1b64b4cad36de69539fbd6354f2428c10b6 |
|
MD5 | 525a719ad18820b196e412344437a01b |
|
BLAKE2b-256 | 06a3894399a4547a1d048d2bee65a5e6a7745203fd1f9a2d000eaef8f4c0d2f4 |
Hashes for dimod-0.10.6-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e98884a1caab26d5596fc24a2e184e8318beb5834dbc391391042e724158fe |
|
MD5 | 462bb4aaf201846ca1287a0a2f3c6b42 |
|
BLAKE2b-256 | 56effbec20dcc848286f2c23306c86bc9147e95825fb60779d34ed48f20808e0 |
Hashes for dimod-0.10.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec95d9caf35a3a4d3caa1d0736ec537fc4bad4e0dffd39790032db18f2e1ce9 |
|
MD5 | 23410f4c92f2db87a7c0b8cdf6193126 |
|
BLAKE2b-256 | aa63c5366587390585e3e69e0108d27c36e150555e12b34eb01e495e446faa40 |
Hashes for dimod-0.10.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6d0e33c91185eca307846ac07af00d5102dc9c9f3cff0d6187ccb16396d6bb |
|
MD5 | ae657d1a72eccf4f7de1cfaafe1dc7ea |
|
BLAKE2b-256 | 8c587186418bd737a9417c4f2e827c8e1470983e785edef2a6ac7a74fc746e6f |
Hashes for dimod-0.10.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a03aee633c9cf646a089079d70b4a8f2693c70d27e6d54c9e44304ab90390cf1 |
|
MD5 | d3fdd638597a0e9a9bb24f0b7c537909 |
|
BLAKE2b-256 | 94f09a80bfc9cd07706592d7df3dcae21c072b9e655a012ac7a1cca2263388dc |
Hashes for dimod-0.10.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e2de785d39d4d6f43499a2f623861a645e40ae88e22991c97c6bdae1124596 |
|
MD5 | 6f905efe03b0b814258281900567eb33 |
|
BLAKE2b-256 | fd3867591531d3aef69bcabbdbb3a44aca841fea720fb90233ddd883c2d09b74 |
Hashes for dimod-0.10.6-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4e5126e707028a4d4621e272f1a2a740313036aaefea9d4b7fb1866a3bf66e |
|
MD5 | 7fd29aa3aa1dd97b0b8efd7fd7d7e868 |
|
BLAKE2b-256 | 9b62ecdfd4b6c507814ab44636090c42b922c536967f2674e6e203b46b9d5f71 |
Hashes for dimod-0.10.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f19ed2d5f7469851e3dbb742a5bb2b3f5ad28c990d676243db08ebb43f6e7a09 |
|
MD5 | 4ca860e6f519aa523101ab79b2f95d8e |
|
BLAKE2b-256 | 48a5c1da30dd583e7cfc58b5bdf0f4c6f35317fd977bba0b75a123e879f555f8 |
Hashes for dimod-0.10.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b2f2999ad72d92257d871c24fa91e5c9f378423eae010c67691595bd23b56ec |
|
MD5 | 329a267795f92036e3440615a42c6558 |
|
BLAKE2b-256 | 63630560f9902dd4291073bd33c6c355f6b21c9c0c6001cf95f014d6452e44fa |
Hashes for dimod-0.10.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28abcbd1278387a2c2810455744387e126cf13ed80f4dbec33cc313a8284c5aa |
|
MD5 | cc7982e4affe4659cafccee7d547c60a |
|
BLAKE2b-256 | f50ffa1d074bfa083ccdd97e9e8f30a1d0e399901e9ee43573062e00134d5429 |
Hashes for dimod-0.10.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e55f5d5fa1171ce3808a7eacab37dd356d4487162c002370e76d61627dd2a27a |
|
MD5 | 17bd7f23ca4b8e492f88a3f3774028f7 |
|
BLAKE2b-256 | 9600e78e8b4f5b32f4a2cf22a2892a931ae50b02685819c44e0ec842b7c0a6b6 |
Hashes for dimod-0.10.6-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63da5a9e0d35eb896c6a418e78ac0483a4d961175e0723f12bf1dcdb51452d16 |
|
MD5 | 5cee5397b29d0108b4e1116f94c907b0 |
|
BLAKE2b-256 | 9dbaf638e4ea6467c3eea82228d5ebd3b137610be425edc19c58f8dc5007d336 |
Hashes for dimod-0.10.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6214bc95ac6951fe0c7da68a3bddb92e96edfecd0a20a7e825712f28c70046a |
|
MD5 | 4de41a9a534618cc0d9b9b73f8914dee |
|
BLAKE2b-256 | b435347df253f0e535fd587b230768b25843ac844ad3fb266454826c51b5003d |
Hashes for dimod-0.10.6-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e0e97c9a3391300c44f491023e8bfc07674280ab28f3671941d05472fb95c28 |
|
MD5 | 5112d1aabb04c0a9e084005144e73c9d |
|
BLAKE2b-256 | 0f31aca202797e31d13e5127818c81c082bf82913be0265bcaa2427bbdf463a8 |
Hashes for dimod-0.10.6-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 506037321062bc5c1276863ea04c9d37fca4aa009066e8b48d3ac866342ab72b |
|
MD5 | d237ae03f0610ad01002615ccd0da7c2 |
|
BLAKE2b-256 | d82ce7463013782d8b960980982c1089d10bd1d9768b4b4757257cec129615da |