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.11.3.tar.gz (1.9 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.11.3-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

dimod-0.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dimod-0.11.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

dimod-0.11.3-cp310-cp310-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

dimod-0.11.3-cp310-cp310-macosx_10_9_universal2.whl (5.2 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

dimod-0.11.3-cp39-cp39-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.9Windows x86-64

dimod-0.11.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

dimod-0.11.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

dimod-0.11.3-cp39-cp39-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

dimod-0.11.3-cp39-cp39-macosx_10_9_universal2.whl (5.2 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

dimod-0.11.3-cp38-cp38-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.8Windows x86-64

dimod-0.11.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

dimod-0.11.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (13.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

dimod-0.11.3-cp38-cp38-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

dimod-0.11.3-cp38-cp38-macosx_10_9_universal2.whl (5.2 MB view details)

Uploaded CPython 3.8macOS 10.9+ universal2 (ARM64, x86-64)

dimod-0.11.3-cp37-cp37m-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

dimod-0.11.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (12.8 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

dimod-0.11.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (11.9 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

dimod-0.11.3-cp37-cp37m-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for dimod-0.11.3.tar.gz
Algorithm Hash digest
SHA256 91172b597b252a5838a4514e1d9d1810d72aab683149a1398aeabd02f45c11b6
MD5 0ae81e6a0bf6d3008efa239cbb075243
BLAKE2b-256 5d140c8934167f4eb3416e30875824e5e42fc2e31b9ee77a20eaac3bb44d77e9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dimod-0.11.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a6c94c612e2e01c2d841ffa65c2d7471d747c7c3ba9173ccfc33484efbfc85bf
MD5 ad8d10abb31bbc18c0597d3c550e5aed
BLAKE2b-256 eda7ee1398eeda81a561754a56e2cbce18d8561e5f4fb5556b74ba2a1a778294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27e4c83564031076cbbd48f6989183d6013cc26543a0fec283a20f3a0d554e83
MD5 5085c52615e51a3714336de6ef06b46d
BLAKE2b-256 ad472f7edefff59c43775a1ed4c6302cbfb6d8ab3cd8606df9180b75e25ea3c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 38306f546637a2ef755aa047a85223caa95168e5b87351b2719c560af04d6c0f
MD5 9989a954923bc40cc232d98918c2149f
BLAKE2b-256 5a1e4cadcf3b24ee96d41537cb3db6cd2d49bf14adceb9016a485d49507201ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 408f42bebe9b4f9acdaebc191ec2676ac1c99f941998e921a1885f56019e44eb
MD5 2bb6ea20732c8e57e68fa84b25e9b53a
BLAKE2b-256 37904341820a3d588bd1af16c94bcdbf18ca40e7c2f3766e3c99e3aaebd22971

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 444ab85bd1e4666ddf682eede170d9fd6ec6198f9e0c29bcd508668bba3d9515
MD5 a453bc69b34991b628d371367ef56b9a
BLAKE2b-256 cb54f8f1865f0767879fba58013749cdd87eae16e6bef872db63aed80bfd23a1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dimod-0.11.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 92d7535e731ab1570723893c7ad5baf5d6de392f1dde36c2a56caf50da4d6e32
MD5 29283afc503d6ab687ad2ea697386ddf
BLAKE2b-256 d586483f0b9197734b34cc35fcd2eb0a6ae15e9f4c6ea8071abe1fb22e484778

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 753f880988082664a166b8dc57843878aa0d3922e60085560bc588ac891920fd
MD5 62c23e7734ac543a9bd737683ebfa4ef
BLAKE2b-256 7fd758e63a2f7775051ae2a751bc56c56bf0d391766c3657785ea084407e091e

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 53b21b04752368b1cc80e4db5053dbf5605c46aefeabbf9a32ed50f9ff9d99c4
MD5 1ebf0d6df604c668139c0f8850fda124
BLAKE2b-256 7003fc41232a2adc028831c5c74f4c38bc361ab48d5f5ccbd35c4090a3cce013

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f93c0b30e5bddc73da05039282b670d4f5bcccc29dceb5e56521ed5a4206c380
MD5 e374d874ce871312fc298c9a45857edf
BLAKE2b-256 bb6c937489b6184f78837a6d2adac1ac929371fca485d6f19dfe684d0d0ea1d5

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6c6cef83cc8e8d795e8bd2890294c7439bc07dadb731d096a1c26a417018cb19
MD5 4f823386d39ddd5f5e1d561f07e56d2b
BLAKE2b-256 2cca15bbcbbea85a50a35bf27c262828d078567f55e2be8c05d6e8eedb9e5ab4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dimod-0.11.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 af577a571c6a0dc436277a4e619e0c2086578a1dbd2495458a2d854f50b3eeb3
MD5 b8ddff94c77be3cf57a9590e77f6793b
BLAKE2b-256 ca4c2bbf93e2bc2a465d17b2cedd0079965805b731be1826c3ba0b8ba3d02dee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 02c6b003dd70dffadf1e6e6fd8093cc50056c1b6cbe07e648f86fd06333a0af9
MD5 22bf79c5086cf46fbf3e8cefa3b4cd89
BLAKE2b-256 f0e960b18d29492e6117838b919bb4de9f1dda91fb9bb23694cc6ad1bb467452

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fae67c01c27c5aa7e48478c0a912fb7a672bec11a333ffc8fc7b01b55a3796a9
MD5 0de9259caff4f6cb5edc3f38ddefb4ce
BLAKE2b-256 78aacfcbafae45a70aeb84ede37b2253db27303af6235ea6a19c348ca4988956

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5ff2642fc9817202d3bfa9579dc0a5aad9042646d5d90ce5a5c618391ab612ee
MD5 89f0d876ef3d660be51bfc3923ba2df6
BLAKE2b-256 a9bea69f9b38dc3c73ae97760c76af8374c16d67dec698f44d20b8dd2ff36663

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b6e47ccc58a1a83821dcb5ce968d4ee84d0100263fe90c0904bbd1203678a874
MD5 d4eae0c304ab427bf1e69d374d583d89
BLAKE2b-256 44468ab9c796ca7a4bc0d450afab0a42c5b21e4045d2947719396d1a86a9542f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dimod-0.11.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8749438831cdd3436c4ef398210d725792a05d226efb040519083846d2706bf9
MD5 8aa3c65128758f11f2479f6b8be4c551
BLAKE2b-256 3230448e1eba6b47a844b826a2b6b4bd9477326446aa430252a1ae20c88316b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d238e92516592f7d1da5c91d9f26e65a5746b1930265a0ba5991dea75e93a7ed
MD5 8b08c318123d825a6727c089c3067aff
BLAKE2b-256 b2d53345d72684e554afdd3d3da02e940e3d4ee7069d3ad888966c2eeb483e13

See more details on using hashes here.

File details

Details for the file dimod-0.11.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7a79b440677bc9b932bec8aed9391472dc61e46924e49327fc96c80bc7985f54
MD5 a32106f0fafa4b79b3a47593fd58ff7f
BLAKE2b-256 d794148e405c763df0982d1f7d8ae29bc9b134028eee762d19aea5a77336a633

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ed0e1a4131a76604b850b15f3b1c65aa0602b1fb0ce69dbaa5910b649f466849
MD5 7619eb0b27b7b3271dfd8f25af20abd6
BLAKE2b-256 99ee4701523e5e92f2e6176e006e4e78aea90964012703e94a82b9b6b715400a

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