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.3.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.3-cp311-cp311-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.11Windows x86-64

dimod-0.12.3-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.3-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.3-cp311-cp311-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

dimod-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dimod-0.12.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

dimod-0.12.3-cp39-cp39-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.9Windows x86-64

dimod-0.12.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

dimod-0.12.3-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.3-cp39-cp39-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

dimod-0.12.3-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.3-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.3-cp38-cp38-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

dimod-0.12.3-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.3-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.3-cp37-cp37m-macosx_10_9_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: dimod-0.12.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c49045eaee170633d08abe138c730eff916a4f00d16956cfc63254c4bf75c5e7
MD5 c831ddc9fe8d824a17f375efbe1a8672
BLAKE2b-256 1059e29a96b819a00505bb4d4f24cdad13d5655f4bf62a0d263f88e5edcfcd3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 20eea1ff22a25775a44db55614a9b24206c9fa9b21a6fdc2917e1375b215d0b7
MD5 459e47a11a022eb8fa507276d31ac9db
BLAKE2b-256 e0f777700a03ef38cddf55d0bd428133c7091487ea14717255029bd875e99cca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aab1e5223197a7c984f77c953991b8656d3d2200d7c5b9607266df7b67a48c96
MD5 efc9db15de2d3957e482c7555cbfb900
BLAKE2b-256 b025dace3a577e5e4aeb588f7c0dd78ea0705cc2ff9be1ea3e9a9a418b2e0656

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2354093863dac27f1a92c279649d55edd085b66ec30bd5e33858d1f03079d832
MD5 4b4877f45c47b4a293f7e4a4f207edff
BLAKE2b-256 9c88075773c0125ecaadf873f898fb0728d60c6733b9f117293e983243e80836

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ed6892a79a1d2c01c8f3317e457f6aacfc613c708ac05f118437330ee63bd94
MD5 82509f8e0ef8417930a99a7add100810
BLAKE2b-256 076b57992e2c34e58cf0deb9f7637fd9ef6848a3144c70c6540ff649379df685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 32b9927aa8f2cd90d6f32300c4d59c0f39f34d66a77b075ded9b32ad089c7095
MD5 72846479283795b61a32c99b1562cbbd
BLAKE2b-256 57d6fb905c007aa58eeeb5ae294aa0f8d02e146fa6384bbc3c6a3bde4b3ab125

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.3-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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 172ef6173fb2eb36e6d9cca186fa7f1669e501e705f0489b92136d2eec08bd76
MD5 b062c7a00b2a99659c2194998c9a913b
BLAKE2b-256 a76e14ec3e4ea5a047673ab075da9fe6226e584cea4ced99ddaacf6715d4940c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a269638fc526480274728fd299aed9d7e0c5fcbe18483d23195503dcce436f4a
MD5 9d1ec5fcec5ac1863450395807386482
BLAKE2b-256 521e77af89b89310e32a920b74f984402967aa23c5ea24ac46748331d39bcd71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dfecfa90177069cf63d9838391dbbe62064e7c3747b9e91a634a67663a75b6d8
MD5 d6c3b629661dba474f1a975d6ab16c17
BLAKE2b-256 e4c3e3cf08aa5c859fde9adef7edeb8571a3771bec5b9a35d1e484880d3fad60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08261fbb96ce8707ce7b7cf5ab790e58ce915a5cf71e441905611afe8e1e3f2e
MD5 68a40f08f8fc131eb87a1cf75a0b1987
BLAKE2b-256 80a4e702b040dcaaa092236fbb901f2dad1dbddef2299ae1bdfb93a4fde11058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8783d57f1edef2ae75e9960b0ffd15a5083012877699342726e8680be80b0cf0
MD5 7a826c6bac3aa5bf6da880fd99b84ea3
BLAKE2b-256 c9bd9a469e3fb980ec123c6b84a22cc5db297ad05358c369f30f0dd7a5deb65e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.3 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 efd33bcc6bc7db4071104ae9c8ef016e81d3410d5cfc8b5b72dfa86c08370789
MD5 8c6a8513889d1e89257b7e67cf6f9cb8
BLAKE2b-256 a3de6fec852dacd507ace7361dbc9f3375baa82ba298554b87b4cda46f475aad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2be2e302dddc8628eca640a0017d28850de29c22e7353e091e4b9d9763f7cb97
MD5 8145a069a995df6f7a3f0ed304c240cb
BLAKE2b-256 a5cbc8338864b45fee324f8c7b9700fa87499835424a3e395092389dc051b13f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 10812e840de828a57d5d9bce0fea4b8d209c9c394efc65d12ebf248c89d65876
MD5 a1aa4bfe81a7c0526d2224a9a2f2f387
BLAKE2b-256 754f5f85562a6b8d90240a85da2ae96538d412be05612679b22187365e6c5aa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f13523509c732525799098a8ca47bfee87d4c70a6ce0e4a5ea6db8cff5f5cd8
MD5 31c89f0d7df8da84ccccaa21822c53e1
BLAKE2b-256 f7e0d98282d8f81f4ddbe1edb75bf3d8202bf85d42b7601ee4c17f334128663d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8d45b814a3b1eb6c2d62ff6b1d8e723609668d70696a8424ab0de2102b17f6dc
MD5 25777aa85a304fa468460354c9a0eb18
BLAKE2b-256 72fff21b7d705dd07da4867d8856dd7e48f1d3b68b2618d98552e376290f31da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.3-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.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9b92936659ffcac8f9fc4e0716071a7b5b2ad2344fa604b7a3a25d7b28c24c18
MD5 d9abc701e7418514aea69addf30107ae
BLAKE2b-256 26d927d5c076072ad81fc41bd37dfa89759acfcef62258db82f7a8c76919790d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8709977b1b77bba918698329a985f5eeca4060db0ca213345d6e3f464ae525e8
MD5 69e98c42ae1beac684c75b78fd2afbb6
BLAKE2b-256 8cc2a0de45d5f47832d2345b7f48c5ed3381799daff891e45d75b61b01c76f43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c2b0540bd4ec339ec299feb26194447ed99131f0d9a325dd8cdf299e8f44d9e4
MD5 b9513dd44474a8484cbf8d0975ebc765
BLAKE2b-256 9d499bb2b5b181785a6fc581747e5f7e8eb5b29beb641df704dd91863c760370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 757fcb219b23bcfe7819401e8c8bd579b5c1c86addf83a58733b770ed43e374c
MD5 c61264c2f8ee3f428aff401a2e12a41e
BLAKE2b-256 5ec3c8fbf82d28b2933326de65cfb080ed7b56e79d22339116aab5ca6de67585

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a10cf1926b457c576004f07fa41de36f81a095e2b2139247b5489903922edcdd
MD5 69ebca557f580f973efee2598c8bf73c
BLAKE2b-256 91c9cdd2e4ed79e8a0f3982eddb5b609ae369c487b392b7ec8228066a2694ddc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.3-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.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 405b87d496e9788d76eaad68746eb6312e96f41fd58d0cf679a85403127b06bc
MD5 f760d58e12d5e38d1eac6c8684598f89
BLAKE2b-256 b7fa0532ca40d7385f98ca8c94c6f0432b58ec8482fc0a1f63a4dbfe09362e87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e14bcafd6b05ed266995d3e75db1e0d262145ee8bee33938e4cc39c19b558b3f
MD5 a79518ef4a8a19c9c07ca62e8d05fe84
BLAKE2b-256 4f6b0d19d20911f8530aedfd15f3e10f6ff98076faaf58cc66601b9b9e437874

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7b92f64794e8563bfd0a95a123903d8ad3fccd5f3cb9e024aadb85919739c3dc
MD5 a6408ad58e861b61399480b908fc9bbb
BLAKE2b-256 65e6a71ae8fbadb59b6dfa9814f9c1fb25ec0c90b0026389030e7e988d874d4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4d617f1484c7c9cce2f1c4d5744a22d1395ddda9bbe950d64f4b147b99b4aab3
MD5 003749958bcf08d2115f64a4423802b5
BLAKE2b-256 048e22f7a5cac7a686a8c848123197fd4e80568cddc6a991bded2d797b55a720

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