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 quantum computer—and higher-order (non-quadratic) models.

  • Reference examples of samplers and composed samplers.

  • Abstract base classes for constructing new samplers and composed samplers.

>>> 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]

For explanations of the terminology, see the Ocean glossary.

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 section 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.20.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

dimod-0.12.20-cp313-cp313-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.13 Windows x86-64

dimod-0.12.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

dimod-0.12.20-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

dimod-0.12.20-cp313-cp313-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

dimod-0.12.20-cp313-cp313-macosx_10_13_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.13 macOS 10.13+ x86-64

dimod-0.12.20-cp312-cp312-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

dimod-0.12.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

dimod-0.12.20-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

dimod-0.12.20-cp312-cp312-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

dimod-0.12.20-cp312-cp312-macosx_10_13_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

dimod-0.12.20-cp311-cp311-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

dimod-0.12.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

dimod-0.12.20-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

dimod-0.12.20-cp311-cp311-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

dimod-0.12.20-cp311-cp311-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

dimod-0.12.20-cp310-cp310-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

dimod-0.12.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dimod-0.12.20-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

dimod-0.12.20-cp310-cp310-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

dimod-0.12.20-cp310-cp310-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

dimod-0.12.20-cp39-cp39-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

dimod-0.12.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dimod-0.12.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

dimod-0.12.20-cp39-cp39-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

dimod-0.12.20-cp39-cp39-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: dimod-0.12.20.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20.tar.gz
Algorithm Hash digest
SHA256 da2811c5a6447056c011780ba7593177da575e1d35c2bf9990d7db4890962e5e
MD5 ddb1db02f6cb8f2fd8c407e2634960fd
BLAKE2b-256 e340882e57acb783aadd61c66dde442e708a158c5567e1c91540bedf726dd942

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.20-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 65da7ba1b4a7989342004cb348f5d3b2e6dab25436e3864e8260a03cad43e278
MD5 1a827db87cd74271355cac28fda47f7b
BLAKE2b-256 24e96275390bae9649b6b5dd2238a6b65529b80de062fd8bf99250e53b4bc56f

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3542b9bd0781d0256e55d100dcf9c9e2aa750b1f76d9fc6d21993784635d0b77
MD5 fe0f3d29978d2b66368a6c4be0698476
BLAKE2b-256 4eb9f5be62c043ac02aa159004748032d4d55b7bab7afd7f95e000611c5c69e9

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 743789ec0792277d7c8a87e1098816d8a1d88da303f02643f3e8729a024822b1
MD5 7e99b3591ec4d4bc12dbce52bfc4c7fc
BLAKE2b-256 535e9c9319a3ba5fcf0d3929ebe30400e1fe9d2f19f70ead15b4183af288d9cb

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 90636ecddb9154a4b74cea9410b92ef74d998bd66ba9af9a925d774629857b7b
MD5 c539d220d4c109bbb488437d357b5e2a
BLAKE2b-256 2a3bcd4c923e43f5bb2c0ce8956a66768dfe7dee6dbf2fba99775f35349f8d1e

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 74097eee588c1fee357c851f06677141224352eb6c33b9a18ec05a1c1e6b36cf
MD5 3bc308ef4713603c03d2bc507dba3a69
BLAKE2b-256 a4a961983f137bf55a1783d33c29faa13584b7635f49139f7b1ad5cd028f14d6

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.20-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 96906bf43bc9954f76999a67c51bc8010fc27ea009eadb2429fe2b927d848d0e
MD5 6618f46f335c0934a062f513f3ac72f0
BLAKE2b-256 6679a59e71e31836e068784652d614452ebe9da2f966998608b72274ce3bafde

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7f0a1a0d4de9a73cb874e8a9dc81f14fcb5b6575e0dba062c27d3ba386f2be0
MD5 6db1b6004e30bfdb54f76baaf46270c3
BLAKE2b-256 00b3a309aba93789c97262caacabc9da493283a42eab1e7f2acf590810d340db

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3c425fd3b2b50c3b38708e2c316c5113a3aab1cd11a7a3b4571cae292e72aa2a
MD5 92682589985bbe36de7a49e6328c4526
BLAKE2b-256 b83239a929a1680672c12b007b5aeab532836806155cfdf64cf3a467a8bcae4c

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 480f847837b4cde5aaecdda97be99a46c6c5393a1441f413432d70fd8bcc1ce7
MD5 c18989192c71f5ad6acdcdb08eb26b99
BLAKE2b-256 d4cbba35a65537aeb4a712e58b22cfa25ed5464bd0b3525f1871ae46fa85cacf

See more details on using hashes here.

File details

