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.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb0419993b328bfd53440cbe97b831f16dc03d1e6fd15b0b54b0998e18c1f02b |
|
MD5 | 3da14ebe492b6fb23546b7a860a3eae0 |
|
BLAKE2b-256 | 16f541c918cce10d023fb26186e3c0060243c7efeae8e98e50254bbd677a8cf2 |
Hashes for dimod-0.9.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55a4a1213492f5cbf4f2c7e9ec5ff0d988cedc1f507637ee79cfb97dc94bf8cf |
|
MD5 | efa93f7e7726298f837c8447031f2118 |
|
BLAKE2b-256 | 715c072fe42693eb60e39c9a635d4c6cfa89998c6efa635ee0670d206fac2398 |
Hashes for dimod-0.9.7-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac04b31fc2914c449ae287d8698f2e8bb08f1caa1a5065ba24f693fef0589ef4 |
|
MD5 | 34fb6cd443bf2078dd08965bf22e8b4b |
|
BLAKE2b-256 | 6a05026bbd86ca8b4f1e7b72fe198e3665bd9f9c73db71843b268fa42db83600 |
Hashes for dimod-0.9.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd438ad51b68295d066982270d1df2d29abf3e04fe5964a309bab2de91433046 |
|
MD5 | 27a8065e2b389ba02ac8bd2021debfa4 |
|
BLAKE2b-256 | 2b360920a5d7606ea2862b50658259f3bf42c8f58bc870654e0656cd3b288933 |
Hashes for dimod-0.9.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73303fc125c39adf983a81b230827627b58f849215ac369c2d77452270829eab |
|
MD5 | a5c8e2065fcb787a54dd89ef9cd11529 |
|
BLAKE2b-256 | 8cd3345f05c53f1f042981227723e01cec9beb999dfe0adac194ac77f73cda94 |
Hashes for dimod-0.9.7-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb879aa1992e7f70b01285126946f1a62ba975e73bc3c9b23d6978e59ca90755 |
|
MD5 | d60eb983dff9ba211ebe26b0f022c820 |
|
BLAKE2b-256 | 0ffcb28779f2a04322b7148ca2597eb03931da755fff5cdf2bc421d6d5220824 |
Hashes for dimod-0.9.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc8ec2eb93f36a817733e1d606709d09dbb4236218e8c3b73f80228183ffb06d |
|
MD5 | 636239c60abd05ccab80856b1982adf2 |
|
BLAKE2b-256 | a8c43d0756e469e7e67352a1e92b2c8c3b2b110313b3886dc3c9d24a4e478ffc |
Hashes for dimod-0.9.7-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ac3e7d03a0e2aae7f407a25b2f7effd57f76a7c94c6fce8e48fb834e06eb762 |
|
MD5 | 483fee3df65fc5e753abb6add6c8989e |
|
BLAKE2b-256 | cb29415220b045e063b3edc7905461d81883ea1fcab015b6827c45f7134c5e56 |
Hashes for dimod-0.9.7-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbb5ecb919b05b7ed9e7dc23518c30303a1ed3a0f94019ea33732b62b7b1a08d |
|
MD5 | 34db26b8d136ff7af576c77acf0edd05 |
|
BLAKE2b-256 | 2aae75babe2c6e5fadcb544855a94903ed0e2391e7e682713a2aa45be771562b |
Hashes for dimod-0.9.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 794d27f381822eb0ce91501119ef3d6835d14e52703ca857b77b0ba0ca8b2dd5 |
|
MD5 | 09de51c50a4854e563baa5148969ab64 |
|
BLAKE2b-256 | 88500c947a493ce0661c5889bf8d79dff3119c5934cac4f6b981d86931c5fa9d |
Hashes for dimod-0.9.7-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ad813cf2be6cf34294b447cf6da488f616bc506c9d026c2d9f19b931e894ae |
|
MD5 | 5fa6881e7dae7af754b10a4d2c15f979 |
|
BLAKE2b-256 | 18b36898e6ade8a82e832d6db582863f0ce40c82ddf7179fbf9ff5349b4bc4a9 |
Hashes for dimod-0.9.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0533e0fa459abf83ec7c220655707aa363bc002295c497d37f9033fc8e1dcbb |
|
MD5 | 92507e7952b01f1172d02233e6df7018 |
|
BLAKE2b-256 | 668acf8a9ad9402e94cfd86b95fec6b0a2001a08aeccce30773dc820cb376ac4 |
Hashes for dimod-0.9.7-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 727b08baab687e2b81df63e4ca464f81c60c579b961835b3712e979e967bfba7 |
|
MD5 | 6eb4f71fc3536834cd6f280056223c59 |
|
BLAKE2b-256 | 49f2c40e6db0e4f632b5a3bd60061736e549c92317e1cf267ef25fc1c0371eac |
Hashes for dimod-0.9.7-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a518b6e09b1a7cb1c72bb770891ed880686f1187e798420ecb985e7c80b0ecc |
|
MD5 | 543ef819bcdf599fe850b03d6d226d6c |
|
BLAKE2b-256 | 8c1a2fd481f1635bde452168efb1b57dbe82a9bc88e962bd6314a924f9943d27 |
Hashes for dimod-0.9.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da901d9ece6944cfec5294d532bb21f2d23fb9be671aae9ced168bf21d09eb7 |
|
MD5 | 4c671f10290ad2d7be668585dead3195 |
|
BLAKE2b-256 | c87dd5d2be577f2671971db6f801606f436871d764799beff8c22c50acbb6a1e |
Hashes for dimod-0.9.7-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff2944ab0454c85508abc1616346468a567a2bea0e35116b48f7dc9e887aeed |
|
MD5 | 40daf6651eb1e8eb26f35bb1898c8422 |
|
BLAKE2b-256 | 4b84965bef46e9ee500b129afd7c9dc47eeb021678852a16fa7e1c29dde7da78 |
Hashes for dimod-0.9.7-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b13669a0035b74b2a69797fc1c793485f1b8c20a848de037f4aaa326caa7455 |
|
MD5 | 45fb6269d9c9b6a945abf7b7542481e4 |
|
BLAKE2b-256 | 2cdbbe8242bb92f1308b708566d309bf0babbc0b7dd30e7cc456afd75915d5de |
Hashes for dimod-0.9.7-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d43da7ac6f8b4345a80ea014662879265caa78530130d9472a9c26560be3331 |
|
MD5 | d683b2a91cddceb974393fbc29afc7b8 |
|
BLAKE2b-256 | ba538fa2be216ed52b5564a6d4924ef7d619e9195ce341b1d358d6e9eb83503a |
Hashes for dimod-0.9.7-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf394422a79b8c005884932c3d60693a2052043e34a671c9cd3aaaffb04b106 |
|
MD5 | 5912f6af2009d54142178aa37567d853 |
|
BLAKE2b-256 | e802550bf1715335d3f9b0509034396a0254ab1632923e48f5b808f365b04467 |