A shared API for binary quadratic model samplers.
Project description
dimod
dimod is a shared API for samplers. It provides:
classes for quadratic models—such as the binary quadratic model (BQM) class that contains Ising and QUBO models used by samplers such as the D-Wave system—and higher-order (non-quadratic) models.
reference examples of samplers and composed samplers.
abstract base classes for constructing new samplers and composed samplers.
(For explanations of the terminology, see the Ocean glossary.)
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.6+:
pip install dimod
To install from source (requires pip>=10.0.0):
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
License
Released under the Apache License 2.0. See LICENSE file.
Contributing
Ocean’s contributing guide has guidelines for contributing to Ocean packages.
dimod includes some formatting customization in the .clang-format and setup.cfg files.
Release Notes
dimod makes use of reno to manage its release notes.
When making a contribution to dimod that will affect users, create a new release note file by running
reno new your-short-descriptor-here
You can then edit the file created under releasenotes/notes/. Remove any sections not relevant to your changes. Commit the file along with your changes.
See reno’s user guide for details.
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.11.0rc0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb3f6d1db714ec90c11df0a5a9ec132c8429f40febeaf1e04be0177d7bbe336 |
|
MD5 | f78bd08501f899ef105b67025ef82348 |
|
BLAKE2b-256 | bf52a266a2b6ddf522b199f7abd769787f812102e47992b6b81633d49e45f982 |
Hashes for dimod-0.11.0rc0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93fcaaf16c715b231b0db66fdae83501a89332e1891487d20ff923dcc3e089d9 |
|
MD5 | aee9b25daa6af2055fbd3c30b406ac57 |
|
BLAKE2b-256 | d17a918d66eaae8431bde423175e98709949539f9a4def211cd47ff3784e76a1 |
Hashes for dimod-0.11.0rc0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73bedf67759fdd232e20283d7cddfd077d6617d91d4b353f2838467dad470254 |
|
MD5 | 0a7f5b7d8921cefc426014ef9720ddb9 |
|
BLAKE2b-256 | a579e56a07391ac7ba21f3f7be2ca375b1225afc93681d515b58578331b6ef66 |
Hashes for dimod-0.11.0rc0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ef011815640327ee197e52bdfb6ca0a4b71ff5fc7251e3279ce51b9ed7332fc |
|
MD5 | 0ddbdfe3953cf07fa3307f48ad754408 |
|
BLAKE2b-256 | 45be54be174faa340ce528d79f2e1a1d085447cc0c2ccb74d522d63da53bd380 |
Hashes for dimod-0.11.0rc0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbc7480f6b350964ad59d7ebc19e83330314d7b95eba2b96598116709640ba05 |
|
MD5 | 86336472eed3ea33bfac9a9f13299e49 |
|
BLAKE2b-256 | 0668407d7682c607b7ec443dcc3dcb30d3b00312f6a5f4e6de086b441756dedf |
Hashes for dimod-0.11.0rc0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96a174ac6912d509f51c41c42e49db0044f5c26bd92b4473a31a3e54f1cede9e |
|
MD5 | ca8b662610df030660e8369d84ff244e |
|
BLAKE2b-256 | 2420b4071fd10789631a06594774bf39608883be5d6f8772ef081622aa4392f4 |
Hashes for dimod-0.11.0rc0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 696f18212921d32d36f9e42a1181d64bb92242d85e2ef129895b2cc452e51be5 |
|
MD5 | 302bf9933d11d5906c97e7d2b1836412 |
|
BLAKE2b-256 | b35145d2dcff1779aaed76f3bb53e56795ed17a1f77aab7eec60dd55c3e6d422 |
Hashes for dimod-0.11.0rc0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456762bcfbea8958171951f3a1ebf53c3f26952db8ac4249df430cd160845707 |
|
MD5 | 860679cc316306c55d9150646f1a2403 |
|
BLAKE2b-256 | cafc1fb5bf244bdcb5b8745d85e3a167aeeb338a1e68a602a457a03a67e84d20 |
Hashes for dimod-0.11.0rc0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd51d6b25c475c50df545400f4e11dd53e0fbe57264b85e29e9812d1373a7955 |
|
MD5 | f4ecd039028fce06ded134ca9c81f1e7 |
|
BLAKE2b-256 | 784e79d392acc17daf7183f0b0049c7a340abbdaa7d8cdf1e59dcb5cdd5b0cdd |
Hashes for dimod-0.11.0rc0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6ffecdf73d2614227543a97736e2cb0a5bbecc3d29601d29cc042b525b1f774 |
|
MD5 | 18420ef353cc93da8f535b1dc92fd142 |
|
BLAKE2b-256 | 06ce2e0cf056f230fa27d51c33fd6f7c97ffd311878f83d1f10d55eb38c87213 |
Hashes for dimod-0.11.0rc0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ee22277dbde64bf48b2af508e834f305c093851bf45fa667ffd5fc45144339 |
|
MD5 | daa8111c8a69eee5a05c389aa33a08fd |
|
BLAKE2b-256 | aaebde445b63dc8f1df4081a0815620d6fab6bacae19e7106388425d4e79d930 |
Hashes for dimod-0.11.0rc0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d94bb36ed49c0812183a8837e433ca894f002da24afac29240f92dc3e7df8cd |
|
MD5 | 52949337b11334a4d085ecf42415283d |
|
BLAKE2b-256 | ffa95591f19863cf1ef4778283980d730b452bd3aff8ccbba8b3be07900723b0 |
Hashes for dimod-0.11.0rc0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 591c28fe7a290eb302a990974dcf59aa6dd402402a089adafd4306369431a580 |
|
MD5 | 15f415d8334d4c4a8f0f722570a342e1 |
|
BLAKE2b-256 | b27a1e91e4999e51811097c3523654ec6bc52a23fe40ec174a252a8c1afc0a54 |
Hashes for dimod-0.11.0rc0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a560e2fafe12b9011bb4a39128b34482d6727e6aa47f0f8a77a5aeb7cff48ddd |
|
MD5 | 5707acef4214a781b2fb25e6599f06ec |
|
BLAKE2b-256 | 1515c05a6b8ef1c9dbe609e1db1e749a4ee6782df5089625a7b3ca75412fbc71 |
Hashes for dimod-0.11.0rc0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ddd7bbae54ac09af10affacad781dfd8330b18ebdcee2c54edcdc2e9aac7166 |
|
MD5 | 65e939e820839ab36cbb3b47d90785d5 |
|
BLAKE2b-256 | fe50583b93edeb534f5e3c847580b7d70b4313f228229b9967ae5e5b2a188923 |
Hashes for dimod-0.11.0rc0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecb851e877943ba9ad62fd7169aef72b64af50f80fae60c5a53c9b8c56daebf0 |
|
MD5 | da28983f7cf259476af03db145912baf |
|
BLAKE2b-256 | 47a878471760ca27a2d91d12a4870b46a2dc86992bb4ccba8bbe1a149ca41b73 |
Hashes for dimod-0.11.0rc0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77bb5e756d76c2b8fd40b79067f3c171eca1b4b89b81548d6ccb4583a57644b |
|
MD5 | 89c0f6aaa01bc4cd8a9b7b72877fe2ab |
|
BLAKE2b-256 | 654bbaf4f50d24746e9700ef95f71e2aa0c7b04a781525c5fec7632d2b597bde |
Hashes for dimod-0.11.0rc0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 440c59fbfd2ce1c16782ffc24c46da358b9baebda5128bfe6901bef0aa1a9eb7 |
|
MD5 | d6ae77543c6b311d6b97a0efd8ec1d13 |
|
BLAKE2b-256 | 599294e55eaf344bc4b55e5863ae5182d1bfed6c26f5a772fd7a1d1c43bd5f3f |
Hashes for dimod-0.11.0rc0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39601a2030b39b6d279746c63b95d35c26c9cad52a439339fde3ce92687eee33 |
|
MD5 | 964ea4c0983e4b53f994af9a41cfb316 |
|
BLAKE2b-256 | 2276d6b139ab274db27f99a2663a51923f03e748af65a3e27fd7f304bd69f753 |