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.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3061554f5da69c28a83fb0bb50e0634cda392cc47945db1c3d8b4c67fe4940c |
|
MD5 | 73a21197cd657658e325df5f390ff08b |
|
BLAKE2b-256 | e0627d80beb55b560d2bcf67c5984e38e6eb0a79a0f4874cbc754c6560608c11 |
Hashes for dimod-0.9.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83af18ccc23c026ce2ec135ef0c55cbd075b9bcc7079e5d67dfb0ac0ca4cd739 |
|
MD5 | aabc2b3876b7b79ebee82d0b8c8b3231 |
|
BLAKE2b-256 | f4b85e7d9a83fc049de25776f8b1f8d64a105035f433521940af08acfa9f168d |
Hashes for dimod-0.9.1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198b91770707d7c21780d650dfa5b5900a952d242ac16d3265d2917b944bb2fb |
|
MD5 | 5412c9dfb8a91b1411ea2c85eb979c34 |
|
BLAKE2b-256 | 117e74cf02b6689837e8d71a9f2ad96087346a02e215604f715e848c8a01896a |
Hashes for dimod-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4712d401ccad2389cbd9c1aa6f527bf1566113550ff1eb336535b83e99d8060e |
|
MD5 | 889e778a5212f896a8350eeb930415c2 |
|
BLAKE2b-256 | a6c5f4651fec427fa9485d26f0501731e6a2d708a56a332ce32ed84fd42c92d2 |
Hashes for dimod-0.9.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42a2c3717529864d914ccc1e5b72427159f822dc8372da82a6673b222911ec5b |
|
MD5 | f279f3c31fd3d245604e17e0d02fde51 |
|
BLAKE2b-256 | 0d17ca0e478f10854cbd7d1e225e72ef8ec1a4ac55f1f9744241d4924521ebbb |
Hashes for dimod-0.9.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf894c2c362814f2140f2927ccdfc4f72fcaaa99373369dec65ecf3f7d8012bc |
|
MD5 | 407bb1573fddc49dce3524d85975950a |
|
BLAKE2b-256 | 3c2249ae961b8bdc8fde01d3e5935bdd1532238fd5936acb7a02e0a6fddfd08f |
Hashes for dimod-0.9.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1beed9dfd339771f8d3796bb93a970f3b564279a4fd2fe2dd7328c6728cc4c45 |
|
MD5 | fa5cc5f391a55f7f4dfb70eb6c90ff78 |
|
BLAKE2b-256 | 1fea7b26b7ccce6af7f2dcc792bed459dca7a5fc69d81302f64fa36ba9dea736 |
Hashes for dimod-0.9.1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60718060da857f96d227b25e0ea9c41c588977239005d6676e3dc19af78c2c26 |
|
MD5 | 9540469c3c104d67df74fe1541899b45 |
|
BLAKE2b-256 | 60cc3b1063aeef3c993607dfb855e094b8dc8af8994668441ddff90c7f901fd3 |
Hashes for dimod-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7606e134ffd29a1b491dfe45bdbe1da0a18043176ebd875b66e04d0b22d540c |
|
MD5 | 5933a50839f4e0238ae2d119ce2d7207 |
|
BLAKE2b-256 | dc4d738495975f94c3c68248a786caeeb7e5c7c36a514f9dc4393cca034674a9 |
Hashes for dimod-0.9.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c45af5504f1c889ddb79bbac1e9eeb66104b816a8c60b257c578bc8dbaa35f |
|
MD5 | b06f3a10496f93af774ff18153bad7af |
|
BLAKE2b-256 | c720fa43350021ead4e13728805465837f987231f78abfdafd7aebd65bf84829 |
Hashes for dimod-0.9.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d43a59d422311519062b34a863cbedcf67f62f6f162b35ab11b59b476db1e718 |
|
MD5 | 94ae2c6f77e8120561808ad3598270df |
|
BLAKE2b-256 | dafbb1cf0153887ab68e1ff9518cbd7999c432c88481eb400014cf81451623e1 |
Hashes for dimod-0.9.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fac4958ff5edb46020dad2ce841a5ed856d7b5a51e53e06d8f37c2d5edf538e |
|
MD5 | 50e89a0e45b057fe5e86cb332d9f7f0d |
|
BLAKE2b-256 | 03b9a339915f9965c929eeea327a19ac0684aeb4b746a7750d102d4eb3e51baf |
Hashes for dimod-0.9.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb631d63c781816f073bd7ba7e8cf8a21a793a8f6100ab007d73277a832b23d |
|
MD5 | 6037e4a746bb31f8493adc043bc23454 |
|
BLAKE2b-256 | 7ae8cdb0fecec46bcf64a4992fbe353cfadf8b698fbb20cdb36f8fc166bf20bb |
Hashes for dimod-0.9.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64f47206a1d24e10f885e14706d554fe87db49d06e738fc407521c15d37dd5ca |
|
MD5 | 1a6e87cb70ab5a665b5ff15f526f5799 |
|
BLAKE2b-256 | 6f025745366939d0a7249caef1253cecc1c872e81f38526cbfa0620f06c0574b |
Hashes for dimod-0.9.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a0c897b111509a9c6e62e5490a14a6e0e0b4b2d9788be1589d9e90216997ec |
|
MD5 | ac459cd4b93a56492a5d615048f85f68 |
|
BLAKE2b-256 | cdbdb74aaa227b31cb54c2ce764e171af77eb582e69b2dbe4672579b61af9087 |
Hashes for dimod-0.9.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cbab7d2bbeedb50ce64e3b955caf0efd709cefb07f2514fa6f388be00b28571 |
|
MD5 | d5bc00ef52f75a330b47fa04950dbf5c |
|
BLAKE2b-256 | 91c17163f978ea1f6e798faac49597020e9151d7f69d0756a477b5ecb3e87085 |
Hashes for dimod-0.9.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ee00078d4e88b015cfddd6045d96c2d7eba2e320ba0a60e200a8cc27194fe74 |
|
MD5 | 049786b75563a92c53229991fc144ae8 |
|
BLAKE2b-256 | e1305439ad931c4a1f6b05af976f8aba445362fd4791686cc9ba24ce87398c83 |
Hashes for dimod-0.9.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c21eca0bfa6a03c477218f773f6b865f267dd402308201af48b097482e868da |
|
MD5 | c97a287bd6d4866014fe99ec224e57c5 |
|
BLAKE2b-256 | 1c0e7e11323b9a0f0419c9a678a478e7407995fc03e97b856200e2a7175d1e05 |
Hashes for dimod-0.9.1-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e551f9815c50f25008d0a0f27d68e7c328f51e6c3c6971a2c91bc8585f556c1 |
|
MD5 | 3cd4697bbb2e3ec4892cee90fba60a71 |
|
BLAKE2b-256 | 8b81629a836299ace7c7cd93ef1236e9a76d2a014dc4ce4988e8f41b53490a29 |