A shared API for binary quadratic model samplers.
Project description
dimod
dimod is a shared API for 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.
a discrete quadratic model (DQM) class 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.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.10.0.dev4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df0670ec7d9336ac21b7d076e209f113b78416a2afbd3927f42d6482b532b21e |
|
MD5 | 23e5584e38ce9e4c18b4d23f8f417fa4 |
|
BLAKE2b-256 | 24ea97200e2ea6e0ad2ea8783e5c5f20d7fccc86175993678acebfa3565d7e82 |
Hashes for dimod-0.10.0.dev4-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bdc862a31b7bb3ad0126526372149b6dca03a14447dfdad206c95290b8f3a2c |
|
MD5 | a3698405992c6c0bce07356880440bbd |
|
BLAKE2b-256 | c932783964aebc88ce81b9d2b8dfa1c3ab5405e9cd1c3ff628ee7858b48d8587 |
Hashes for dimod-0.10.0.dev4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1431d4d64286fcbb2bcfbf1e56101628efc6c2776f83f7973fe54d529762dab |
|
MD5 | 4419f36bbaddbb8e7feafd0792e0eb4e |
|
BLAKE2b-256 | 19bc9f8cc1a8a9041d110d6b818a9c022c288585b841e72a1c58406fbb39b1dc |
Hashes for dimod-0.10.0.dev4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f8d16574c7939550934ba8f85899297e3e1a858378d3876412a9e9d46cf616a |
|
MD5 | 3bf45b538ef27adebceccd0409c2c85e |
|
BLAKE2b-256 | b59e514d7b0ed940c8686938529e91c04fed575f7c638372873d86ffd1f2a931 |
Hashes for dimod-0.10.0.dev4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 386295520a25a0c9db977fabc12f37cda95c1536f63591421f8254f0f27817da |
|
MD5 | 6a20642cabafb476879867f691c06fd6 |
|
BLAKE2b-256 | 3497bc6feeec3ac2f2ad5a6ae6358dac6e475a62357fb24c4dc55d61d9c1f5e8 |
Hashes for dimod-0.10.0.dev4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003fb4d4a53ebf812495638b97df3964de8ba6bc2eed98a83aaccb50e0423f89 |
|
MD5 | 98fbe4481dce7954a0979815bacbf765 |
|
BLAKE2b-256 | 21dd417fa1651d2070dbfe60ef5d6fad464ffd1d0b5751341be7522592e1dff7 |
Hashes for dimod-0.10.0.dev4-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e62986030b82a4c997a4923419a611383294b9d09b37bd6b5a7aa1f7e76338 |
|
MD5 | 7d0768fd40e92acbdb7038f3547f16c9 |
|
BLAKE2b-256 | 3795d9fab6e35f35fbd6919d50f2bcf30addc5e2a685f68d1a727efb323f0cd2 |
Hashes for dimod-0.10.0.dev4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccdf513d5aaaec50e3eea2201c0b3c61ffb3ef793e2aeecf703e941e4e593434 |
|
MD5 | c8333c98c07f5ab615c455b7e69ad243 |
|
BLAKE2b-256 | fd1c1aa89892215c159e346660c10e872e9bf456469d0a46011de363c696a244 |
Hashes for dimod-0.10.0.dev4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb290b311890a275d0840f711d466a5ca5b9bfb32715dd3640eb97b132d2ce51 |
|
MD5 | 52f890e1ee05b1462c2bc675f5a0d756 |
|
BLAKE2b-256 | af9656f2bb2c4c5cdf062e0317bb432f26b7120806d6b7c57ce82328f416f872 |
Hashes for dimod-0.10.0.dev4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c186e252108719f22af582cf98d06018d46d9324571ceaa0f564673764d7d2d6 |
|
MD5 | e8471eb31c6f23c032f567cdf60fc9b2 |
|
BLAKE2b-256 | 4e76f1c988b4acd48555eb1832b8f6cc641831a07904b3a49397792cc4634cea |
Hashes for dimod-0.10.0.dev4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeeb7f3a4b90f232a6ff143e5330fa516c1ae44b9ca98194053a8c78b31c3453 |
|
MD5 | 76b95a43fc48e1c0c2e373aeb8a0bcc8 |
|
BLAKE2b-256 | 6d1dc2ef45c202077a2a1a0a47d7d300bbe21546ed9860ed9762ce0332a551fb |
Hashes for dimod-0.10.0.dev4-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d4a878a5951bdc65e62b2293c09802fa889f7e37c8103431904ff4d9ee3776b |
|
MD5 | 998964b45a9232488b7db4216afc9097 |
|
BLAKE2b-256 | 36dbc1dd58a56a92683cdf7406e82e736837e998fc163d014aaf456f23d51887 |
Hashes for dimod-0.10.0.dev4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe6686f53d0bf887cbec745d5e7f568e45bfb8bd521e2f298c0827dd808f294 |
|
MD5 | 14cc67f5786c60d24651272dc4ca8d90 |
|
BLAKE2b-256 | a642e5d1714411104c573ca5606cb9d9871b52d46a40b5258aaf71ef666e6363 |
Hashes for dimod-0.10.0.dev4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2b5827e722b97480184fd88c24cb74043806362fb54f808b3539f868850866c |
|
MD5 | b93a9c99d6641e33620b6f52540491b4 |
|
BLAKE2b-256 | caa0283238516cf73faaf74e8c5dccb32c239daeaf01a6d3d174de5e1da76dc6 |
Hashes for dimod-0.10.0.dev4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f6ed8802c6226e6844c231ec6aa505eef5edfb93b58fe6c6fa8fcca801e77c |
|
MD5 | 2e082fde9969f8826f1bd82fe818aed6 |
|
BLAKE2b-256 | 77908a0a0655eb999680804c0a8df3a65268e13dc1c9db67164b28853dd59346 |
Hashes for dimod-0.10.0.dev4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf80f62feee1768228e6c5337a6721e749586ba01a331653e5d6656248148d5 |
|
MD5 | 8521e1f94c54f622c56e0761c30c6600 |
|
BLAKE2b-256 | 8b0e5b088138b8e4592d6e73a570f7024363a01f2125d49b2261dc6e722fb9b5 |
Hashes for dimod-0.10.0.dev4-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b806caade2d1a358111b4a0a22f74bc5f3e0eec0b06f0580c14f19662d2af14b |
|
MD5 | 78e32e65c69c41286d516c5a214362db |
|
BLAKE2b-256 | 2b3915fc3140b14fff9f60436ec0903bf7816e9456b0faf866cbec2cfc180c8e |
Hashes for dimod-0.10.0.dev4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db8dc040e4c234b3addcabe792bfb2b94a5ebb02efa9c17b1448791c43597c9 |
|
MD5 | 108bd44b84635c960e50381f7054424e |
|
BLAKE2b-256 | 4520296ffad874ba18335e3d741649214596e51261ae1fb1406b5914941a59c3 |
Hashes for dimod-0.10.0.dev4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1492925f88eb989424e566e4fe487be87d1214f6b08270cd2b2c72888b4b4a |
|
MD5 | 1847c06480581fd70f46e4841519acc9 |
|
BLAKE2b-256 | 5a13370bf7fcdd7dbbabb8c7a0542db4ecb9eebc359adb94970477598378c239 |
Hashes for dimod-0.10.0.dev4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 923f1f2180c460fb0d78463e3283bb32ddadea8a966c54e8b26c1176175f4550 |
|
MD5 | a2962ea15d04a0fc0cb9449e9a5b44a4 |
|
BLAKE2b-256 | 9ef4f3b77930a5a781b4190b7174a588592ecfb19affc131964aad8bf07c9d82 |