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.4.tar.gz
(273.1 kB
view hashes)
Built Distributions
openjij-0.3.4-cp39-cp39-win_amd64.whl
(309.8 kB
view hashes)
openjij-0.3.4-cp38-cp38-win_amd64.whl
(309.7 kB
view hashes)
Close
Hashes for openjij-0.3.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7bc4e5ec6a3bc9a280f4f537f69e1acfe3d1e9b9ce2003791a68744eaa72b94 |
|
MD5 | 0f391868e1feb22e514a2f3b0b7e556b |
|
BLAKE2b-256 | 953e6fb62e3b638230770105024fd906d724de5a28320c5ae01f561e90b122c0 |
Close
Hashes for openjij-0.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 511f3e948e141c985f610e07337b6057334d198dc9067eff46f34fba60c4b9a2 |
|
MD5 | 3a06e9ff74c1712b989758125a659112 |
|
BLAKE2b-256 | a29c999e929b08fbe18ae176949f1b1f99d50d0e3f179f6a0138dbed44f37c15 |
Close
Hashes for openjij-0.3.4-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f17d2b7b3c64ae686e5712cd253a2f700e27934b2abc47889034b7135fbd9435 |
|
MD5 | b428ca4873b02fc8fea8e6d12e3043d5 |
|
BLAKE2b-256 | c4801619df8c45432fc9393a272f8ea64e77dd2d8085c77a6cd5385c95d2c817 |
Close
Hashes for openjij-0.3.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3176e27a24400dd353b8200654c324c6f2d28d3597f30ea1c0b018dbc53e236 |
|
MD5 | ee6b72b36a72e68d2f5ce77d205db0d9 |
|
BLAKE2b-256 | d23007a7d988a7d6832f7476c6b54f3be4d6db00ed18862f2bbe638bbb0aa7ea |
Close
Hashes for openjij-0.3.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5674b7dd9fba6e51f93ae0614c92571356178a71b45cd66a2d1356e2f9b02956 |
|
MD5 | 09350045707bcc728b9d81c1a4038916 |
|
BLAKE2b-256 | 077b465a018ff07e2ff864004bd59f4501cc4430b5bbfab9f80c9c84c8cd18f2 |
Close
Hashes for openjij-0.3.4-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b5699da6e02ab3943d8fb3ee70d831fd86a9f6899bbcda65673d1d625bffa5 |
|
MD5 | d48d685f05791116872114bd5e0bc86d |
|
BLAKE2b-256 | 1a4fd232922ccb38db75e4096f8548c0f59374d729f3aa60da4f71e906fa9f1c |
Close
Hashes for openjij-0.3.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64d8f4fc7ae769cbfc5597cdb6f2c77c8780dbbb0e1bf5616eb6360a48141ff3 |
|
MD5 | dd3d30709cd5c9eb74c8d1b7fa7d3976 |
|
BLAKE2b-256 | cc44292726cd403628a926f4240907e788f03a860779129ba626faf77b99ef89 |
Close
Hashes for openjij-0.3.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62feea669d7a71848820e93310a1f8b5ca1e1a27841e2393245f39501ba2194a |
|
MD5 | a3a32c07c81262ae2367a7b6ad40b415 |
|
BLAKE2b-256 | 7588128c661b99693584c3a061b7feb882699ef84e9625cbc047b5b32e7034a5 |
Close
Hashes for openjij-0.3.4-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe3ed95116c070d7843749c6ac4ad79c29076f13b726e78611261220281eb2d8 |
|
MD5 | 6e629eee06883b067be48e089a95cf84 |
|
BLAKE2b-256 | 68954a999f26fc16a85bf40c549c6e0ed9d5ec58608afd00fdc47caa5d882900 |