Skip to main content

A shared API for binary quadratic model samplers.

Project description

https://img.shields.io/pypi/v/dimod.svg https://img.shields.io/pypi/pyversions/dimod.svg https://circleci.com/gh/dwavesystems/dimod.svg?style=svg https://codecov.io/gh/dwavesystems/dimod/branch/main/graph/badge.svg

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

Installation from PyPI:

pip install dimod

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

dimod-0.12.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dimod-0.12.0-cp311-cp311-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.11Windows x86-64

dimod-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dimod-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

dimod-0.12.0-cp311-cp311-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dimod-0.12.0-cp311-cp311-macosx_10_9_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

dimod-0.12.0-cp310-cp310-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.10Windows x86-64

dimod-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dimod-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

dimod-0.12.0-cp310-cp310-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

dimod-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

dimod-0.12.0-cp39-cp39-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.9Windows x86-64

dimod-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

dimod-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

dimod-0.12.0-cp39-cp39-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

dimod-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

dimod-0.12.0-cp38-cp38-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.8Windows x86-64

dimod-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

dimod-0.12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

dimod-0.12.0-cp38-cp38-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

dimod-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

dimod-0.12.0-cp37-cp37m-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

dimod-0.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

dimod-0.12.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

dimod-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file dimod-0.12.0.tar.gz.

File metadata

  • Download URL: dimod-0.12.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0.tar.gz
