Skip to main content

Framework for ising model and QUBO

Project description

OpenJij : Framework for the Ising model and QUBO.

Build Status

cmake >= 3.11

Documents : https://openjij.github.io/OpenJij/

install

Notice:
Because current version v.0.0.1 support only the interface of 'cxxjij modules', you have to read header files in src/*

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

from openjij import graph as G   # or import cxxjij.graph as G
from openjij import method as M  # or import cxxjij.method as M
ising = G.Dense(10)
for i in range(10):
    for j in range(i+1, 10):
            ising[i, j] = -1

sa = M.ClassicalIsing(ising)
sa.simulated_annealing(0.01, 10, 100, 10)  # beta_min, beta_max, step_length, step_num
sa.get_spins()
>> [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]

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.0.3.0.tar.gz (40.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page