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.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fa9436a3bef4f45f0c1dca2dbb5eabdae9719733a3d5ea5d6f281cf2b270cf2 |
|
MD5 | c5f0c788ddb3cbe4cc7612a38c584405 |
|
BLAKE2b-256 | c97d0f3c9825847baf933a1191812d75f45f703c5edf0e5db6a4e71c160f0174 |
Hashes for dimod-0.9.4-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdcd0cc59f7d1da61f4bb1ec5ec778f83344fd86f34a1546800d10999b923461 |
|
MD5 | db2d6930f2565fed1bf9d1d5ecdbb059 |
|
BLAKE2b-256 | f41ce09111744ee88ac5b515df525b75ea9ed379776c82b620fc27df12f5214d |
Hashes for dimod-0.9.4-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5c7c6654cafb586577d1f3044c30cee0031e130176886365f72a2f40fe6fc3 |
|
MD5 | 4743369e2f086590a0f319ab93340bbb |
|
BLAKE2b-256 | a7c05fa1bea00253d6a9b9c9d30abf035043bc14a42b45541bd0860e63f6e5dc |
Hashes for dimod-0.9.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a7fbfd51c6024e56c0f778f58462a9e45d0dbc902fdf9427e637a50f3b56368 |
|
MD5 | 4f6e95b2e69f483f58e4c517d922889a |
|
BLAKE2b-256 | c0cd5e6038f0b931efc27eb914e67ac3a7fe18c5e3f70affc76f4657dc3426e8 |
Hashes for dimod-0.9.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4086197c5a5f20fad906637965957cd409b58887d929552c7671174fe197b49b |
|
MD5 | 859654d74a115d27f80107ac33056e1a |
|
BLAKE2b-256 | 2ffccd7f575f159d70e77a1bc133b7b05b317389727fe42e12d054c6bfb72db9 |
Hashes for dimod-0.9.4-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b3ba5ee66729db35e4246446612eff73d69b33623434c6826a1dd0c4aa3ee3 |
|
MD5 | f7beb31b08b2c798f438211d36b518c0 |
|
BLAKE2b-256 | ef28c17a0dc0268b5b6647ffd269585432cb153c191e027db2e6b0b3bdd41cdd |
Hashes for dimod-0.9.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d916731ae9962b66c1340e4e92fb13ff7b646398816a682d98913c2e9815ae |
|
MD5 | 80974bab5eb1afa5be9610195c8ebf8b |
|
BLAKE2b-256 | 9671a008ba03a082c40f2a52ee78821f016bb5c39c70807da8b7dbd054be3ce8 |
Hashes for dimod-0.9.4-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91aa619decbfa151288b00f585afbd6ada14b5449390cc5d55dce960634b2c95 |
|
MD5 | 9e96dad10eaccd261ed9c660a22e4dc1 |
|
BLAKE2b-256 | 01118734ecafea187fe5202714e99449eb4292a4dd969eea3bf92cd935db35c9 |
Hashes for dimod-0.9.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ada155ea3909e1adf89e5aad5b6de959cd00354704c016c35e356e6d3fcd2d7 |
|
MD5 | b088e5a50e90f993415d05430b900754 |
|
BLAKE2b-256 | bff0d9395e8b165f60cf591ce30c9bc51b955c3c5789f8dacf0460564506ef3a |
Hashes for dimod-0.9.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38e50115f2a82ef5e2e7e2f38c9af65040a149eec4466363171321575bf7648 |
|
MD5 | b28b16219bd28a16538e796aaae1ebb4 |
|
BLAKE2b-256 | 0d37b954246c1a0c3756d6aaa998b840c52f6d11923cdfeb2d0ff2f8e0e9e4e5 |
Hashes for dimod-0.9.4-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f48da093c1c748fd851dec9e27bc2c752619802017bf3438607a61d0bf8981 |
|
MD5 | 4720dc1b67cb7aa414ef5356b35eb63f |
|
BLAKE2b-256 | 56e8d0b200f9e750baa8ae5116e9a663be150fecffe88250bc7ba4c9764ba149 |
Hashes for dimod-0.9.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8ecc9b8ba02e7dbe441c61d9480c454f7ad45c42af7ef3e0f34bb1842b372b |
|
MD5 | 4729e231e79baa6af64af9b8b1ec3222 |
|
BLAKE2b-256 | 151028ac95e33ff56e8ac3d2698420d9d9d884c4c31858a9a0b3353671f1e5ec |
Hashes for dimod-0.9.4-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b08d5531357f272525a1a1ee498347690a5091bcbe1c9261c888539f2dc1eac |
|
MD5 | 29ab928663090c5e8c6effa0ceb6681f |
|
BLAKE2b-256 | e1a15a41ce9401c847ec5c60321c61c0dd6a6bcec3cb81ef4a343b0c0d78ba45 |
Hashes for dimod-0.9.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 162c9ac353c78a9b8e75314951c60e7b510dd7df1292ec876f4b6fabb0b50fd1 |
|
MD5 | c04a94560dea427112b52e18b67e680b |
|
BLAKE2b-256 | 447acf48ba7c92a08f6462861b53df2d371a37e4f49eea629ba90e1a64598bf8 |
Hashes for dimod-0.9.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b61bfb7df53a4686898b773551e2600936cd382621027e1af5a56d79a739c0 |
|
MD5 | 1712eda409fc37e2fac597683b529fcb |
|
BLAKE2b-256 | 697a2388fe229e3a457192d99af311e063f2513bb322ffdeaa9c7b9bc0b65d46 |
Hashes for dimod-0.9.4-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e0e00d2f16c6ca4ce2674c6fa834a41732dca69ade04a101b2c8761f330b15 |
|
MD5 | d8735b59c63e390f869bfb4ab6d336a4 |
|
BLAKE2b-256 | d3413d63c059f36227fb98ff053ceba0080fef1fd73b32a7f236dbb89541ee17 |
Hashes for dimod-0.9.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f28e0203c22caa599bf1f48b70a2c4b6272c7757d7ef447601eebdb28d3d62a |
|
MD5 | fe3433edd62d1e8fda5d6c224e160518 |
|
BLAKE2b-256 | 3cb6168d7fd85c97efc4fe90ab192e5e08cc509dcff5ef8a928677562a7be70e |
Hashes for dimod-0.9.4-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c371c1fc7485940a88a6279bfa21f813c2a69bdbd341945ac9b1bbcfef1026e9 |
|
MD5 | ab24e6f50dc44d7d437aadb9c68fe028 |
|
BLAKE2b-256 | 9d7f4f4cc77e61ea77fa07cde8bb3b38de77f5aad200ba46778d7ec85e361228 |
Hashes for dimod-0.9.4-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21221401681bf71f945668964f4c05b761b5103040e030fc046e86ffefa32b96 |
|
MD5 | 6119ae5573a17912b7bde88e984b0114 |
|
BLAKE2b-256 | e435e15a838ffc3759e52217cd86ac3882b44f5a943d0556b91e4e6c5295866f |