Algorithm Hash digest
SHA256 26c3cae7078b4295fdd8fbb62ee7d5fb8bbab0a53afe9526b853f72068e68c7c
MD5 6c6128451312b0fa40d06607f2e6acc0
BLAKE2b-256 c346a42d90fb5554e9066b8ff347de9dd94422084689a110b6033d03e869e2f9

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 955ca92f5bad40e3ea46f5b4a41516217dec2d52632f542307d62ad755494713
MD5 ce230a4f1786216f55674087e6b0f9a0
BLAKE2b-256 7bb9b4b821b1d71ab28a7de2f2109d68a9a4830bad93822cb5fe5172f2b9e281

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9be60a850a4126b78592c9f6348792bbe1ff9fe3d6c6c8d650d5c18299078f6
MD5 35cedda05df589c8b9dfd127338746ad
BLAKE2b-256 758fd091debdcbe08dd824e86069e81a357a39d7bbe84facd1d8bf7432504159

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2417dfd37742414bc9316d15a0c3dc18961efb37d54eceee35aedc93cd981003
MD5 8b1effa9869fb37753fbde355b9be32e
BLAKE2b-256 ad04cfb0133a735f9bbdb7860eddd5b0e1372de7915d8d205cf7e0da55600ad0

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70ce82f9104e6b2045665b51ed2d498bd69adb235a0ea0f1c9878310bdd67d61
MD5 e9fde1668c1aea2cd2614934595b3f70
BLAKE2b-256 9e8923c011b787989116f340f04e63d39649c9d4360dafd678cfa6e205a467e0

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 89802926246ac0391ca56dd58aaddb7186612b5da083fb09e0c18f64bb18c380
MD5 f2a46d2983227418e45097c98d0158f1
BLAKE2b-256 c134602aa3670e1a014fe435d0d2777d6bc296864a561d2020fe91f9eb82fc9a

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d3539da5eedd0a98ae60efe5e3ecb9832c5783e123c77bfa663a522d71d87cf
MD5 d308c2bffc06f62d94757f88e933bbec
BLAKE2b-256 0ef0c08fc1a69a59c18649fd80032a74280b9f97af1a7969f7fcfeb15599b4fc

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 abe8c298cecf6bbde8a4c13133a535580bf134a9e5a3510f4ccae390de9d9911
MD5 f6bcbe45ca33cf7a221c0d1cfe917082
BLAKE2b-256 fcb1dd293d408f63a64994bd759e81c00d2f12aed9d4b3643a02fe5fd9af79fa

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 321c9fd649f5ea51b2fc86975f4f8640ff5b0365aab7697f937223f49809a7a4
MD5 f64fa9c947e4d5ad4d87113d9fc33d39
BLAKE2b-256 7316a92e21f9fc282da32b6a49d156782bed94e3748bc8a12a692793a1b98637

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c05fa38b1e01bdcf5dabd90bbbdf4194774e718fe1800ff43148749e8f8fa6e
MD5 086585d8498ceed88a4bf145f7bbc7da
BLAKE2b-256 12f2ea0109f888532dcbf401f98f8e3c19858201cc834131866f5241b2b89bd0

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d5c7469604af33abfb67960a182e9c7ceff2c62e0cd2b36c7b7d356b4b16a46
MD5 3658aa35b8446d32951a39846df3db0e
BLAKE2b-256 e7de36d42927da6b0afdee06ddcc8d2e8f6c071d26d7ec92a3d057b63295ed0f

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dfac310a05dd882e8d29e503dd8fe566abe3d7844dcb8e261442a90f48c3f77b
MD5 5c641e23ef5d6eba1729e7eb7bb7af76
BLAKE2b-256 bc9cc480c34bcac6f6ce2f3f201a8aeddf0ba6b5b54cbf8e46f7f4248f3f9a4b

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f7aa2f520c31f0ae81553a7340f6fd3b3fd4561f60dc17751c519fcc47ccf50
MD5 2eed40893eb372ba9a31579d596d8bfc
BLAKE2b-256 cfd039d9540674711d8f667851e32199393b0b4934e1b54abc3a233a20645406

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4fdf5759fbdf263b57d787dea2af2b0aad6b54c8aab11a7f3b8efc1d69d2fdf4
MD5 8f68519684db825c66c0d60eb3e3aaf7
BLAKE2b-256 2abd77436616dfa5f2d796e82b12bc3741c4b24f0963ac68530d282840f35f50

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b076afa3027c6878360c9f436ae80ea9cecff564bf376820eb3320f85ec820b9
MD5 63c0f39d0bf6d8dbabbfd07e67bb4316
BLAKE2b-256 9b6a0c9e2164291b4ab0f478ce168874fb7771db260703403a8eba4db5c29938

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9e760c0edc2610d5910236bb133c1cd551c32d7326c86e6cef0ae3872e8506b2
MD5 a53fee86963c584e9f3912f829550bdf
BLAKE2b-256 d57f665a1f65e97aaa1bd6b7d9d2b13ac62d38d2dcf77b2450a5ef976754fed4

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 41a72109c45c554c2773f427ee5c2a1277ed0429ee1813b8066457d0703fbe58
MD5 b0ad6ff6ffe7ca25afce9ee4a6adff73
BLAKE2b-256 17f034788153e0b7f49bc0d53e6c9f101ed9ee2a0b24a54816368c3ad394cceb

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e012e4354da1a3ecbbc20b71665648bb855e1975944292f859004aee59a0eb3d
MD5 3e4a0be23acae5bd5eb8aec2f427ed1e
BLAKE2b-256 41d9762f2143aa3ce88cdde314a7d07a1c055294f5a70f2bfbb8df612af4afbd

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f8cf5c3401d9805ec8e08a53c8516376e87253394c2cc12f23cca1ac5bb96713
MD5 c2032723ae99b7a3825c7faf29defc1b
BLAKE2b-256 19ffebdf3dcd76664b12b39f6f3e4395a0fac6ba04808a0f3123848b6dbb35de

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7ad703376f65e84e354535fdd01968eeedd0a9629bafb118f5642a44649442a
MD5 7f6b35758d335aebe6ba0558f9ead84e
BLAKE2b-256 b33591950483a2830476b02e143a8c554af2b25c838e28c606df7ffb2ce91a27

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f4825769c9647adb950a420fa61de6ff35bfe57d5ceda6e3e70fb028ecc99f8e
MD5 ca62a7af0eef0870d62c3e5993240ddb
BLAKE2b-256 a7e9d6383f0549c7bba016bae4684b1efb15899d2688971ed3b7bb3532abeb8a

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for dimod-0.12.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 40c38c547e111e0e63aa5693d1864be78646a7af5ed4cc5becedc6b4c77f4073
MD5 20c2092cee9c8c91c717cf63b073b2a8
BLAKE2b-256 6a62575b455d554fe2515dff2635960bd6f349a5229e162870daba4d09d7f269

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4569365875a390dafd6df470250ac5ffd81cb83cfc5091b00f0cf60de28cec59
MD5 cb22b64afe7eec036566efb8149619bd
BLAKE2b-256 76587ca4965b6560ae5baff6d2b3a3c44aa3cd40f2eaf17bcfbf6ca263d05b92

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 532c9858726c513970eab6ee319caad45a00715eae82e9ca31d057b21c959ffb
MD5 d2b71d2720aebe25301da115e36fe491
BLAKE2b-256 90c005ed7db4e2f811d085cd55c5cf33367e15f26dfa4bf36b6c947d909abd1f

See more details on using hashes here.

File details

Details for the file dimod-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2276fff9416fd3ba57df4693318e3047f4bcf7a3adece1aaa267dc917cf15619
MD5 e915dd1ac28b5710501ccb99a3642ca1
BLAKE2b-256 515265d3f9eef09a1ce5ebbc273c245e41a8d93297dbcc3800cdd5b06e701b42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page