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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

dimod-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dimod-0.12.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

dimod-0.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

dimod-0.12.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: dimod-0.12.1.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.1.tar.gz
Algorithm Hash digest
SHA256 99d576966e457f2cb3645c1e865ca5090a694521840f0e70ba8336412bcaf123
MD5 359ab4479bf980e80c40dac4dff05970
BLAKE2b-256 24b40354b13b1c7a23fc188b44c9cde4203e20ef1d048130f074a927eb708ca6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 17c31a6f2836d0075997e9ffc44be9b27b0aa79e29ea617ee692bfd54ec346a5
MD5 794e5f5d56cd74458907f30cef0f95e0
BLAKE2b-256 5a3ab57b464677a5ba30f4987a690cb931fe967c02d70994eabf0bf11fd415a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ade5ff87f937538839a09997d7843c6f60e476d8c1b0164bfe9795f1825db5f
MD5 c5ba2850ba1e76970bda734248311edd
BLAKE2b-256 55801006b8a96cdd2c1b7fa3771eb56b0d01fb6baac266d7f5f5dd5db0e09b3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f1d5fa71ca5c94f6531aeca91b154f415d86453bd7f66a4446ea726b63071a52
MD5 703a02d39f205a304b85bdff98a8905d
BLAKE2b-256 0adc2e3a9e2ad9c84c9995f939dc6a147d8c5a80296cee7a6d8140dc0db21ec9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 793adc535de03a4d183a490887c2eda53de91c9014b7b55483e60c50df78b90f
MD5 c11003e12d66f1a9c9f92a8f0456e274
BLAKE2b-256 716ae3d39b1fda2845bac0e89fb4253f2a932641cbe0c7aaabb3597481f0d1b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7c629292bed89e20d2abeb431fd0b813648c9ad911b4cd7fc6743ffe6d1f2ee9
MD5 70e79bcd4dc22d31c7c0a140b138db78
BLAKE2b-256 e33336bc7906c69c3b870517bdca63d18dd8d537d81c6586cec918f0665d4cfe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 298a67ffa791b1e099b6305a6e0f5257d3e77b61def6d34be6cf6e1c55b3db9d
MD5 d6d2b9794e3d349c7ed6867c6398c385
BLAKE2b-256 8df929cc0a765856485a6c539ca9fe01aeceed9fc3e3145f8eee64d998a1ee52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 972ba177159c35b2afe3eb8912e353e0480c313ddf2d4d22cba06285226cccd6
MD5 b41b25177e3130653a5d7fc775e19933
BLAKE2b-256 6d83a79e7702ccde482feb57a5e8a3904d71e7879b7162684bd37c47dd592ebd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b16569cb7192bc1b64d3db5d7a1847b271f0f1fc41eb78a9c56bfc9e9e7d9bfe
MD5 145da7bcbb83448f6d5b2c0e2aa23361
BLAKE2b-256 57873c73b3aa5b84aea8bb1d657f9f7ce52488b6cdf13720d3024eeb6ce2a8f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1270feb668405738b68c9fec1917346ed967dd3efc71668d7bc01c648bc1a40c
MD5 81e78a904a7520112d2a59c8b912518a
BLAKE2b-256 e86444c10b154037014ae7a768929563b13201fcf9c513c5d4888e4490167068

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2c8d53710df0bbea5d47faf2e993942bcf1747f0f50a539a6b94a3d25c1e84e4
MD5 349309bb34e5afac020375b574e549d4
BLAKE2b-256 594ba0394ed43f19299301324657c0a8629969a0d44697f8a2f3ab4f0c2f4553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.1-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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d5a0e69b019ad4f8d83af61425d1e5521a4917d26b5aa548eac7c55b4b63a1e3
MD5 50686a039c3fe527ce3fd035d2c97d66
BLAKE2b-256 36e8003a6982b9db5b0469a8b8eb112ee189f1891f2ba1847b9b64f015fa9d33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 756abc6cbb70766d7ea6c18149bfa394e576b95e14b4702f9969452ad2cf0507
MD5 66f4e94b9ff87107efb6b9ba03327ec9
BLAKE2b-256 c1a59f887fa529c6feea35cbb090a1b0aa66f446599ec0fff207ce2607b1cdbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 95f090bb9692762c693eaea9ea1e9204c1b8ddc0a45b557b5080f4c5b8514946
MD5 9a79e496a807d0326d915dc004499f9e
BLAKE2b-256 65450b331c0b2c971074c62ffdac5373e75abe44f849e7039169f9542273ed91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd44cc292d8bd24f2a0dd45712c92af3eccb6db38a3a55389b7d9bf7cb49baad
MD5 f7b4151fcc2a5312ff40979b582dced2
BLAKE2b-256 6fff5f71dba8a081bedfc64bebbd9af55e312a297bfcb371f6c57c006e017564

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 51ac13247de1a04cc00d581a52e0f9550082eddf350908d1fcaa8df06ede7d34
MD5 0edb1c36c87981bdbd03c9821c707cbf
BLAKE2b-256 7cd3a965fc5cd17a7877f4548ffe38e6e62d5f5aae20b3e3697832e93f3d41bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.1-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.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cb83c2c1f945d192246ba4196538956312588e224da65a051b00abe543146bc2
MD5 4acfbdd2e9d2936f499c78ec59a6f4fe
BLAKE2b-256 41d03df15b2ed989547e8dad4624bbf21828d6ab0f3c0f23fd66cdeb1b2ecb78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 743b1b39c73573f1275108073212a2d718c558cdd64cae4f241cfb2ff542ff2c
MD5 c9d490f25d81b7cf4946b3807f785f39
BLAKE2b-256 26a937cf3bea860711f5440f1314acba3cd12bb72d87d2e90b74f37f980fe432

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 26caf80dfa0ade0fb013b524a9d83f5f7a0736f7d94aa3ea918f2e5926777c60
MD5 384b40b8c96af211e5076538f682ee67
BLAKE2b-256 2f66c7fa21c6417b1f4d81c3909cf393a401488e14d098d4d6da88c19adc59c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6161e9cc8d8b17d4161124b6e8c659325530a0045a0f7692bd6d0121b4e0371
MD5 277273d43960fb26ae8f3638093191a6
BLAKE2b-256 5a6679fcad6e80eca51d98858e3cf4379eb5c8919d5513c66697c6454179803f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ad6198f8bd381de4879fc529d8bc55a1afe213f50a4a83c74d50aff08569ccc
MD5 7c390fb6056b4a61cec550888026d118
BLAKE2b-256 d5959592ca1aacc1c5bb5debab7db5e23209c02594703c88ef6205c49db4721b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.1-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.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 415b4103780af46a2cfa8e9b5a1f854cb2f9f027659b92508d3fe0a2692f78d1
MD5 ef91df556747f70f16be1a7fb0113075
BLAKE2b-256 57236d93e34fcc2a076776cb56b301ee038cd245e2b97687aebfe529f408c798

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01564f6c41cba3554f7066e6bfa2104fc863c9a0d3b77a962694f97b9b3000ad
MD5 47480711afba2b1fe80bb14a3ed7a971
BLAKE2b-256 8b3f1008b98bb8f9ff4778f720ea8bef61e8dae705b18e7e8690ac3ba408cd13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 292e28ba601aa672265d462c1a9da51e94eab2b4529d7513f5a2be92157b502e
MD5 4c31b10356c4c5766e60fc94aadf1779
BLAKE2b-256 7d7916c04bdeb7eafc5b09120b77338951c040fa46c846638d1f6f42ccbd3dd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dedf2c7fc64c3e18ac8112bbf3e7ce465c02e5ed1c0128df27febaf0a221221d
MD5 68965f3a9f37ea3b6739e8a1ab98c92b
BLAKE2b-256 cb8ec62f066bdaa9e26243a89350553d04818978970d10112d96429c88eb8849

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