Framework for the Ising model and QUBO
Project description
OpenJij : Framework for the Ising model and QUBO.
- python >= 3.7
- (optional) gcc >= 7.0.0
- (optional) cmake >= 3.12.2
install
install via pip
Note: To use GPGPU algorithms, please follow the section
install via pip from source codes
below. GPGPU algorithms are automatically enabled once CMake finds CUDA frameworks during installation.
$ pip install openjij
install via pip from source codes
To install OpenJij from source codes, please install CMake first then install OpenJij.
cmake setup
If you had not installed cmake>=3.12.2, you need install cmake>=3.12.2
- macOS
$ brew install cmake
- Linux
# if you installed old version by apt-get
$ apt-get purge cmake
# install cmake
$ wget https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz
$ tar xvf cmake-3.13.2.tar.gz
$ cd cmake-3.13.2
$ ./bootstrap && make && sudo make install
- Windows
Please install cmake from here.
Alternatively, you can use
$ pip install -U cmake
Make sure the enviroment path for CMake is set correctly.
install OpenJij
$ pip install openjij --no-binary :all:
install from github repository
$ git clone git@github.com:OpenJij/OpenJij.git
$ cd openjij
$ python setup.py install
How to use
Python example
import openjij as oj
sampler = oj.SASampler()
response = sampler.sample_ising(h={0: -1}, J={(0,1): -1})
response.states
# [[1,1]]
# with indices
response = sampler.sample_ising(h={'a': -1}, J={('a','b'): 1})
[{index: s for index, s in zip(response.indices, state)} for state in response.states]
# [{'b': -1, 'a': 1}]
C++ example
$ source ./build_gcc.sh
$ cd ./project_template
$ make
$ ./tutorial
The result spins are [1 1 1 1 1 ]
Community
About us
This product is maintained by Jij Inc.
Please visit our website for more information! https://j-ij.com/
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
openjij-0.3.1.tar.gz
(273.3 kB
view hashes)
Built Distributions
openjij-0.3.1-cp39-cp39-win_amd64.whl
(310.0 kB
view hashes)
openjij-0.3.1-cp38-cp38-win_amd64.whl
(309.8 kB
view hashes)
Close
Hashes for openjij-0.3.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d777f62cba8d808961168bc9736054e138ca9aac2c28b057509bf059f823c52 |
|
MD5 | 78f1f8cd1841f8e034777c86621fa1ff |
|
BLAKE2b-256 | 233182be88ee42bdcaa71da4729c3a2ab5df56947ecc9ab2e9c691ac583b635e |
Close
Hashes for openjij-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6a6ae8a0a2e31c6dda55d2b35f434d0eb77a43f9e82df519fc90ee1d6ac148 |
|
MD5 | 12e11f779f90ffc7532c836b4cef3f0a |
|
BLAKE2b-256 | 5101f0712edc6521308c61261d41cc0d6d51c56ac44960aa6ab44c79003e759a |
Close
Hashes for openjij-0.3.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1726c77fdc3f24fc30a8095c4415d5ff6d650993f0e411664f66222ced4c3d90 |
|
MD5 | 9d9f1292f037ee8bdd36e1d14e81810c |
|
BLAKE2b-256 | 2afc2859ae355db7c37a8fc278f2187dd8d7d8bdbaf22e57308b3b19aad6a790 |
Close
Hashes for openjij-0.3.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78806d8fa097b7b86768720b404b472103b19e0daac9a0cd20c39aa857f5200a |
|
MD5 | c7e895071bb26266586acf6aa4af8aec |
|
BLAKE2b-256 | 5ea29e137acee320a587f16ef8fb71a2b65ed1b3f4c2b8eb61f1fb62e88bce55 |
Close
Hashes for openjij-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 635542a4698122529c2ecd2e0bae402194f80684a45c20e1a25a1394804d679d |
|
MD5 | bc9c37e4103fcad7ae4fa0a8b658c8e2 |
|
BLAKE2b-256 | b2a0bb2a8a25fda699fc59b9b299a26f47540d69f10c80741117d6f5f075ff4a |
Close
Hashes for openjij-0.3.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20aee436e97264d1e92a11ce3ff187705409147316a61528614d2030175a0e7 |
|
MD5 | eb44f2f65138e21de84b47cb617c1bb0 |
|
BLAKE2b-256 | 8be298fc927d8f93fc19237e70ceac2d3a39f8569ee46b1c27996dc547ece257 |
Close
Hashes for openjij-0.3.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 722195a42429cd178b326f12da0f0aca019eeee1be3607c2dfebaa6b5a4b2d62 |
|
MD5 | 3abd2fef6beb20ffbc6eec221f1f2791 |
|
BLAKE2b-256 | 64b90a02bff469d11ed760f67a7af041fbc1059c6fc42254f93daa0bcae31902 |
Close
Hashes for openjij-0.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb271426b4c07783b9363ab9df51749d4ccc69c4ca4f6a95f946b8a0c081ccc1 |
|
MD5 | e0d7ca5e7521e6be620524171fea5ba1 |
|
BLAKE2b-256 | a85f471aec7d67eac893ae9c77ae53e20020c3d32f74509115dc06076804a166 |
Close
Hashes for openjij-0.3.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46127c9d938abeac04b778c2ec80f2f21ddd7127316693950d1453ce6a472f69 |
|
MD5 | f2add147fcf48aa4e464eb8e6715fcc4 |
|
BLAKE2b-256 | 6ccf748f707009ab58af0638ea9ce3d9aa2f857036a99481f22f58dfa136140c |