Skip to content
OpenJij : Framework for the Ising model and QUBO.
Branch: master
Clone or download
Latest commit d8270f0 May 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/html
examples edit readme Jan 31, 2019
openjij ver 0.0.7 May 23, 2019
src modify HANDLE_ERROR and change seed in gpu May 22, 2019
tests fix test May 23, 2019
.gitignore
.travis.yml remove python2.7 Apr 9, 2019
CMakeLists.txt rename from method to system Apr 28, 2019
Doxyfile add community link May 14, 2019
LICENSE first commit Jan 4, 2019
MANIFEST.in fix pip command Apr 4, 2019
README.md add community and tutorials May 22, 2019
setup.py ver 0.0.7 May 23, 2019

README.md

OpenJij : Framework for the Ising model and QUBO.

Build Status

cmake >= 3.11

install

pip

$ pip install openjij

cmake setup

If you had not installed cmake>=3.11, you need install cmake>=3.11

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 

Install openjij

$ 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}]

Community

You can’t perform that action at this time.