Framework for the Ising model and QUBO
Project description
OpenJij : Framework for the Ising model and QUBO.
- python >= 3.6
- (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.1.1.tar.gz
(233.7 kB
view hashes)
Built Distributions
Close
Hashes for openjij-0.1.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0474fa7f283db602088a33bec7524c854581194b67e237981e77d560fbece30b |
|
MD5 | 254ded4b9d557069eea455ff941a2c0a |
|
BLAKE2b-256 | 7bcfa929a0df6901a767bbbebaf2dca1f1bcb314ec5d29af27dd68cb17ba38b3 |
Close
Hashes for openjij-0.1.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6d081be6258c5e08612789fe4e95ff2855b9d026f3b762ef095037ffd353e18 |
|
MD5 | 839b45d7eb9b2555fb02d3d85d62d1c5 |
|
BLAKE2b-256 | 270ff2bb0f2d26cf5aabfa6af893a48a8d0c9afc91ce554dc589ca7fa405e3cc |
Close
Hashes for openjij-0.1.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f066278f7d9ca46ce5eded85741d7fd218d41ddc93517e7436011527ecb8f11 |
|
MD5 | 2242c95b95ae55829022d98c365eca9c |
|
BLAKE2b-256 | 6b3036b24729f391b79e8fcffa9b6032011cab76f2ef31ffcd2d67226d617ac2 |
Close
Hashes for openjij-0.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d544b07678eecc4d09b7e7653271b80df9fe2d9e17d669138e31a313107e363 |
|
MD5 | 59e17c00914f3c244ce241918e75cdf5 |
|
BLAKE2b-256 | 2d5a2a36133b0a1c443c53f18e24cd6044e3e37afcc5d92cd929c3dd5e3f9578 |
Close
Hashes for openjij-0.1.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05465b40c95119d0183903dae37fff3477e33d8d852a0bf09ca1da62191bf3ad |
|
MD5 | 6edddd8bd2c3610c8ed4f0c42e215e42 |
|
BLAKE2b-256 | 1b247cf1c2a2bc8165e88d2a9d6a4e852463b2d9681b5e85fedfe88ab3db898a |
Close
Hashes for openjij-0.1.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a890384ec8d3f875efad2409b52259a12b0946c9412d6e6b90993d669cd21ff8 |
|
MD5 | ad4c63d41b27cd6561ef5592167d55fe |
|
BLAKE2b-256 | 7cd88d76fce8c3933f9cb9e626c4b14e7bc26b34841c47e3a1238797ad6c7765 |
Close
Hashes for openjij-0.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e7d7c42490c2612337d5eaed05a3b5982c81fc6f53d545b3aa3b569cdf0613 |
|
MD5 | 78c75067dfe28c5b608c414bcc74e544 |
|
BLAKE2b-256 | 532694a2cb09d004410fa694baacd0bfecee6ce292dd1bc43ccdba6473e8a534 |
Close
Hashes for openjij-0.1.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0bae59a3ec46d48a7c59dc6f0a3d48cb339f9fad2b8ab3fe4cdd1c4607a6673 |
|
MD5 | af626dd367df1933d0bf859abe63d018 |
|
BLAKE2b-256 | 50761bbf5dbb4f4a30dff6743745b424017d10cd0c315c974a9c365eece81f66 |
Close
Hashes for openjij-0.1.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4acb7f31fc19ef051e8e9762c259284c586247dd71b3c7406091dbc587b744b9 |
|
MD5 | fd7a6f64677995f04b65b9d404b28c57 |
|
BLAKE2b-256 | 5f8d6f0ec711cd5ba035b6aaffe7aacd46c95bb73373fce5a88b6ac11d3f9d28 |
Close
Hashes for openjij-0.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82a0e370c3dab7bf11776be70ad6a9839e5ec3fc99ca090d1986c1c2f1569ab |
|
MD5 | 074f946446fe316273a61166c90c2352 |
|
BLAKE2b-256 | e3efb4bd5be77d6db59a1f89ad1f31a25d31e67785800e221c798c500020aab3 |
Close
Hashes for openjij-0.1.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb4cf4dc3e3ccb065a2e26d7a2b5b521629a3d909f0c3fcb7c70510f665c5ae6 |
|
MD5 | c8172a48ca9c8fb034eda673269b8b4b |
|
BLAKE2b-256 | 27645e6246abb9ef32cb85a03b8fb5b16571eaf8904a49dc41313169e525799a |
Close
Hashes for openjij-0.1.1-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6453b8982d1f1362e4f908ecd642bd9a2479170fe4bd9e8e41620203f1e973c8 |
|
MD5 | e8423816bed11caf837b1eb22224a696 |
|
BLAKE2b-256 | e884372cfadbe31a8557e3a007e8c902f04a55ceb35adfbca39053ec214c82b9 |
Close
Hashes for openjij-0.1.1-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f09cb7ef288ddb6a77fdc9379170cc51e2bcec098f970211a6a389a1d92c91 |
|
MD5 | 235a8cedfb071aebaa8e78acacf39345 |
|
BLAKE2b-256 | d28ad4e95e8f171cb32a9e2982f5b317493d90d2b165281b30d91586db11cf6b |