A shared API for binary quadratic model samplers.
Project description
dimod
dimod is a shared API for binary quadratic samplers. It provides a binary quadratic model (BQM) class that contains Ising and quadratic unconstrained binary optimization (QUBO) models used by samplers such as the D-Wave system. It also provides utilities for constructing new samplers and composed samplers.
Example Usage
This example constructs a simple QUBO and converts it to Ising format.
>>> import dimod
>>> bqm = dimod.BinaryQuadraticModel({0: -1, 1: -1}, {(0, 1): 2}, 0.0, dimod.BINARY) # QUBO
>>> bqm_ising = bqm.to_qubo()
See the documentation for more examples.
Installation
Compatible with Python 2 and 3:
pip install dimod
To install with optional components:
pip install dimod[all]
To install from source:
pip install -r requirements.txt
python setup.py install
License
Released under the Apache License 2.0. See LICENSE file.
Contribution
See CONTRIBUTING.rst file.
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dimod-0.6.3.tar.gz.
File metadata
- Download URL: dimod-0.6.3.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c14827df8439c3d9343389af5e83daca3f4ba68a02efec8e659d8565a4f4dca
|
|
| MD5 |
283fb9f3278663a995566232649b5b55
|
|
| BLAKE2b-256 |
cf12a580e9fcf6648c883e0624477314e65a38bfacf7ee2dc0fc1ac61c39f004
|
File details
Details for the file dimod-0.6.3-py2.py3-none-any.whl.
File metadata
- Download URL: dimod-0.6.3-py2.py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f52e3db377160e4509f4277f9a51776f8a9aa88971a18d3840c1a02c4321b3d
|
|
| MD5 |
b13f886ffa735c0965dfd89c51e0ea5b
|
|
| BLAKE2b-256 |
2ebfe9847b81eda52c18ab0dac0c8a955ab7ab77f2f0a8a6e83eeb123164f6e1
|