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

Uploaded CPython 3.10Windows x86-64

dimod-0.11.6.dev1-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.6.dev1-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.6.dev1-cp310-cp310-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

dimod-0.11.6.dev1-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.6.dev1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

dimod-0.11.6.dev1-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.6.dev1-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.6.dev1-cp39-cp39-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

dimod-0.11.6.dev1-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.6.dev1-cp38-cp38-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8Windows x86-64

dimod-0.11.6.dev1-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.6.dev1-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.6.dev1-cp38-cp38-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

dimod-0.11.6.dev1-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.6.dev1-cp37-cp37m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.7mWindows x86-64

dimod-0.11.6.dev1-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.6.dev1-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.6.dev1-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.6.dev1.tar.gz.

File metadata

  • Download URL: dimod-0.11.6.dev1.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.6.dev1.tar.gz
Algorithm Hash digest
SHA256 2a8df79004a4d4daf34d1daf6a382677df53a67315ae397aadb548c0be1064f6
MD5 51d7a7603c08e6ef6c08763e5ece65b0
BLAKE2b-256 3664e77f1e16cbf33e1e1dacc788585b0594af3848283a3ad59b351d0f43d585

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e23dafec5877c64595b230e0c84b18ae831bb5a91b6bbcf6b80dc0027676ba44
MD5 b46fbba63b82beb34f84f92467c8ce9e
BLAKE2b-256 d4ac8c91da917ab31b561488684f99048bffaec1364525aadda43ce00344cc4d

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0076fa84cef6cbe3df5f7b0b75c794ac990a406116417c3c65c35356b9ee01ef
MD5 280ec4298018933d32ca4e85d5b4ee02
BLAKE2b-256 1ebea4fb0fe4bdfda3123da5a53348af1ca16ab3b0ec8931b6e6df1577075765

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4e6a4d3cf5798b8cf95edb45796d031c0e6156eff4f20ec2ab761c50d1967501
MD5 e6b07ec96d537c7dedf1b61fd77b9191
BLAKE2b-256 4b1a5ecf1c0b9df4be792c4664a9ec2e3724450c78882b5c96acc9e29dfd47b6

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a2ba614d11f1b8a4f83e603d88f238bcdc0209ea2dce999fef4ca45999db4429
MD5 3bbad7de8a33fea5864dd7609aca539e
BLAKE2b-256 a6ca8e1513d55dcaa22683843c090140dc8c6a6d08d511d72be5b7feaad086b2

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5ae1e84b9e00f69c46b1a353c68ce6ddd71f5bc4f05e2fa22826ce80fb2c3c5b
MD5 23f158f2d941c1de04905ceb56fe82e9
BLAKE2b-256 a5f2857a00123fd26ca104994933f647e81f8a7bf123b99cfd6284d3ff7eb2f7

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dimod-0.11.6.dev1-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.6.dev1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5eddc9186c23307beedda98ea149c5f4d4ae8b6bc449c7d064c3bde3b6d9b050
MD5 672bd1591c0c08daa4a2e3e500dde531
BLAKE2b-256 a02f63055678dedfc2fbc2dc06a2508bbfe493f142c737d431e7abfdc6d833fd

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0796f5706514155809d9022d9d35ae4861cdd4ae1cf0416b3854dc48479ea7b2
MD5 2acbb8ecba93393297b3f071dd4d227e
BLAKE2b-256 87575dd130d486c2bcc2cdb021f6e09d51515ae7533dad91efb93fb47d24fc0c

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c332b052a05510c919b43f758d69210aed6f8ddeb0738953d26bf80faf5a1e20
MD5 c8c4e0fd7d08330bdd3e0a3f36604904
BLAKE2b-256 f7082bbd51ec782e2e53c7093a5d309b7a58210a68ef87357371664ca1a15a0b

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 249e82add329c42099f7190aa6cb5391a6d02af0bea4f1d9fc4eed6a7732490d
MD5 188a79855409eb41251b1a3d9fec535f
BLAKE2b-256 6bd16026b234e0ee1c9a4d2781cf17be6420b771accffc7f83015b2433407a84

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6633baf48a93d13ced561106561717c230a1842a7d732f7bb4dad5089dd94fd0
MD5 3a585c2aeebaeffda2916f5f3aee0da4
BLAKE2b-256 85b94cd4ce026cf71d531647918034894741c5bb5e716a08221820b57ea51fc6

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: dimod-0.11.6.dev1-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.6.dev1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 516cab53c927fba9ff0235bf7d5d4f9d09b588f83bf31b66768b280dde699b7c
MD5 54af57d88ba824eb1dad4d660d4af478
BLAKE2b-256 c46c1b07f577ffdebf6ca4be1ffa012cfb8b1a1f18189cc5f271ca4df1924fa3

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e11f9201948f6715c65d989075ba1cf90a8cc609adc60ce83362c253f26c7fab
MD5 a3445c1002a64b1c5ae28d51daba9edc
BLAKE2b-256 bfa466aa6fa50d7511d8b5c38952b125cdeb850d4d8502f887b8baf1773e32e9

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 00f5ec1411351066cdcd6d79cd300d69a0f004992e95f09e63810f6919e142b0
MD5 a0fc8192b7134096f54b2ba02ffb86cb
BLAKE2b-256 83963a028ad2f8a2df0acdb3e5f6183d36f876b043d18fedee3d467e23a822ad

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 32701070fe1d83a3e74d658def681d1196fd201247cd31348d77b073715c3192
MD5 d75ba8e6472500d752d5dc307c73314a
BLAKE2b-256 5a0887b825bef7fcb7f221de7ac6d4b377037aa1f91e7961c7186621a1683039

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 44567558bccd6fd09365100051b25a77d39df92f78fa76df3a96c67d8a0a1328
MD5 f726d1aad74d46b8af9a9724c997d970
BLAKE2b-256 b5ee95921d654f3e95e59d43ccfa07f4b84c79773acb7b5fcf0da60aa4075d64

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dimod-0.11.6.dev1-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.6.dev1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ebf16a8080e50a3fa7ab4305eac9a34ed13a420cecaa8ccd4ffd48cf0426efba
MD5 e3299ecd6d09e792386427f6f887fb66
BLAKE2b-256 f2aee099c5241bf6c6d8b7fd5b73628a4f53c70012e7859453875ea4bb36a896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c77cd98c75978ad1c04c8bc96716912af9c8c0c3e423d4c283f467429d6a2d7d
MD5 81b41a7385c8a0094d7a8af07ff2a699
BLAKE2b-256 8dc52756e7abe31c1225605b7c1179eacf33dfb30a9f341cb459b9936ebdf8d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 94419b6cea8d2fcda56a8a62285211a14537057f3f0c6a74621e8f943b903479
MD5 05836b15cf8c76d824fdfd7c00529daf
BLAKE2b-256 828b8bd0eded928de03ffdcd55cc59acefd00587b74a7c5a4c4d6ffca2e8d266

See more details on using hashes here.

File details

Details for the file dimod-0.11.6.dev1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.11.6.dev1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8e2253d2435f460fb492813634db8820d2456c5c7311e352380e488bf7cfd5da
MD5 9e7f75876afa1ccfb45d10a2617b2b6f
BLAKE2b-256 04d25f16e09cd821969f080248b61b48078341644f4f0fde39ff323830aefe6d

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