Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Framework for the Ising model and QUBO

Project description

OpenJij : Framework for the Ising model and QUBO.

Build Status

cmake >= 3.11



$ pip install openjij

cmake setup

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


$ brew install cmake


# if you installed old version by apt-get
$ apt-get purge cmake

# install cmake 
$ wget
$ tar xvf cmake-3.13.2.tar.gz
$ cd cmake-3.13.2
$ ./bootstrap && make && sudo make install 

Install openjij

$ git clone
$ cd openjij
$ python install

How to use

Python example

import openjij as oj
sampler = oj.SASampler()
response = sampler.sample_ising(h={0: -1}, J={(0,1): -1})
# [[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}]


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for openjij, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size openjij- (91.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page