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.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7638ab4468f78e790abc3ca51e0ff0dbabf64461228517a351fa218f7169255e |
|
MD5 | da4d818c0feb5bd3e865ca576c202c51 |
|
BLAKE2b-256 | cbb303c4ea8a13af5bde91bfeede580865b319d0ccc621a15db3cbdf534768e8 |
Hashes for dimod-0.9.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b208f24f16704de077a3e86b9b6ec073b1534b2ef4448c68e6f2ea2e6f949f3c |
|
MD5 | 5a553edb15340dd1f9d654f8c4128cc7 |
|
BLAKE2b-256 | 3e7cfa8042acaad4ba2712c8f4718aca829fc9b65f468734b49b4709bab0f7fd |
Hashes for dimod-0.9.3-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5afbecef3e964cf21501c861ef3dcee5517b365243c4c44b5e5aae944bcd2a0 |
|
MD5 | be12481431ce8388ea14f36ad098559f |
|
BLAKE2b-256 | 5c6bc256c1d0cdf7d15db92621fcdded7c17286201488455e38b304fdb9cce9d |
Hashes for dimod-0.9.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c4ce3ed6c0df73dfbee1ecf6b31024276476b6bc2478cb35998c626e9d16fe |
|
MD5 | a7aae573f3cf22296711f40c1e807483 |
|
BLAKE2b-256 | 476010cd6cd2b8c6f9440513eb376bfe64514f729da2019fdb131a2d13e5ebd5 |
Hashes for dimod-0.9.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02a9f8a9d18da08b4c9d24ddfa7fdc0528c12e6ee40576aeedf735dfe4c76046 |
|
MD5 | 6386bc2916ee9131ca400f31d3540043 |
|
BLAKE2b-256 | ad32174df3c6a06b7d28197f135e1e12aa45c7dc605b306b1a4d198d428bcbad |
Hashes for dimod-0.9.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 128887c2faf9d13c4104858569ad7ca8dd853ff0ae5bfd333480af03f51efec0 |
|
MD5 | 73e0053f25330a3574914d6ee39794b8 |
|
BLAKE2b-256 | 7cc90503bbc3b77e48d35134f4a83db029c4c8f65371edc0e50f62d381a99a20 |
Hashes for dimod-0.9.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b0b2fa892c79e3984bf7becef45e67894448c89493d8f1ac959c9d1306e55f0 |
|
MD5 | b510af893f44548ff73112339adfefe1 |
|
BLAKE2b-256 | 9e2c8c88e982e73bf6e1a6d7ac7db0ad5c9851b26e67089cb19bede3416e21f9 |
Hashes for dimod-0.9.3-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3acc4fba8a9e14a9de97066b0fc08a561d1b6d60d46070eb8542064bdde60aa |
|
MD5 | 482808d5206d980fadbe8a7677de142e |
|
BLAKE2b-256 | 703566ccbf9fa9b1e7756467dfe6533c0ea82ef36fb39a00be9d72937881382f |
Hashes for dimod-0.9.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cd904100bab66805e8ee30abe6ece19684c5d70215f89a1b468654d3bc5428f |
|
MD5 | 268053fcaf8b74e0b6f19c6ab27f7f73 |
|
BLAKE2b-256 | 32643aec03b1103049892de8a400c0ffa6d4e10c06568803873f0270f0db4ea7 |
Hashes for dimod-0.9.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a5420adbd76e18865c2a91fa531316e0537549306ca45d66ec2383df896c000 |
|
MD5 | 4c5a4e09e4b8867b486017b0c65c19d6 |
|
BLAKE2b-256 | c038741e5b7e3bc217a314ff68e8c3f8ad403a1a54822b11b0dbea61339d4bf7 |
Hashes for dimod-0.9.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35a602e8326ffa83d613d03d6c8764ae7bbe60a47a39149333e4ccfb101f38c |
|
MD5 | a17e7534fde5a8c07b1e3d5c1700e9d2 |
|
BLAKE2b-256 | a5f85d40689082e7ae7f7b117f399da73661281d847709e992a105fd9b5490d8 |
Hashes for dimod-0.9.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b6f25baeaa89cffc5964e171de14c0d444b2f84ec538259d11d75c5854837f |
|
MD5 | fa37fe4de3dba00d4103139aeaa303c8 |
|
BLAKE2b-256 | ebe37bedf1f530ced9969c2aebed8e32003fe78a92eac51d6e51d7b66a755b03 |
Hashes for dimod-0.9.3-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8769bdd73ec8e8827485a1eab81e49e950959a7212e271ed16de35b20e6025d |
|
MD5 | 6bcc63aa49f7c2ae838448000bc69863 |
|
BLAKE2b-256 | 50362360af91ded37521144809f62aeadffc7cf94a0f6369f43cb38c43e5d03f |
Hashes for dimod-0.9.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72bff2f60da91d78316b92f4784f7a7a029ea9f6d00ea0b142cbc4be49aaca32 |
|
MD5 | c30276fbe44cc386ed5ca50c3716af26 |
|
BLAKE2b-256 | 2d006a5fb62ea3a2adcdbf917783ae90ae00ee0abb80b9ae1b5f94b61a408cbf |
Hashes for dimod-0.9.3-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e2e2ca54dd7fbcf88c274e684348daca58b6cb084cf80f45a00d509ebbc6241 |
|
MD5 | 15268dc26e79aeb8fe7d551dd7123c0c |
|
BLAKE2b-256 | 0f411ada718ee672ca32d2ec5177aba0f617178a6617912b5bfe9c14f08e05f5 |
Hashes for dimod-0.9.3-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aba378b0ecc48e80c1d9ba0622e39ae0c673d388db0c03283603134cfea6e8c8 |
|
MD5 | ff6c4ff5d81fa61faff5072482fc1382 |
|
BLAKE2b-256 | bfd3247553b8ed364e26feffea3ee3840686b27b36b89b6b543e4192b62a62e0 |
Hashes for dimod-0.9.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58d4445a10f27cd3c7bdc4e4a52a829339d590b946d19c009a4a3307868ba69a |
|
MD5 | ed692ed5d8ea949346dcc8850174eb56 |
|
BLAKE2b-256 | 9f80fe8e054beee18aa91f695f82f1cbc4ad9a8b8e4892935f3ba5e659d6139e |
Hashes for dimod-0.9.3-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c3bc582204e126e14f813e7051fb086be2e71c4be2ff7be31daa34ee68c02a3 |
|
MD5 | a56e731a846b2fcfadf3fffc4ddd586c |
|
BLAKE2b-256 | 325f3977e639a1b0de198a1eabaf78011936fdff0f3970032074bf9bb5b58faa |
Hashes for dimod-0.9.3-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d8ae4eefbcce6408250e87b8a286b64c8d695b83e41c6569ed043ad271734b0 |
|
MD5 | c88a80fe2f61c325d70b7526dac2f53a |
|
BLAKE2b-256 | 76323456bb1a6e940e28caf4c5607f6cadb86c660233d93f141aacedbc413846 |