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.5.tar.gz
(272.8 kB
view hashes)
Built Distributions
openjij-0.3.5-cp39-cp39-win_amd64.whl
(309.9 kB
view hashes)
openjij-0.3.5-cp38-cp38-win_amd64.whl
(309.8 kB
view hashes)
Close
Hashes for openjij-0.3.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 945f766713ec24c57ab039df3aeb8e4683f14311538b6e61ec9ba129a00b12fb |
|
MD5 | 856ad4b01e6e53fc9c968b693ce6f6e0 |
|
BLAKE2b-256 | bab9026ef8a3be7f13ff309f26cef2e0560ab5bf0a58c659d0514cfd9af4bd4e |
Close
Hashes for openjij-0.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034d9b0a9879b61212c49b3f95af5afdf26df3b9d9423d9547efa224120b3239 |
|
MD5 | d9880dcb9b3a9890f992024d60ce96c9 |
|
BLAKE2b-256 | 0efe16a4b0d329972ea732805d328f74f7c5b0bfc95addd18a924ef1f01be389 |
Close
Hashes for openjij-0.3.5-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dd43620bd0fe93c35a75e9ff28f4911d9a27e26f3d53cf6017bbf4480dd2e98 |
|
MD5 | 021591b9970e748c53f2f96ec777b827 |
|
BLAKE2b-256 | 530d1bebd757bc460143a267340047045bd4816a99b1e37d17d762137d1d1393 |
Close
Hashes for openjij-0.3.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d4fb027e9d98f2cee442ea62eb963bcf1e10405cd87fd9400ac15f9a341ab9 |
|
MD5 | 6e77b7679a5fbdd57f5619db2b0837f5 |
|
BLAKE2b-256 | 5917c020d42a2cee107184185185fd357b7bd58c292cff88463fbe35a5f0a135 |
Close
Hashes for openjij-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e7052eb0755bb9c4126db3f1087e8d24dd46a31b9d89bef2e58fe79dfac0fe |
|
MD5 | a38f316e339339c18af6a3cb8bd0ccdb |
|
BLAKE2b-256 | 2c1b108ef223ed5490a38362f412b0578e4edb5d748f05de80a2df7157a1dab9 |
Close
Hashes for openjij-0.3.5-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2282f5fd407556509f3d5b002b2754e4fe85a4c45589ff361acca2b4c072bbb |
|
MD5 | 4d2c0f372157e51d9d90db81bba737ed |
|
BLAKE2b-256 | 749cfcc875c61c63597ea00d1073df92cff82ba101062ecaf3f1255bd1324ad2 |
Close
Hashes for openjij-0.3.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333b95cfe6fe485696b62965b17c18c4b93a4f17f21e94288320703bba6f346c |
|
MD5 | 63d1f325d22c1bb4339562fcec1178f5 |
|
BLAKE2b-256 | 35a6fb10a59e2ea1014ca69e0db7b2742d5c4e81ca13956331a9daad4944be13 |
Close
Hashes for openjij-0.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cf4d94ff4f403b5efb4f0b9cb70bf35d4ab5d9209561e1073bf550cef8454dc |
|
MD5 | 88530a2611bd32f94ae72baba260db35 |
|
BLAKE2b-256 | 26afbe05bad178792558503647016582c1f31d2846e03b11ad0c8acbf1d4c621 |
Close
Hashes for openjij-0.3.5-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9db6d014a43228f13ab6d62b94b84febdad201f89d0ec7e1ab32b674af4f5e1 |
|
MD5 | 6c1a9e60928dbf173aa80b769f4c2633 |
|
BLAKE2b-256 | 7f1897e00f9d13ecb711551c5da7e14da32cc71f6dedf9531be8961470d8a5d9 |