Skip to main content

Framework for the Ising model and QUBO

Project description

OpenJij : Framework for the Ising model and QUBO.

Build Status

cmake >= 3.12.2

install

pip

$ pip 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 

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

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.10.tar.gz (135.0 kB view details)

Uploaded Source

File details

Details for the file openjij-0.0.10.tar.gz.

File metadata

  • Download URL: openjij-0.0.10.tar.gz
  • Upload date:
  • Size: 135.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.7

File hashes

Hashes for openjij-0.0.10.tar.gz
Algorithm Hash digest
SHA256 70cc4729d5087f77264985dbdbb938b353e84a34d847773878a6a4e2eabe21e4
MD5 9c04f450ec3c12d6c6985a25f154ed28
BLAKE2b-256 3fbb1334cbcd7f2d00976b37e13a0e20d78c801023eded67d4902c7708766ee8

See more details on using hashes here.

Supported by

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