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.4.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.4-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

dimod-0.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dimod-0.11.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

dimod-0.11.4-cp310-cp310-macosx_10_9_universal2.whl (5.1 MB view details)

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

dimod-0.11.4-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

dimod-0.11.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

dimod-0.11.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

dimod-0.11.4-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.4-cp38-cp38-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8Windows x86-64

dimod-0.11.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

dimod-0.11.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

dimod-0.11.4-cp38-cp38-macosx_10_9_universal2.whl (5.1 MB view details)

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

dimod-0.11.4-cp37-cp37m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.7mWindows x86-64

dimod-0.11.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (12.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

dimod-0.11.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (11.8 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

dimod-0.11.4-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.4.tar.gz.

File metadata

  • Download URL: dimod-0.11.4.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.4.tar.gz
Algorithm Hash digest
SHA256 3b0db8f6cb37d2679658dbaaec8d6291675b35f36d7b1f8ee1a132b57b4dee3e
MD5 ebf845e20b002608079bddb81c21f3d4
BLAKE2b-256 a58d3aaca1520d0940b55c4a287eb4575c1145650dfc42ee8306e53b7715169e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.11.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a22307958d46c5fe87b5e32c8e4ec39148e4c22648a3d825e229ad11bdb26cc5
MD5 996afbf04c47829d037b22e77e645f95
BLAKE2b-256 1143dbc3d6ec4407484430d1732f1648e32e87d223ff32aeb8411a4cb7af549b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 86747264134c3105172098ee09ad3ab5515c8da468f5128c6116106def615f76
MD5 e809067c15b47292ed952ab8c016fd8a
BLAKE2b-256 a3c987cfa6126721294eaea565ce1626fbb57194300dee614fca575b34b38557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 647b69f6be8aa625ab41efba1bbf32b27fceb640dfcc27e3cf03aa58282df0dd
MD5 6ec42ba16b19977852448e8e3d8cfcb0
BLAKE2b-256 c67728413369a0e8e66e150f75574f21c0b496d39f7815dcf1358151fdaaea07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2716796e579df6f49fcacd450c5a68fd2c15be753af48672efda8482905eba42
MD5 5c12b61d4dfe642626a167ad7e006f48
BLAKE2b-256 db6e0e3f905f608082f96c7b12f47ddc9f3f63f60a4dc4a769995ef96f20e054

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 899ef1eafeb042f1bd9102277b4346116821c35ad01a7fbca2e2d2aa535048ff
MD5 695e6b64eac391fbc320ee95f0e7f0b5
BLAKE2b-256 8a63ff905cacbd8bab1a8522688dfe9c5b6114b86c24aab4fdf44aec8e252f05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.11.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c8fef6e07206667aaa16ddd1f807b0f46e4e1a22affe9585920dc8104c95304e
MD5 aa96cbbf33f103d869b0a0cba424cd88
BLAKE2b-256 fd64281245385978cad3671b86dedcc76820f49edb5009313de91f0699102ee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 74f5205b0f8541a7cccf6c76b33dce76e57d6bfaaa51b745f109b0fb2ee4c37f
MD5 c494b5e15e6d0d4c65d2a88ebb8af91f
BLAKE2b-256 c67a3d74db0603ba43790035f030d41e31a86ec49e46fe97f04210f4c0323bdd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d40c2c862b145d8a225bef2a15f9023900cdf90515aac1667f887e7f61b363ee
MD5 d1dc03d49f6c0d77a3323d262bbe5d32
BLAKE2b-256 a945c66fc67ea38652ba6cb3b29076f5145c6abd777e9dfed36055d21990636c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e9e600dc9a5dcd9c6a1ad1e5e88b78fab0b3a889745da24db93d0ef7a21aa68c
MD5 5048856f364b34e37e1e57e4eb37b890
BLAKE2b-256 ac0d3669c66e4ca347aa7704e86beee2b1b5604b6c84c0bd8da46feee8b9c133

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f594517c5ecdabb8d17112285db1eb8229cd9bc184769e8924027dd421fb0f88
MD5 9653921c527585ca5023ee53044f8edf
BLAKE2b-256 94e85c77e3c95ad8d004b489a53ff9c787fa88fcb9807d237a4faa439f75a9c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.11.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.7 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.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 23d4a7d811462d506fe8ae6b438d272d9046b8816f803fa2148ff0fda0ccf7c8
MD5 247e8f625007912e3d52aea5eb4b6e95
BLAKE2b-256 b51c5fc8d365f0703c918c0f777e66674108962aec74058dca239ca745fdae34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 deba6d0eac482d21c0857d0aacc3ecbbe67efe908ec80d509a73ff03551bbfaf
MD5 8026e08b33f1cbbf1f9ae135ad6e685f
BLAKE2b-256 935332e9d3608aa431461869b761b031cd355c89c87bef70b2a2517ff3626954

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cac29480cf06ed3185d5cd044bdf2f4f5092c2e32b4ca8f73eca647b6a0e8bb5
MD5 4e87ae63c33bded6aa185df69baf459f
BLAKE2b-256 085118bef2b25806a7fe037e8c02b5f6e8e6137c61e0f47f57615b887be44bf5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d5b474f76217015315bc7a666b17844434ddef789b668d8c4152902bcba6740
MD5 1f2540cbbddc9e8758032999a83600ff
BLAKE2b-256 fffe826bd4e55fcdd067c4ba1d350f064bdb26ce676d8900edd60e3b574bc68b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 267505e7069f606689fc3aa03c3c399ce30cbc4c1b9fe697fc112787ff5da35d
MD5 65602984feb71796e377837e3822e29f
BLAKE2b-256 db66d798951e69f243fb2ee3461cd363899745ff98a7b0fb304542a5890926fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.11.4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.7 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.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ceb3f278641883664d8f9210f1dbea612e2faa6a615490a3b23c3a7ef0a28b3e
MD5 e0ee4b5b6f6c5f10581069a2928870f4
BLAKE2b-256 e4a3ca510821bb71d6e41b39cb7cb6865eddc9734139a19cb92bf645fcc509e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 25f5bd71b15380497487a3bb4ebcf4d4f3affa86271021f55268716ace622554
MD5 f2fa83eca0b4cbd9251f2e9fc8538828
BLAKE2b-256 07c60d2ebe291c8b160b9f8eeed1ca7e961642a48410f584b690cd264babe099

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 19ba9bb5c4be92ebdf0e877074d1e0aa8f96e9c32b1656b49e15b52a3381522a
MD5 4fd947996c2fb44415444fd977e451c2
BLAKE2b-256 3e452e6d6c6a43e61d06df77a41c80099a88a3587f4b69f28f4aad6d869167ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4984d637950c619644d0ebaf2496acbef607b19b6bc443d94f938f0141f1ba23
MD5 e14e6264bdd3b9397f165e1a657183a8
BLAKE2b-256 939eb4e9acfd27d40c478d30334249439904e33c8f1ceb22367497847c6f88b6

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