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.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa5d92873a3b3372db2eb100fb55152fe009d5eea1280999cf9de7940a0e9922 |
|
MD5 | 875b520d78b38819daeb2e845ddc68ec |
|
BLAKE2b-256 | 7abfc4829bddf7962f2ccb68071f6451e438a56281a4f3abb04dca27c14dfb9d |
Hashes for dimod-0.9.5-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fefd407085970188a4c65bc3676088f6f84142c21669f01f66fbf90189f3c1d |
|
MD5 | 8c4a7680d10129ee06e705f20bb8cf1a |
|
BLAKE2b-256 | 7afdc323b586d35bf987de30f43b29bb93e9af393ddf66ca825271b19f9bf95e |
Hashes for dimod-0.9.5-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a21ef7a8222ca9118e7c3217fa7ec83e024d6b2f41db3f433293de9ff799bd55 |
|
MD5 | 29d7c895038f2156181adf04edb93dad |
|
BLAKE2b-256 | 3a77ff54e465a2474d579b92dcf095e43417867f736c69c18de76b77e81a46fe |
Hashes for dimod-0.9.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 192ba2abb5e5e853a5411fd0a8e1db42e0ee5023daaa8cf3a6c0e96d1e55ddd1 |
|
MD5 | 9c70b5cd0a060159be33d77b3a8c300b |
|
BLAKE2b-256 | d9890e54fc870cb2ef1bceb3792b6c738537f945ad0d3ed9a9267d1872a1e78d |
Hashes for dimod-0.9.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db2192e0912268cfa14d6d6829606976e170898ce3e48ef037e470df1df3fa6 |
|
MD5 | dff52a2c38e3fd6dbc354124f590d2c0 |
|
BLAKE2b-256 | a1ff0869e526d2a67cc05ba3aec98a442eb8c4dee37f1f6e15b3556d321d52e3 |
Hashes for dimod-0.9.5-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7580bea70fa50a80ee8fcfbe816f4b98a877c31eeb356c62582fcf35e2ba5ea0 |
|
MD5 | ad0caf39b3333d3c76f8fbadbbbe911e |
|
BLAKE2b-256 | a139dd94c187694fc8ba61e87bc81a5be4e5545ebe3b7b9e0dfd6ff8a3f4907c |
Hashes for dimod-0.9.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f043cf974ab7414dc9c87957473db12d66edffccee6c1f508e623d4f81bff24f |
|
MD5 | 043a12e563573b7d6b7b7ed0e0962464 |
|
BLAKE2b-256 | 8f7327dca9a987f9c539ea45ef7817d1649dbed7bc93f2291539799e77de71e0 |
Hashes for dimod-0.9.5-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ed4008eca45757d67756e7a035c404f3c00fd4f38fa3d7e2ad815e0217ea70a |
|
MD5 | 2202968c499b2a82a1aea2752a49bff0 |
|
BLAKE2b-256 | 9379703ea48eba2ad01aa29605db0685210182af147e866586d16d01100f0c78 |
Hashes for dimod-0.9.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4701bd442f52011d5b42c6e450728c60768fa08afc464662c785e71f9dee3c5 |
|
MD5 | b97cb4b05fbd91d249b362a020219646 |
|
BLAKE2b-256 | 0d9d1c50e7a48b0276e0c0c8bde089069b54d2799e97940cc3e0ad7386436065 |
Hashes for dimod-0.9.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd561004802ea6f6ca4e51292b2124b627844e13e2a4903371b61e7b2abff2cc |
|
MD5 | ed2c716dcc536d78cb776dab0657cf0a |
|
BLAKE2b-256 | 258e8eb8766d39c5466ded479abff3205b6f74193e33b2c011a08bbb9ee64d55 |
Hashes for dimod-0.9.5-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2290e90ebc47e4ca6a94ee8db9057ff6ceb9646894f6f75cfc41dde0751296fb |
|
MD5 | 9f27d3c00bd2cd31684ce2c962f47bc9 |
|
BLAKE2b-256 | 7e9231649682af3a17949ddb602e05a53537de8f3fbc621ae32f89289fc7fd31 |
Hashes for dimod-0.9.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2377bcd24202603fc1359122a6b1f472d96980bcb25c3c4349ec27b898fe9a |
|
MD5 | 39dbc8a770075cc96e6a88ac2007e690 |
|
BLAKE2b-256 | 8158fbba4f4d4497bbb071cd9d769c9fa479ffdd6278b6bb7bdebd7b2e921d7d |
Hashes for dimod-0.9.5-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac1e5ebbf2c2ecbcf62b867a1a1c16de37feb350d5af03d0734685510ea447b5 |
|
MD5 | f82b590b15ff7e646f61d56f1dcff63f |
|
BLAKE2b-256 | 6f4903737ee07b6d89dae206b4e0682b5d9ef5e7b92eaab65359dbc8050cb1c0 |
Hashes for dimod-0.9.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d53d9f9477e6b291f2c64f0d51c49a8d6200e5a4ef6313b1528b621923d7384 |
|
MD5 | 818ea8c502e9a5440c4b0607ed8d3318 |
|
BLAKE2b-256 | 4fc93176653f95177e6e4be683f4ed76a49cee69a0973127047b6cb91b47a6a8 |
Hashes for dimod-0.9.5-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b28c01a059cf775dbbde207c638ad9aaa4fdaca140c3726c5e5e579c5fc7a040 |
|
MD5 | 65a225f2e9cc23af8a0230ca7d4668c0 |
|
BLAKE2b-256 | 0949a02cb145e41e8eb6bbc2538389378ed2ef3591ab17baf396241e02722da1 |
Hashes for dimod-0.9.5-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3e09e9575b9bd7bb2948a6e625c4b40158132441551e0dbcd89fccfc89377da |
|
MD5 | 587beebe4f04946ae0aeed4e4f49d88e |
|
BLAKE2b-256 | 3b9a80666be8772c12eadd908a0f15138fbc676b4e6d83727b524a36cb620ff5 |
Hashes for dimod-0.9.5-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a1c6845f990b3726fb5d32dd1be568bfaf89a5ffa4de9dae9fd994e7da08a6 |
|
MD5 | b2e81805a2beca906d301ed546c7dae9 |
|
BLAKE2b-256 | 6339bde169e10934fb839d4ac3f6949192657c33fe545ae1893b0bfdeeb5721a |
Hashes for dimod-0.9.5-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e851f0f692c006c624a6e3235d72f5d6a0f7781b456910f31e5ff44b8e9b9780 |
|
MD5 | c9b0780ab7460604ba3eccd0c47241ae |
|
BLAKE2b-256 | bb12475ee9e36d0d97f7438d06acda12aac72d19663e933fc2bcee15bdd5e4f2 |
Hashes for dimod-0.9.5-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 663f41943c925ea9167be5d295d1e66389965a3a47f4d7f5e3012afd26ea449c |
|
MD5 | 0e7417299ce1599ec4ab80d4cfef4687 |
|
BLAKE2b-256 | de8f68d044eca31c7f12f2301c6107dad2bae4185d86ea4fabc7fe094d9e37a8 |