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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

dimod-0.12.2-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.2-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.2-cp310-cp310-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

dimod-0.12.2-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.2-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.2-cp39-cp39-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

dimod-0.12.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: dimod-0.12.2.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.2.tar.gz
Algorithm Hash digest
SHA256 1177bce6c0d3bac5d45e145dd37036c6b932db4abd6b08403cb189d27bd0c092
MD5 94424b608e317cd62d39130622d177b6
BLAKE2b-256 f71aed918c19ffecbd80b102085a57b3496e36b47361d30522542280be546060

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5627e50b00aff3e6edf4f04881929913091132a86a44fe41bce8185a0df4a193
MD5 568d140788bd2a396bdfc0ec1082b152
BLAKE2b-256 07f62023b5f55b48b9e6810f8483ef1e5baaba99951ec9d1c90f30de148aaeb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 161529d2ad19301eadfb0368d02f2255ee1b5a8f81b88f1e5317510f655266d3
MD5 414a30a5ad70278519403cfb0dd752ea
BLAKE2b-256 9ddb083bcab2bb3c0df7d6ef8553ff620417e75a7745bd0819f5ac26e61b7c68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a0efed7b7d0e3c12968161e2bcdcf65571aef38e57c668650e4401296aa57965
MD5 1c5b577a36d6e70b0a04eebfc017ee2c
BLAKE2b-256 d78398c4d54f8ae703f9df6079026d1df9c037c420117fee874a39281b71c7bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38bf1ff150b478c5b62c2c34a7dd05b1b04883a8279e1f2e15a93bdd7c1a1784
MD5 df7fb5936e95fb6902c5e8125af7e7ba
BLAKE2b-256 6f4ec79ff7ed42a8117aef766ba1b97cb621f3260fa508d7ee8d8ad0b7342159

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dded043a27f9ac6f7ee9611639db2ff4c42017fb9487eaae56140a48a22ba937
MD5 914751aed288f27f58f4b25da7f4ca70
BLAKE2b-256 64ec10ed53df3c095085111c537051fa66de370dd77f865b099971fcacbdd234

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 701b2f726d4fcbe150b609239e746b3ef8b364bc3f5398a22f0c98fa2343c848
MD5 110ba195495d9031b3893e4479fc38b3
BLAKE2b-256 4cad07998fb7819fa174f7c438b42de179b8c562a1579ae4cf46537c323096f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd0312bb95c626b505abb2ac8439476a20e1fc4c468ac49663b304b95f2c2b57
MD5 15cf5da584b754f05cd8adcf362d46f4
BLAKE2b-256 0429cba9d3d58d192bdfb39decd9665eeb6071de8a4dda2dbd675a364edebfaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a739a32fe1c21004f463a2b9f64848af09d9ee036dfb63d7677efcdc0bac3ed2
MD5 89d1d063d290b97cdef772b3dd86d703
BLAKE2b-256 ff024b0e5651eed3b85a35fb0fa0c32a79f56f8183fab63ee371f16bd89bafca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d22acb4763f3847b7a7d907fff564471b4afc591a10894867cd090ce38c74683
MD5 b0cc8745cd6ed31edc26155ef6944924
BLAKE2b-256 f61b0b68fd9838b6944b62aac49567325182d0fe8d9f8b6ae98fada981c61e14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a22e71335900f2018fd160c0cc7b02fada1ad9edb1bc34e2f9b3e0c5627d974e
MD5 8dc9ff5bd92f530e68e07a108ec01a34
BLAKE2b-256 456eecc3a77ba8c35e6a19964120fb27c1f98f58f462f54139cda745cfcee0ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.2-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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f7f77837c488e18f6fb8fecd00b7fc302db90e0f0c10ee6eba8f6ddf7f60fe84
MD5 aea50dabbc2c95a343448117c82b38a8
BLAKE2b-256 257e326540fdee8ccdfe6d7bbe27e256320a608abe906d1a2ad3b568f46a7c51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ddfdffdccef8b61f276bd674a5857c3f13986dfdb608ac7cd9c73c816d4a6aa5
MD5 3ad95533949c5818445bd1531b58dfbb
BLAKE2b-256 d861a4433adb6efe3491d7ef9d9b2bc7fdfb7f811aef7e864596a9d3cb7f4d81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2d1e6d2e81bf434926412ca2cc6d89c59de989721b92e53d9268c17bf44627ac
MD5 d583f31a26efbef6cde0b9ad1a7f3d81
BLAKE2b-256 3b66e4f988dde002bbb4e95bd563a1afe6b2e9f4073b4e66977e70c84448741f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf40492cd981ac4703dd1a11dac36b3a07896fa181674ba3e20e7b2798a7391d
MD5 cbf9ccb0a8d5abd9896a2b63c9625d71
BLAKE2b-256 6a6f40b451cded0ca51d022caa2ccbade898685fe951d591b2df10909a32ef08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb58bfa811ce979b2fb1e6ea1028079f5d6108cab1ca3febe1c8729451329d23
MD5 9f04e131b243974d78d472d7fd358e83
BLAKE2b-256 a6427daf546b6dc820f41d2db1ef891f1f6f8394e1d7fab65a97e1e2995f8960

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.2-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.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2c3c7b3002ad70bfc23155585d2818e9940253568a8da7e5d91ad7136d800a21
MD5 3566af9206a0a471ca0098bbda17b39c
BLAKE2b-256 4dd1855949ec6f9849f499f9e409ac75522172d9fa419ce704d930a278e14187

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91dd41e916b3ce188196cb0f5eee3bbf98df9a68d9a52ecde8ddc54ba01bca0b
MD5 ca9682ee12566afb0c7130e61bb5509a
BLAKE2b-256 32fb1740e76dd0ec777591a626ddf16a80a8b20ca1504c90dd6f694b0f047e0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a4e84ba95434aef67b16afee9030d38697b8102ea420995849209bce1d0b6825
MD5 7387fc5d4768aec892e9b3a6dfc9831d
BLAKE2b-256 14ec48c238a9716459f77f5a3a9daaa7d56744b45cb076c727504d82df5212b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ece48bdfdde0fb5ffbe5fe1f4061e66ca287535c5fbaf4d0dd8fd51769adb1e8
MD5 ad8048876517b0099dd8eac05d72dd44
BLAKE2b-256 1457f14bf97ba274262765468b3073679ab6feb857d957fa33a666bb83e44c2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a3f76772daa870b227fc023f3c7900e76ff96ef9143441ee76a375366c02525
MD5 a8c86b8100504a1b93928ee1dc297920
BLAKE2b-256 2bba0c3f052cd4de12c1c120dd75f99f5966d43f11001220d56a86910ae77568

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.2-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.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a061601e471f37b2dd3b9988cf1298a568ba7a42f8230368db0fa272752cdbb8
MD5 3b725512709153c2c9a2af7e22cf8a83
BLAKE2b-256 3141350e7c32395b16d98cc361c0d153a3b5ff05d9ccc7b4b2ac6cd491d66be7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58725f22001832b4a69be4cfe5fe88163cab5f7563dc64854f1bde4389709a70
MD5 973ae24fa65aeb78a56fb4a47da49b34
BLAKE2b-256 8c61a5a3f7b6db87b67c28f9c56f75ce427f2cc7f33bd82f68aaf4a20dd75b6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f3b61335349d461c229745ec4856c8c47682046bfd21559cb7a8dbaae891ade7
MD5 c6779e2dec20754ffd27087d86779de3
BLAKE2b-256 dec79c97dc6f4afe1bb2e7388791ff9b6bc2b0d11d515ec1584e5d743a855ac1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9de124ce933315422989665795a13bc51eff27fa30a251baff548015d06f8f1c
MD5 f8d1029e7141036e3365df1dc3dd283a
BLAKE2b-256 92f7c076ef6641e653d13a4b5441e9eae5ecadf88c375b1697d6702c2a75b27a

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