A shared API for binary quadratic model samplers.
Project description
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
Compatible with Python 3.6+:
pip install dimod
To install from source (requires pip>=10.0.0):
pip install -r requirements.txt
python setup.py install
When developing on dimod, it is often convenient to build the extensions in place:
pip install -r requirements.txt
python setup.py build_ext --inplace
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
Built Distributions
Hashes for dimod-0.11.0rc1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05cc250e2610f33025d9684ae3da404850299cd39165c3a0c23c65bd6807ca84 |
|
MD5 | 90e717c537b71c1501a0060880dcd57d |
|
BLAKE2b-256 | 8f5c0bb63c3dd74ae9e343a17454b08d0f2de3f0c2a1d4f2dbd8e7c9e900e1b9 |
Hashes for dimod-0.11.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edebea2319848741d905ce0cbf58d807b103d77702f19d0481bd68f7a52a4930 |
|
MD5 | 25aef031e41fd0a9f4c9d0506b3aa079 |
|
BLAKE2b-256 | bcba367801a745ba69fb23d03fdcdf9017e5b489a58ae54fbfe3ef2032b4b899 |
Hashes for dimod-0.11.0rc1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 947574a6d04fff901cb008928c03418c6c3dcf2d3a530e5e561a6245fe4ee3b6 |
|
MD5 | b483408999c86cdcef0c06c6f8138e9f |
|
BLAKE2b-256 | efab139a90a883d3ecabd5f07dbb0470c9365750adbc6e2e08489e2236ff1385 |
Hashes for dimod-0.11.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 442e437ff473284358f1ccfecc62d8170146906ab89adb5f3083d51393118063 |
|
MD5 | 113cc211b5bc9584b25629f60f93f427 |
|
BLAKE2b-256 | 164f047e109639a6c2add86da7d80d9ffda241f2a7fca9ca948e4423109d1d2f |
Hashes for dimod-0.11.0rc1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dce06b55e8cd548991820f1454fb15cbb8a7cee0b9521664d1ab78d6f86bc363 |
|
MD5 | 496b6b34784d27857f895cf1542c3c49 |
|
BLAKE2b-256 | 295d7989f01683551ea70b9729e4cb44053184f5eb93d22448be1e66286fdcf3 |
Hashes for dimod-0.11.0rc1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84be38e6645287122bce128f0cedf870103b484e5c58822f8a88695fb1a67607 |
|
MD5 | 9d7557be720edd06ba51ab78e6b05136 |
|
BLAKE2b-256 | ad2abc3064ad8acc72f0f0228ccfdb3bdc125c4016746f128820703d31ef1b42 |
Hashes for dimod-0.11.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac1edb2ac39967addb83b43ad60a518c2c02b4106a2d8dad40b94e69128e227e |
|
MD5 | e7d4cceb03e462e4b8e8cc1538bfb34f |
|
BLAKE2b-256 | 7aef3e948c547682d4bb784653b3356282a717a7c3d61d0b9c62b0b102c17023 |
Hashes for dimod-0.11.0rc1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c49ebcf4baa3f699dc9686ce6e99acb4022acdad1cf2831098867693bb188614 |
|
MD5 | f9256e8e6f8670498a9dee9a2fe6ec1c |
|
BLAKE2b-256 | 6c5fd92491b3d457c138992a41fcebc1eb637a98d9afdbc66e0f8f6a0b7bbf00 |
Hashes for dimod-0.11.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a23ece17e0d0808a5295c0d709488f512ec8b8a4c898c6ecf5e742400e94a178 |
|
MD5 | 15599e4d347b45cab9eeac288771368c |
|
BLAKE2b-256 | 7605bce7b6442b0194515eb0684deb1ccf56a7ad9c1662471a328344491a3aa6 |
Hashes for dimod-0.11.0rc1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c6599dcdc8c6fbed7178990a1d24ad869c162d882d621c83f9a50bc20debc3 |
|
MD5 | 997692f88267c04b5287f5db59a7b788 |
|
BLAKE2b-256 | ece7668e13788b899dfdebe26726ce1af5502995a2d4539d72ba4ed8bf0d30bc |
Hashes for dimod-0.11.0rc1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d2808a8f549bb8d4fb28d21cbd0c977c55e5476321d45184c832790e0a6a58 |
|
MD5 | c311dd870d3b73696e96c2b1b46e3006 |
|
BLAKE2b-256 | 24e1c32cbea930988345dd8528c4e30e544e027d67ec0c7f9666907a1ccd54fe |
Hashes for dimod-0.11.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06aacd40331e30117d2c0230923e6b7d6923b566445a0ec8c9e2c96867e0f451 |
|
MD5 | e92f1959dd1252ffdb3d4ba3e37d71eb |
|
BLAKE2b-256 | f8f8ea7617269da216bd704b3685a7995d5bf93ab378a4721c555b0861245203 |
Hashes for dimod-0.11.0rc1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cba49883dd3085b6ed9380eec01b3624524d930fa713f644b80c09644cc08f2b |
|
MD5 | 1df3167ea51d44d2a5d62801a5079e34 |
|
BLAKE2b-256 | bdb7eb0dfaac0ef9b4e1cf1b3be819ebc6852db350e34f2ce3a4587bd78e7ed3 |
Hashes for dimod-0.11.0rc1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed81f18a5dd5f7e3cfd8a79525f1d4bb6f1cfad67d8e2c383dccbbcf77ebdd04 |
|
MD5 | 6071b11e037f1331b5d05e9a102512d5 |
|
BLAKE2b-256 | a63d606a6a8bc8c4e1bc52d7d8f7e8c81d48862a0548eb66ac2668a01495bec9 |
Hashes for dimod-0.11.0rc1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 945bed9947a00e538f75d975975fb3eaa7564ac48e85a6adc42eb2dd131526c3 |
|
MD5 | 63e9ecce6ae4c03767d2e3a3a2ae2acd |
|
BLAKE2b-256 | cd883b76eb13336ae8b537f8ed18bee316415eb2cca92fdc4b7f856c770d0f7e |
Hashes for dimod-0.11.0rc1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e4e36433b9e2cdb5a80c9084b7429fd2ba7648db2f8eb4bbb6d9502f3d63525 |
|
MD5 | cdde4deae565ee27a8569165f6404849 |
|
BLAKE2b-256 | 48c99027e7fc9bcd8df4eb2470b161da746738d9f8c5af6a53f8d1b9ee3898d7 |
Hashes for dimod-0.11.0rc1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eedc2331051fd521d2bc59b72ad9b451a82d2bf5cdcf6d985ea07d16c173320e |
|
MD5 | e2d39d76089a7f91d23c5cea460c4ecb |
|
BLAKE2b-256 | 3bee9dcb7026e4b3526fd463a5157f02534589e731ffcf7e253a0aaad2f0198f |
Hashes for dimod-0.11.0rc1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38ea67c2c4b98159fd164a893a0d48fae18ffa7406d57fb33394bded47e90db4 |
|
MD5 | 387ee96b2c00483bada24b1ee2d4163a |
|
BLAKE2b-256 | 982991b304a9115c3bbfa13f069097947d176896f1263a751aa06a727fe965ba |
Hashes for dimod-0.11.0rc1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 579b479dcebba3993d09b341fbbfb8752bb87b823eecc9a3574b00eda080ee2b |
|
MD5 | 7cef01c5e5db13d5667c56f4e1e4cf01 |
|
BLAKE2b-256 | 544a4a5abe6d558a2177e24ee7ca321ad19588f533ce7da3e1c6bdc72a50ec3e |