Details for the file dimod-0.12.20-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.20-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b3ceb9750dbb14a2acfdc7e00a6065f40759a41acc888fabf0ec8c6078ef98b5
MD5 b7e74d9e29ba7b2eee69556a1a14a17b
BLAKE2b-256 eaca72cc815bcf8e34427300a679455cedcd100d0ec398550af8c7a81454cc15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.20-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 737ebb1ab9a8c00e97fc17eeb9344ae83b8301d5c51a8a5dbca5299ed2a8be8e
MD5 b2100359986b04774b6e91d2396d95d6
BLAKE2b-256 ff281fff787162e8d75c513ab7407611d441d152a5ef7c2d3bc401d217442e73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 527569d96ac2b67ea342e1899ef55afbe100ff8766979a6be260e395888937ea
MD5 d317460209c24b2247691f73d3caebd7
BLAKE2b-256 c149cad7692d853318df0a4814a8c584a8b68e4ebaad6916d9c48c7a7abb7989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c4df18e62666d5b0deb30a4bd13e6ba712833d978f0f56c46c1311392ffcba5b
MD5 be33d200b892ddce4ec978e58a83943e
BLAKE2b-256 e4bc05d0cc847010a6a081c2dea98846a808ed4b9dd6066440ee94530792f23f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02442f496e8a3dec856773389f928b4377805a04c7ffbd08036099e1d533b7b1
MD5 c85232fbd89dca29695a01c3239e8b20
BLAKE2b-256 653e06f7d755b38d2bd2b1043b70cad07d984f77409d17e3c4953283f6536a0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6412906032575b2bc5246930df3e43ddaa9e01fb17d89001bde26c34de4a9d7a
MD5 33a661664e459fb443cc0e3745716b77
BLAKE2b-256 857241fa7f00b4a31adb55d2be34e4cd015dedb4ccfa6bee7545022574afed89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.20-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bde75e93597c147dae395bb07b0faab25044c43f0531ee23505ba2b486fdb20c
MD5 adafa1a4e4e2b6d64b2aaae336fb27b0
BLAKE2b-256 1b3eed1f0ac7ee01c2e085f28a0f6d730ff1481c0310b0258b3718f5396dacfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38ade49083192c3ab0304b741fc5700b614edffb60db757b822f10fc0c3f647a
MD5 c374f11ae5716ab3b73b914f4281afb5
BLAKE2b-256 e1c1333302978478cd0ee33b5811672b36e4321f620ead423e98d86297323f8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 24bc7cb7ba7c9ebb3dd701189e1b3309fba34c85c2502890fe54fce5629f0a9f
MD5 e45f3f9bf1c9e7d36c9de0cb4a2ea833
BLAKE2b-256 5f08d332a5e93405fa464f7f9af3e170e45ae7b2c4c46bb6361b57c6b172e047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25e01236463c74b457203cf28ba904bec080af7a38aa5f7f46c874ceebf0dffc
MD5 9de6abf7711e2e6a2afae0e08e8712d7
BLAKE2b-256 7df1033da253e1a9346735356354e8a16b1fa5631408184ef8a023400c7a265d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f239f3609c8f9f202207ab77cb280ba2a068dc3c348702bbe90dea21a31602e2
MD5 b0a54a12565a42ad71834fdff358cf40
BLAKE2b-256 1124102bf1e9d63051f0a6e7d37bcc60be983c44bc08116e7c2b9a56ae211b6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dimod-0.12.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fd96c88124791670aec430cfa9af4b89877a92075520e6d168417aeec78be0d1
MD5 fc5cfc9b79e70db5116152cfd40030d3
BLAKE2b-256 0fad8187815208ba6585dbf32c17ee95f8f9a5f76134c9e8406cc5daabfd59fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a243613756e9be7f640b76484c06c46e37a8ab62bdb3a217329e367c6730eeb6
MD5 2198f38e13b70ac72fcd1a300a805571
BLAKE2b-256 affb5ff1230420f0e1ffda40203adcd0bb1277e427a760ab5f18ab9e4164448a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1d572830ea1bac9101f07a067047ca35a57323a6b6daf3902cd2e6b3ed2ee3c1
MD5 9c6a657971cfdee2acfb77958304e008
BLAKE2b-256 4b6114f2a963b28a2c5abde586b871175f7f4f0e53f763861f1f999e099a4438

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f81236d5f65ec1fa854348c054b6593023330f734102a9ab89c35958f05f96ea
MD5 f24ee39a3dcd9e2756392624b249323d
BLAKE2b-256 90e8e107677174a3a39156230a3df7b04a80e4fca106fef5a383f309f519e442

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.20-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1089a6a165dbbdba5c7ccec7c3eea4639064de580152f9ee63750d45acfd4941
MD5 13468084d9443f696189d6d0772f66fe
BLAKE2b-256 f818cfe312c379b3aa09ca740e8b4450d284ac3b7ff8f0e14de94af7864fd1e7

See more details on using hashes here.

Supported by

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