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.17
- (optional) Ninja
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 want to use setup.py instead of PIP, You will need to install CMake>=3.17.
We are Highly recommended install CMake via PYPI.
$ pip install -U cmake
- 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.17/cmake-3.17.5.tar.gz
$ tar xvf cmake-3.17.5.tar.gz
$ cd cmake-3.17.5
$ ./bootstrap && make && sudo make install
- Windows
Please install cmake from here.
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 -m pip install .
Test
Test only Python code
$ python setup.py test
Test Python and C++ code
$ export USE_TEST=1
$ python setup.py test
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 Distributions
Built Distributions
Hashes for openjij-0.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17fb2946b563a33de1403dfae54e5b2a1f4c6dab3c7c8d6f556e3ec6b83adb57 |
|
MD5 | 93005e8ae7957f5e8e6da3229d363be3 |
|
BLAKE2b-256 | 9e8f2b44cb81c57ab5413f05f7a1a65e1aaba12e46d22b7c022d8b23c872f8df |
Hashes for openjij-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af37dabffea60c07a7ce1dbdd3413670e8c5403741c77f14104e6efa7462ad70 |
|
MD5 | 2b9f1672703816d1de09b65da7aba5aa |
|
BLAKE2b-256 | daedb4bf62d55ff513553ad57ce30532c3e776ad20d0a884a7b2046cb21255cb |
Hashes for openjij-0.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6083eb89118c7b91bb1b64973c3fadc845e51c42e9982ef531bf1df187da0326 |
|
MD5 | f6dcddebdd2b4a4bb18876f259b9b09a |
|
BLAKE2b-256 | bf497f104762e91897020ff38ad3f620a2e8a7933bd73dceb9e2c8111bdb6cdd |
Hashes for openjij-0.4.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd849d0f14eb249232991d6fac99eab242e8d36c9859cfd7ee06ee66ec311146 |
|
MD5 | d0730223a56f004f92d56e6ca39ea255 |
|
BLAKE2b-256 | 2cb8d11df0726be9e13287de31f0cbd5ef1b592a09e30e39e606bb0c249385f6 |
Hashes for openjij-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e87f0a6d18848832fce550ef5e144b8f43e7e23486b3efe3731291b722e66c36 |
|
MD5 | c5e2e00432c0e5ee3b131b97b826a2f5 |
|
BLAKE2b-256 | f8f302012246161c7c3b8cb0515dc2d5d2609946b44673147151d2db5f0cc2f4 |
Hashes for openjij-0.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d058712ccc722728402269201d990780b1e005d74464e87e4d9ae0a8f47ecf6 |
|
MD5 | f4f80b65cd3470f1dac7af2b41f45f35 |
|
BLAKE2b-256 | 44a3f9353dd8b1b2eff82c947ddc1dd248c21f55b2eea4a880ff693043dcbcde |
Hashes for openjij-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a05e3bdc8da6fc901f7df56afeed412c8c56f2b108c557c5ad261397cc3904d4 |
|
MD5 | 22c683f3d724e430658fd716f23e0535 |
|
BLAKE2b-256 | 42560e4e661353003c22f8486f34e0e73457070e39aa55e77a8e59d6211fcb02 |
Hashes for openjij-0.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f4e6481a3e03fd879742155bb2e4a87a08d6bbb751428cd7cfe6a202d7bfbb |
|
MD5 | 45dc6ffdbc00b4bf913f3d02cc6f4fd3 |
|
BLAKE2b-256 | d4012d074656c114d2bb9d321b79acfd388ef988f7ea5efb83b9e0ac3e9de716 |
Hashes for openjij-0.4.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c5a4789141bffe3b8d7bf3f1ce93d4a52d58a839c6fedbed2eeade6029199f |
|
MD5 | d1ce4ba7af53720dc1ed4d3f093a6d80 |
|
BLAKE2b-256 | e40c6f063b61a9163621bf750cd5ea5d3e319abc817c3ca5845e173a8c2d606d |
Hashes for openjij-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f895efb0f6caa63edddb9be1bfafb8534daa67d80146e1bf47b6dfa95050979 |
|
MD5 | 5a4d4d2f8647ab6401fc67ef7aef41ae |
|
BLAKE2b-256 | 6a7115a656511129a20ef281b517930090a7f2de133dfbcad73ef55a83e8b856 |
Hashes for openjij-0.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3448281588bf1ba91910fdd079bec26b657c613c18f43ccc36a455565f742282 |
|
MD5 | 4aa5b158e25085105d035b99dcb0e27e |
|
BLAKE2b-256 | 6c66fca57ff1f24b1a878ff0de04d9e86315bdaccb56eb74682ca9cce372bb99 |
Hashes for openjij-0.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb8f8fa8357fd7ecbc26908c5e693be92c3677963be1ec5b667f30244e9bb463 |
|
MD5 | 15c2e334e15a3cd4551424df0f72a2f4 |
|
BLAKE2b-256 | 6aab1a1957412f110e85096373815ea743487cbd46c68e15d76181390f6a4e75 |
Hashes for openjij-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a0ba7532ce33829f156350a86543b280119d488af3bd88076ddfe8932f3601 |
|
MD5 | e56a7036946c6eb08630f48151cde674 |
|
BLAKE2b-256 | 12b5cca2e8e2c4ac83e2b1ee6fb8344ac3fc334dcb4e96e9f3e4c3f4a569812d |