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.0.tar.gz
(273.2 kB
view hashes)
Built Distributions
openjij-0.3.0-cp39-cp39-win_amd64.whl
(310.0 kB
view hashes)
openjij-0.3.0-cp38-cp38-win_amd64.whl
(309.8 kB
view hashes)
Close
Hashes for openjij-0.3.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20070551629c3963687e05c1b7c4c98c274ae3c86313c13b267dd8c5efc37fd5 |
|
MD5 | 7fd90db465106600cb61b6b184187e82 |
|
BLAKE2b-256 | 510245ddc02494b48eb266ed2209bd9ed5c62ecda35d4e67a4fa98a019a31644 |
Close
Hashes for openjij-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d77a87087d57cfc2ee2342fea864882a8a31f2af03ce4e3bb51ed4ab2139783c |
|
MD5 | 14781deb041c51ae6070b3bf901a86e4 |
|
BLAKE2b-256 | 7dea8596a5fd210d60375e119cf1b741cede1602cb40edb0e6e03841364fdee5 |
Close
Hashes for openjij-0.3.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58fc9ea0b6669b92c14d35ce9c185fa6eb77a0b1fb5ec6c6b198b41dbcf06830 |
|
MD5 | ea00986e7c5246efdb326e6b2857d133 |
|
BLAKE2b-256 | 768e410fb042d21bc04b0f8d008986440f4d523e4d335c6d1c8c5522212e1a02 |
Close
Hashes for openjij-0.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66eb604770039dd2aa4e49c27f5997b802efe62f7fe9e79406250ab60ebcfd9f |
|
MD5 | 2183064e0a27ec5562d90913389ca860 |
|
BLAKE2b-256 | c83f606ec41ed9827f617ae877b7d06fb3066c723cc092d9cd18a41813700af2 |
Close
Hashes for openjij-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8936bc8b91ae5e0fbc1f93333ab81233e13f9447f00311ecced73c4aac9d1e0 |
|
MD5 | 866a96e8d2b22e2d0fa0fccaf8bfaef5 |
|
BLAKE2b-256 | 49981369d89536e3af9e9960e73e93533ba0c3fa802322066eb51f6d666e43d7 |
Close
Hashes for openjij-0.3.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdccc015465aafee2e4ed3f5945894594a31b0b20fd7fdb8a1e096f73830f367 |
|
MD5 | 9046a326ec99a7aa92ff064ecd13c904 |
|
BLAKE2b-256 | 3db25297856ebecdf689f6d3e0b0f197a5c408fc5393203916f1964aabebc8e8 |
Close
Hashes for openjij-0.3.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1118eaa33ac8741ce2856016c2d4611f914c56e3fe5836d33d4fd5f1fe04f298 |
|
MD5 | c32b5750f2bb78a8698490a4d224d5d6 |
|
BLAKE2b-256 | d16932cd536a18281808d3bb0ce880c135c362a5415e9dcac6298c4447603e0b |
Close
Hashes for openjij-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0f49d7bea481323259143f61e03634f13ab16588f427d2922199186a10afd9d |
|
MD5 | 11df1b9678757de01b2035d0f8e915a0 |
|
BLAKE2b-256 | 02541ef9dc3b85c1b461af444fb3d6deae83d2bc9b065a7da5f3d70307547acf |
Close
Hashes for openjij-0.3.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 876f439a97ded615727ddaebdfd555a66be7c67101c471124e3fee22e5dd061c |
|
MD5 | 44d4c08da1c59e09c1446f904df1a41c |
|
BLAKE2b-256 | bc03f22e822a5f9646a46e9b7bd2e47fd590c77aaec512109f6796e24c95b1b4 |