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.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 921d93840d4859539de286865d5397f6feea3998da20404f24a5b9fdf7c5ce79 |
|
MD5 | 910806f0ea9d0046178eadc443047934 |
|
BLAKE2b-256 | af010a31f4282f374844cb20505dc175609f476e6586a197bf507de6589d8da6 |
Hashes for dimod-0.9.6-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 267e0d3db0a121ff15a2326c9a5fdc4aba74c3dd4f9abfd7c9c379db68613f37 |
|
MD5 | bf742f5f037ad52f254c9429c3701d71 |
|
BLAKE2b-256 | f528b6545b8f8bddc143437787974e04c9cc8ce1e7eac24993c3aebb3395ee14 |
Hashes for dimod-0.9.6-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ac6d2fcb034e3ec39905514f4b144cd781d9558939480cd3f103375b8706281 |
|
MD5 | 9f4af5921fa2f67df6399663bc86c440 |
|
BLAKE2b-256 | d47b520f2f3a33a42bc53aba66c5e0b63e5da955e4a27fa62d676e0c18590e0e |
Hashes for dimod-0.9.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec426f85d86035e8d51b2eb5e69118eaf56b28b1c3b0153b81db71234927baff |
|
MD5 | 73ea33094bf8b92f55f1cd024c69bb4c |
|
BLAKE2b-256 | 171396838ad3e3b7bfd49616f0d05d3ebfa8281d855dc91fde3f3ec2dfaf5761 |
Hashes for dimod-0.9.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 696d0bd7b6ce94268833118dbd7eb90c08d572b189fa37a432c35e0323c9772e |
|
MD5 | 9c09c58ab7f20651bfabd07863467869 |
|
BLAKE2b-256 | 7a67108239c063aa895e25683aff983d69d72756a23452d3bbfb1d2693c3a260 |
Hashes for dimod-0.9.6-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedf7ea34a273ee4a1f880d581012889032fd18ad902be8085575eb4dfee632c |
|
MD5 | 4295a9248594a7cfc1a12ec665d64431 |
|
BLAKE2b-256 | 9d0320e403b665e014dc5336e076472b5b3521c542f348cd5f482b019e152d63 |
Hashes for dimod-0.9.6-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2639d2149a86a46afc0a2db10827766a7a807dd77ecb0448b327619e1fd68711 |
|
MD5 | a3dcc07ecb299bd3f9441872cf032c17 |
|
BLAKE2b-256 | b278bcd1d471c8cb0d61e8569f9b11bfc6ec4103a59305d7f43e047bdb3ff736 |
Hashes for dimod-0.9.6-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95212f8e4ac80c1a8b8fa7bb3599a64731a4bd640e85d68c1e19b125637683ed |
|
MD5 | f169c42db049bf3e5c1e65a9e1dd5511 |
|
BLAKE2b-256 | 004aa9a4842196d07d548f27d30de9d39ac1537f5fa1bf6fcca25a4967e50724 |
Hashes for dimod-0.9.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a7b652346feed6c37c8d65df4aa92406254a951588ec19afa1555b935b28569 |
|
MD5 | 868e559f5a4fa93fc0549c9771661f65 |
|
BLAKE2b-256 | fb3e8ea394d05c44b165aaafa9c664505400ac98ef7e540a6f778fbd44725318 |
Hashes for dimod-0.9.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed7d62ed2456b48dce80adde309c955c73eda5aad9075b487b062d8c2086a7f |
|
MD5 | 147b48ae535cf237cb6d515ed50837a9 |
|
BLAKE2b-256 | 125bbe1f90c65259f5079cb49211efa11588033eb76e28ed64d0e5d91cef87b0 |
Hashes for dimod-0.9.6-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25de190d963a1c02552eba114675c421e71f086a9df243fca6456c19c77a72d8 |
|
MD5 | 1cf00ed39dc92ef6528cce9ae3e69204 |
|
BLAKE2b-256 | a1a1e64f57e93097a2830f6fb68f5d97a89ab3a557e80a6973d7533acccf3024 |
Hashes for dimod-0.9.6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbdeddd46b7a437759485237ded82fe3b1ef08b14d84a2e59f3b1184e57ad1e4 |
|
MD5 | e87c66f3a995a68bc842785a80d07e11 |
|
BLAKE2b-256 | 592fe631a7ad7140fbe8657396572821c20b89d31772cd58f532a7b4a934b53c |
Hashes for dimod-0.9.6-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1452ceac1193db1a7bd7b7e2cb817405c1f10ced31e31a0abfba8a894213e6f |
|
MD5 | 202ce7380105570884d8ce391d2af314 |
|
BLAKE2b-256 | 8aba9c9d2fc50fc9fbee6d7f6f22490c86919bf21fc0eb45d9dd00983085fb1d |
Hashes for dimod-0.9.6-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb84db7d7ff2607164ac632a94a90209d46f580f663f145872d6f71f52ebe9e |
|
MD5 | 28b5717de5874c3facbf0ee9384cc6ea |
|
BLAKE2b-256 | 22b522c5bd37aceb8974977ce682c0e73e9a6c408a0e511a54ddf84191ac595c |
Hashes for dimod-0.9.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eda512ab1df9b408140247758beefbadad9aa0c3dab8a097594cc3c48949c5e8 |
|
MD5 | f5a2b367ccec257b45cd7beb5265d702 |
|
BLAKE2b-256 | 63d0755e3bff1bae70fae0982962f7e060130b019bed1d595041c8f2ae825cf7 |
Hashes for dimod-0.9.6-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681381bbbcd5c0162c93efc17fef0a597d150ded530044065d5f98e7a8af178b |
|
MD5 | 841bf97ab441134e5bb9484bf91b8d5b |
|
BLAKE2b-256 | 9d33456da3ceea53b5baa7b3b78b2cbf9d1855725b4f41fc4c4adf73b56588c4 |
Hashes for dimod-0.9.6-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d107ee9cbe221214f16ed9638945b31c3178e425f98259a379c6d80cdfe8275 |
|
MD5 | f45911469240d8e7fe318e6fb4e53ee4 |
|
BLAKE2b-256 | 98e56466d79eec7ed5cc8ef973a53e013c7dfa116c2ce86cdf6e8d2d75c13ed1 |
Hashes for dimod-0.9.6-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3953ecaab0630e90f7fd7ed5628d90cabecfa31b8289865c8d2329e6b2185652 |
|
MD5 | 3d2cb5c8a3368c6aa3e0fbd8b9bf1966 |
|
BLAKE2b-256 | 536e7c4ea3564a60b536c87e2e695b7d51ed3a7987b5e9f9f11c072349e3f933 |
Hashes for dimod-0.9.6-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7332c3c7a9ca6f6971952000b4ed566dec921ff216733ca5da6bc5267196c735 |
|
MD5 | 745e8c160e649fe3a06db16b0f5a63d7 |
|
BLAKE2b-256 | 98d67d37a9d35f6725832ca112e77c7783e66951697bbf5f1f14400e4be186f2 |