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.18.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

dimod-0.12.18-cp313-cp313-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.13 Windows x86-64

dimod-0.12.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

dimod-0.12.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

dimod-0.12.18-cp313-cp313-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

dimod-0.12.18-cp313-cp313-macosx_10_13_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.13 macOS 10.13+ x86-64

dimod-0.12.18-cp312-cp312-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

dimod-0.12.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

dimod-0.12.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

dimod-0.12.18-cp312-cp312-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

dimod-0.12.18-cp312-cp312-macosx_10_13_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

dimod-0.12.18-cp311-cp311-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

dimod-0.12.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

dimod-0.12.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

dimod-0.12.18-cp311-cp311-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

dimod-0.12.18-cp311-cp311-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

dimod-0.12.18-cp310-cp310-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

dimod-0.12.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dimod-0.12.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

dimod-0.12.18-cp310-cp310-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

dimod-0.12.18-cp310-cp310-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

dimod-0.12.18-cp39-cp39-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

dimod-0.12.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dimod-0.12.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

dimod-0.12.18-cp39-cp39-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

dimod-0.12.18-cp39-cp39-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: dimod-0.12.18.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18.tar.gz
Algorithm Hash digest
SHA256 1ff58655be3e127d359438e6d2f6564954a066eeafaf4de88135dcd4e02843ca
MD5 4f503f946ef2e608cd465fdd89ef7103
BLAKE2b-256 76c6984228bc3413fcaa642581afca1e121c4bf505ce73188b59038345923b8b

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.18-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 11182d758387241c9aa321d4c771f62a31b4f00a5ba7d13f6f2b90c06ab74b94
MD5 6456c9ae8364542eefdf04ba66bbcf94
BLAKE2b-256 502db849de322746bf270668236309228f13d358ff64f73aed4f8a11c1baa325

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25ca6445aa54c341a93427f64c7bcf04f9d02823b235396190e1e42dc84ea584
MD5 0f5ecf60a2ad033df81688b988c11e9b
BLAKE2b-256 8b538abf4fa2b687cd98650826489e4a8f5a21229937fb6253a5ff54ac831f80

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1d8825198f9a6e0f7d18938c812333bb0d7a9f28af3376fdbf250ee0d9d9ad5f
MD5 ce833d0c7b38b7833397e89a1b92af10
BLAKE2b-256 d57c49d680257e2feef7009b8c90dcdabfbe7eb7bfc4c87622f9c86b83ef58f6

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e0404347471f0051cb128502ba63f1bec5d2e8eba098c986ced316f0c86659d
MD5 651f13f9708a6f9716b22d209f4501cd
BLAKE2b-256 5a4847fb9c8d99cc913290f19438fc80b641df850cef19fd8ca8e2e49efc3506

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0e7bbb2dbd320b329c54e4e419452d1f893e813eb2dfcd24d2196eaeae318e3a
MD5 e421138c89ccd8b0c1378f623486545f
BLAKE2b-256 7b72294233f71065a56831300b3793e7c05122635c8fa52034ee96f8ed81eed4

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dimod-0.12.18-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac25ef07d7196f4658635b8006f35ad0a3854ade089f88059657e19463e285c4
MD5 ff55535f1b9e1bbc9c3d8542b503f8ba
BLAKE2b-256 abbdfeac4663fe58844ed12c95dcdaf3bf7de1400ab48e751200f80d3368e60b

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d43ac82cf9983a43755aafb6d082e8ea788e04c4826eb7494a04fb126ca0c84
MD5 2d856d71961b42230e85d8dad5e4a144
BLAKE2b-256 255dd84d1cc87cb82fa81bdc8bb57266ecb0e78b0f78524a132b0bc886b8c8bc

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ffdd67fc5cb4b1fd765166eedcc4df8ed05dcfba7e9a93cba1f9e93c045747db
MD5 99f1f6ec4bb71e65cdffb653329bf2e6
BLAKE2b-256 c024ea16ca71d11e41948c9d5f593050e9ca220f47992d1fdd1d511b3910bc42

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 afb7ac80947da05c9f3fa2a62d46cc3c476317d0178f560e8e3f9a0329e10827
MD5 2d0cc603d46fc02e6c585f4ce9905dc5
BLAKE2b-256 fd4096f8ad940b79839f0884c8139a5251e89a1752d4fe0acaa0f0c83d2f745d

See more details on using hashes here.

File details

