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.2.2.tar.gz
(256.3 kB
view hashes)
Built Distributions
openjij-0.2.2-cp39-cp39-win_amd64.whl
(311.5 kB
view hashes)
openjij-0.2.2-cp38-cp38-win_amd64.whl
(311.4 kB
view hashes)
Close
Hashes for openjij-0.2.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cf691834d68348d70aca110057e974e6c711096a631d7fe66d8f331cc9244c5 |
|
MD5 | 8ba1969a79eb25ebecccc52763643bda |
|
BLAKE2b-256 | 02f7450623d8f50a1196932280b3ace34bc12daf80e84ee64631457fbecb23b9 |
Close
Hashes for openjij-0.2.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e927b7c1e9da94c510ef3960c675e3d632590358bc178b247ebbeea3e36a588a |
|
MD5 | 98f47c3e7d2c5790df514f92933364b3 |
|
BLAKE2b-256 | 0fdf49e1d8846ea74b25902205b82dc75f9fb31ca50baa539a2c6d8606b56f70 |
Close
Hashes for openjij-0.2.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b6c0dbf4ef24c2cdc4a257b25a8e6598f083dc8cb4c7233703d1a6c6fc95757 |
|
MD5 | 31bd4084fdb0d2bc4b4c317a1f7c7e27 |
|
BLAKE2b-256 | 85443a3a9850ffca452d2b0cba4f9496fd1a6ec1b423951ff95c0b7db904facc |
Close
Hashes for openjij-0.2.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1cdadb99280ff74406bbb3bf5f1bee39d413e62f14bfb25ceb2caad888fb81b |
|
MD5 | 9b648e4b368898a6f25c32ab06a25ec9 |
|
BLAKE2b-256 | 0ff610d0ce78b23d37bbb7b510269e61f4ec12447e327fd3c1168996f4f2b2c9 |
Close
Hashes for openjij-0.2.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac2932c3aff3087df03fa2e725bbf775974c2d0b98562702d2946e6fc39d7a1 |
|
MD5 | 089c731f8be4ccbd1c956d2d90ef6f48 |
|
BLAKE2b-256 | 7a87d141913b9665e987dcda67d148cdcb604128158266be01230403cc2dbf21 |
Close
Hashes for openjij-0.2.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b787b36f04f1913410ce02ade5883d053e2488a284b05f75795d1600f7cf151b |
|
MD5 | 9e0a11a02f9b88b80c114c1a4aa42fbf |
|
BLAKE2b-256 | 532d8d1fd163527e46cc40224d4b5b044898fffd2084e9d06c453c39f484f65d |
Close
Hashes for openjij-0.2.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ddf73fb52ba16022b444f262f8a9047451164903e3402ba0ba7bbcfa6a8707f |
|
MD5 | f0d56aa1d4de3801b07082e4ec7e91a5 |
|
BLAKE2b-256 | 2515839ae1ac404def76a64969c57685ee9a83f9d11e1a2849fd525e05af5d4f |
Close
Hashes for openjij-0.2.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 536949ac8347e9696a9e18bbd5f0e76fec01a31989395c43d3d4aad71a313f17 |
|
MD5 | 67b3a66f1b64138c70619d54f8a113d8 |
|
BLAKE2b-256 | dba6d564b1b1efdbb2dbedc96560ec9f72998b31707b7dc235911f431e2dd967 |
Close
Hashes for openjij-0.2.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9774ae3059ded1fc08c9d3d6bb660e82091925869545ca2d0687a1856aaa01 |
|
MD5 | 72604f8aaec510ceafc43d457e05859d |
|
BLAKE2b-256 | 8b98ee459ed970d1cf32471920667e74638ff34cb0ab87204fec0d6a08517444 |