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.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e7a880d53b3c8346e50a7b26767a31159272aa508cbaa6bac194988d0696ae |
|
MD5 | 45327dfddb11cd83680ea74c4aa50a41 |
|
BLAKE2b-256 | 192c766e925136e42ad5846b849b871115ed39d37088db16dba2bbad2ba6572d |
Hashes for dimod-0.9.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c5d52664449cf78aad48119947d8ce8f448158637306f9484ffac45bc3a9f54 |
|
MD5 | 7fa6d96dec93ab616cae7f9ffd2e3136 |
|
BLAKE2b-256 | d51d103789bf25b1c2a1d8df537ecf96cd31e0e49cf15cb7e652fa740dae4f81 |
Hashes for dimod-0.9.2-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84fce1bc3930ed9c2283f944d60fd84d6ec89ae6af385ef6aaced062aecf3f81 |
|
MD5 | 617fa615a46f666f323e97e6fcce0abc |
|
BLAKE2b-256 | dafadb6b71f9fc9a3369caf5f64599919ed66aa22697b8aad0153af6e3c1ec2a |
Hashes for dimod-0.9.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf3a238bcdeacb9805fb082a2214a905b2eb09ca860eab7ac1bd66d7de6e1f0 |
|
MD5 | e1c2a621eadb603f602d5ebcca3307c3 |
|
BLAKE2b-256 | 12b10726a6e72bf158bb417d7881f5d2b6daf0be06d4ca9a92f1d464cb1e0ed6 |
Hashes for dimod-0.9.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb95f4be5924926c66d4691604375e7684263856267b0c6f8679da00fe4f0d75 |
|
MD5 | b0aa52f79aa9f172891af5f31c1e71cc |
|
BLAKE2b-256 | 9eb9becf7f3e107042e6db54d6102e437e97a6356a3653e1747589b27481fe08 |
Hashes for dimod-0.9.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a84dc7e079f87731b460c58f265815abf4ab24b2267bd7b3e01227c8eabdef91 |
|
MD5 | 325a2c6f33fc5ad9a96e3e3eba62e923 |
|
BLAKE2b-256 | 1ac83718c0f524c2ea1f32536d23cf90caeafa90aa6ce9b8749a74dbc6ae3e44 |
Hashes for dimod-0.9.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15280a53500ee99c2782a8fdc7ae867c8306f1dae97fd25b057e6fda9fcf2b5c |
|
MD5 | 5b413c95e91229b21bcc45d0171a15e6 |
|
BLAKE2b-256 | 46309ed82c921892e7b111b3ee9bc492b757cb06e992aa626e5f4845682727c2 |
Hashes for dimod-0.9.2-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774f50f0c6d9734eda1fb534eab46d8c6889b46f143ffd77093ee7a03b996259 |
|
MD5 | c922fa0fa2f2fb5dcd15fe12a4ee38c2 |
|
BLAKE2b-256 | 605096f2312cc4b94804d857f673d9bd72cc316123f0b279da798b394a3dad67 |
Hashes for dimod-0.9.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b052d79013eafeb200db1f94e75c1a82e36ca4d9fd71dc2d73e1fd39d6b2dee0 |
|
MD5 | a68772be1ea642661e6a4ef6e851092e |
|
BLAKE2b-256 | 6cba06757b4d32c4cefd83044a10ea3f19fe2b77cce54f9f1d13581a9066c7ea |
Hashes for dimod-0.9.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fc7e349c132cac7bba7e7b3a181ae99d3ca1387b7efabecba9c9024dd72c0b |
|
MD5 | 501f81f171b4537810106dab8946b437 |
|
BLAKE2b-256 | 1ffe8ce7b8e92682351daa4ed533ea1fce016ae8309090e69e63e91b77b22ad3 |
Hashes for dimod-0.9.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37cd9913def7be4b360c7217eae01018f6839639c20ccfe1146de98673f84835 |
|
MD5 | 87f4808df273c54596a2cd5989f11d22 |
|
BLAKE2b-256 | fc9a56bda6311113089dc5626bef52202bb2d492957fc920b6feaab1d44bb94c |
Hashes for dimod-0.9.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69769f6e0bf81c1d46dc7bb82371f42c5e6d8705167e3b00e56b09c5bd5382ec |
|
MD5 | 8495164b8037f783b80aec3f404ac8ed |
|
BLAKE2b-256 | 3cb84810e966bb986c167142405b90cc7d35bdb16de54713f1f7fb00822c1119 |
Hashes for dimod-0.9.2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca5150ad6afefe6f1daed4fb1dd80f048ceb6a8c15c622f18c6c85162bc41d8 |
|
MD5 | c5ef2bb3bc29c5287bb93fb80b4170eb |
|
BLAKE2b-256 | 65335e7bfae1edf6851b91a4b29712b4377069c5d472144e18666c9e38a8b69f |
Hashes for dimod-0.9.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a345101a5dffcbe1bd125b3b627553e39bd69cc837222319c21283a53045edb |
|
MD5 | fd5b09da268361100f5997751529283f |
|
BLAKE2b-256 | 05f8a8dfac972266d252fa926ab285945bdf7a79527ce9cd33c5ec5cb979397c |
Hashes for dimod-0.9.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3756f963ba1ab8d092f32366dbe5485c0d0c9c6eea00e2b2ed0eb4aeffd4b066 |
|
MD5 | d6c3c8045d4c1b083b3729eafa1a16d6 |
|
BLAKE2b-256 | 1d0225ebfa0bd1381cb8b0285dcd73f3413de7fe1e849448bb3132744bf0d4d3 |
Hashes for dimod-0.9.2-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c934f5f3046e103c0f385f0e44170c7edafff8deaaa81c92b256d0c107dbdf |
|
MD5 | ab543ead6da9a231d146755658f6a6d2 |
|
BLAKE2b-256 | be2474e5910ed48090eac325a013a9089a890f74e7fc8af711b84973cf12564e |
Hashes for dimod-0.9.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c73bf440059d68827d4372eaa3b57c502f0439eff2dfc84bd5ac56deb66edf9 |
|
MD5 | d4eb25af723fa07c1dd4052278d45cbb |
|
BLAKE2b-256 | ee642de696951d40faf7abd08690c4a293a24447b986a72a3af7de143e20f66d |
Hashes for dimod-0.9.2-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f60edbc1d5b6832a3b1fd45a9f1139a3e9e7fe4dace5ac1d5c0179acdda6b8f4 |
|
MD5 | 18b936af77e85c55191bf04d6b3754c9 |
|
BLAKE2b-256 | c4f332520e6cda420589872e502a05116d3550460083bdcba34262a9494ea4d3 |
Hashes for dimod-0.9.2-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3307e4969de962350824f6167b9ea75f92328283d06adf72509e7fb818249ef9 |
|
MD5 | 3bc9022620170fcd1b8de55d4aa6797a |
|
BLAKE2b-256 | 1605b28bfca857f67822d996fa4ebafd959d4871043e6a08123c8f462cdf2bcc |