A shared API for binary quadratic model samplers.
Project description
dimod
dimod is a shared API for binary quadratic samplers. It provides a binary quadratic model (BQM) class that contains Ising and quadratic unconstrained binary optimization (QUBO) models used by samplers such as the D-Wave system. It also provides utilities for constructing new samplers and composed samplers and for minor-embedding. Its reference examples include several samplers and composed samplers.
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.5+:
pip install dimod
To install with optional components:
pip install dimod[all]
To install from source:
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
Note that installation from source requires that your system have the Boost C++ libraries installed.
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 Distributions
Hashes for dimod-0.9.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b28d26c21eac66ebd22ac4c4b8625dc627beee53225606de6387f82cd2b9c94 |
|
MD5 | 7c53122715edaffd1e7f54b3fe037931 |
|
BLAKE2b-256 | f176a036456fda83a2256bb11f140880925fd9a361269fc2d5ffbce0023abf4c |
Hashes for dimod-0.9.10-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c88b0c60f6be326e61803cf4ad42d0f5d882bc203eec7514cae056f8e1fe03 |
|
MD5 | babd2e7aa565b0670be2103d993fc526 |
|
BLAKE2b-256 | 0d6d0bfaebdf9a20611d38ca48ecb9915639ca54a1810c4d5e6389ff33c63d8b |
Hashes for dimod-0.9.10-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2f5dc2bddf482cabee9d758f2249bef84858c97d0212ce7cfc4cd1896910eaf |
|
MD5 | fbef91c9d6ad93d85f5f4fb167752596 |
|
BLAKE2b-256 | 67726edb8ca5b33c0db1115a81c2be8d49bfd68728979ffe8fce69b2fd2b80de |
Hashes for dimod-0.9.10-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ce244f460d34a8f114028f502da25fe5b4b16483700170df4b7b0ff0c15d67 |
|
MD5 | 7eae5a9c8130b026e5822883294436ee |
|
BLAKE2b-256 | 16bd139492e7cf83e297273646691a9bbbefcb72d6f259ff0782161ee38287da |
Hashes for dimod-0.9.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b4da4d8d3beabd39da328eb517822ea528dbdbad6b205a4fef90b6891c5f79 |
|
MD5 | aa1b30c566d081a29ecf5e6108464224 |
|
BLAKE2b-256 | 62abbb160bed242754b81178d04e05ebc5dcc6565844917ae5a052013011d56b |
Hashes for dimod-0.9.10-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b47e5a2448bffef7d345d52c5af3ca647d489e778365d7483c1ff8dfba24f8 |
|
MD5 | 42960132377e982d248bb26a59cf2c19 |
|
BLAKE2b-256 | 1a7c4176fe3361be8cc0b24c999ad3b899d050847a216621425aece71afd977b |
Hashes for dimod-0.9.10-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0e0ccc12733316e8f1c49493e0f1dd7fe5abbe3d37b642e112538b336724eb |
|
MD5 | b93fd5d0b9bc0945009c2c083a77f4aa |
|
BLAKE2b-256 | e9ae11f62fb4712aa51aa21f5631e8f56918f7f29da1984d032791c58a45e0ea |
Hashes for dimod-0.9.10-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49de9f4dc352f91259b4697bb991e845bc3e86987bbc74c52e1b606a1cc8fa58 |
|
MD5 | 764a1bcfd5abe50b344a7b8efeec1e51 |
|
BLAKE2b-256 | 6b2041ba9e3253eb627986f78a886d982f4ffb9f30308947496b2f308ec4abab |
Hashes for dimod-0.9.10-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b76ddfe063c8f0a2581a9d7859a5d290f3a814eda749cb924a2722fa2ceb784b |
|
MD5 | 68d40cb253634074826e6ac5c67fc81c |
|
BLAKE2b-256 | 54e993516a9f92001a8f60c7372c27f3c77f49340dacbfbd90c5ef4d3a225899 |
Hashes for dimod-0.9.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e1c51a135ea227f9a69650fc73aff6162a9b61955ce48fae2345457d76b25c1 |
|
MD5 | fea07d814fe66577ffebd50f89820941 |
|
BLAKE2b-256 | 441c373756630c43f2223bee8a51818b75129b66cde5f20d60a13cde57cc500c |
Hashes for dimod-0.9.10-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd4eb881b0970de5353abd65787d51bc937527fbebdbc6d721a3179dcdd176d2 |
|
MD5 | 78bf5042561c6b82770091ebec6a5a32 |
|
BLAKE2b-256 | 47db7903b58202e4048534f0fb9606ed475966c9f0079a57e5315644d61479ea |
Hashes for dimod-0.9.10-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ad3f6e94b879e1bccc681445d77aefad7d5e5b965625030edd194735a2db6c4 |
|
MD5 | b0ee322bfbcbf82cfab2fe345ace60e2 |
|
BLAKE2b-256 | 20a2e9665c83c568c4b5be1cbffbd2401864424810b23f19f1237056cd9dca93 |
Hashes for dimod-0.9.10-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4ba46a6c3b2a85ca881594b6b4d7a42bb57b1d78b54973a47531895990b867 |
|
MD5 | c4949777786d5dfa3409bae27b96d3e0 |
|
BLAKE2b-256 | 6645577f476aa2d1c94258f9613aa4f56fe75cf8d7671981629170fa52af864d |
Hashes for dimod-0.9.10-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4295c1191143e5e2dae99e393669a575e62278184ead40bd437f704f2e5715f4 |
|
MD5 | 9785fd2bcc10c1c32a1d2cce89ef8f91 |
|
BLAKE2b-256 | 38a1cf19b15ff1b9b12334030b64ccdf4f998bb32b280c62cc00e36cf9e41bcf |
Hashes for dimod-0.9.10-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d392eea7efd692b07c073eb6da1f47a9a25ec11e3866119598d0a91657c9daa8 |
|
MD5 | 0f6b485af61ea9bf5f0593931bf90863 |
|
BLAKE2b-256 | 8cc4f79a1704a59d177b0305fc02a633272c4e3d670a1b06105f11a4aca45877 |
Hashes for dimod-0.9.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef661d32adc84015b4ddc08fc01e9309515848dfc3cbe3ff0163689312ed4e70 |
|
MD5 | 23236c52954d21d25ac7558232dc6676 |
|
BLAKE2b-256 | 7f0d61c489f133ec75d14f61856118384cee524284f0ae570dcf1cbb9c70dd32 |
Hashes for dimod-0.9.10-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9ac35fa2e8753e1c0dba6eaeb3386b7cdc8245afe378752b968c9e44c238cc0 |
|
MD5 | 730fc54c7161761cd568cc29cdf4f1b8 |
|
BLAKE2b-256 | c1f4eac8b4e8bb44672f3151456e786c552ec333c4e976ee3bfb6e93cba62c8b |
Hashes for dimod-0.9.10-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b521f037b790c61aff3032755957346752d6f10b10010ce16b4b125d59d85c4 |
|
MD5 | ae331769cc10d832f8e25057d137fef7 |
|
BLAKE2b-256 | 7696ad3483569db1f9590bb82e6d6bac36f1d9291629897e1671ac50c100577c |
Hashes for dimod-0.9.10-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e3e572212d313b257fbc3364c99fb3af0dd2f37a3d5fe880ca5542bc9d31c4 |
|
MD5 | a04b7413000cddaba6c11a2587f0b525 |
|
BLAKE2b-256 | b8ed6b2798c8aa42bac34b360098e9b3c010b5dddfc38fee97b09222a5d42ea6 |
Hashes for dimod-0.9.10-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2dff39bc1e0cff5d172dc99578f2c3ddb66a9afed55f09ef1fa63a790e18ad6 |
|
MD5 | 79605810fba73dc55eb6fcd557c5c1ce |
|
BLAKE2b-256 | 07eab75ce7e7266814e98f34738ba1449782f440d66125806ecfb27bc0ae4095 |