Details for the file dimod-0.12.18-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dimod-0.12.18-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 16820ce6f0e580a2b09a54502be72ce28f94cea7d3c647830ddd1247d0307b9f
MD5 f0315964612e28f9563fd65dce1663cd
BLAKE2b-256 ce1f4e3a6245ca68804185b9bcf7b191912a2f4463d0c92e543720af6856c5f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.18-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7d26e114e7cde7852284e2ef3dc6e78ac5d282263e537e043d24ab28879d5375
MD5 c12dc2c47166b0de7d4755c58a66f149
BLAKE2b-256 7a110a36117d31c93a392173bbabdf7b4103a373750c24de427cc48994ea75da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a2fc0db0b42e1b6335e36ba8197a6966c4a4a6bb391dcbdd0942f3c87338791
MD5 a8486d22e8137ae3b8e75b1a2f8e83e8
BLAKE2b-256 71e1a60e46e7aca77d6fdf2b9c3f7321d71de08d37a7a8ab00c86679917080c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ebb769df8ed581be1b332e8e969c598f9d3f1db1d36a5092f4b26e3db1c3b1b7
MD5 f00da02f4c2c4075a76698283b734840
BLAKE2b-256 ded4829a5f2b2b6d4938444cf172fa11fd44f71198d6992e0534f42e0b427d45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0389cdfa9237e39c93f7b6afb04356a8686216eeeab2f3fad584794f40560190
MD5 7b905203094c7679b395f39b97d1ad6a
BLAKE2b-256 074bfea042fe04b7c3d0f5e1d3bb474d9370017b68efda6aa3ebd27b2b8b8385

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5a4d7de40adbb019ad16562891f0acaf4aae1bdfaf65633fc9b6f0389f7ee31d
MD5 875c65e1a97407e53cae8a4fbd3c9a04
BLAKE2b-256 45fb460167c09d923927ee943439eb8bb1375b28761254276c8790bb25fed4e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.18-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 76fa186dd32be7ee9b0adc79f6f2905911b6575b55b5206d184b34140b9c1319
MD5 49716536e6d4bd0740a5e38d51982ba8
BLAKE2b-256 7e621eec167796f73e7a3e8035a2d11662fc146fe8c39f5e314e37097466efb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2188267fdc63ef3644b0f5f0f937468d029cf2f895988416f83801cd45524c7f
MD5 06104efa6a87970c56e0302d32a9944c
BLAKE2b-256 da06cefb4093f1c6bdabab9c17ddff673264c9c28f5cff4c3060fe563b445eec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ad1212d50f157ac1998e5ff2889a61d20029d45d43380515f6853b2d6b780275
MD5 e8d9081302c9e9fe8fc918b51c120b4d
BLAKE2b-256 688d9bcf52fb559bac8b3ae5e8a558273d765a73f6e10f429eed125dd0bc51c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d307ae73e97434c1fa08cc683dcb402e046a8168e717b3c815abf217d213f71
MD5 67a6365fe5895e62d641d5e2fbb4aa7e
BLAKE2b-256 cfc9c87ebf55fcb2f5dfb589a8537c32d1a8e821f7f9ace0a39986a2822ad8ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bcd202c9f9e41e1d57de9e1a52d6ac94493d787cf90b9b674846485b8386bf30
MD5 f4464e26674defca39b41676cc49fb1b
BLAKE2b-256 a9370eba4a6b0eb8fc333081382f9bc543e523808938aed70c7f5d4f210a525b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimod-0.12.18-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dimod-0.12.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a00eb9afa74d15d66b298778c86c09acc71967b85619059349f83793907d7e20
MD5 0fbb09b010e2af3ad22d4e7285e094ef
BLAKE2b-256 17c6eb52bc04082b1769cdc3fbc4d3a4543e1bf674f79a86630a17e3916647a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3aa0ac1c0527d220ac4ff9a7e8268449ce514eb1f3d498b48dd26769377d9147
MD5 365d570a374a91ea47c0f4859b5c794a
BLAKE2b-256 152692248b07a8875de46b67692994cdb6742a91299da8f4e305482292c1122c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d1f1fa67ef604d3723713b29d32ab7163035baa254c4e3c965e7826cb25598bc
MD5 5d5fa805602fba79ae3f95b1b6cb723c
BLAKE2b-256 241ee06c78e97d3f9194ab54001a2af8864ee3681e560b6711b4e84e474e6816

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3517601757c413e98847747737dffeea7ec6b55337eff87e7e194182c76bdee
MD5 3afa28b4797dc3c16fc91dc8c54550c1
BLAKE2b-256 10559e0c9426eee98d206730170c7f280edbf18e50ddb6b5a9940405ec32f0ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dimod-0.12.18-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c085fa8e2e66e2a78e2e0030ab756ecb8adc8ab0121dda530a1b347193dd8ed2
MD5 31c41a3811479d43eb22ff02c7a03088
BLAKE2b-256 69a832840b78cfaad06a0a4534aee3be6bd108be2ac484c8002ab8613a4f9fa5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page