Skip to main content

Framework for the Ising model and QUBO

Project description

OpenJij : Framework for the Ising model and QUBO.

build-test

  • 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openjij-0.2.0-cp39-cp39-win_amd64.whl (311.5 kB view details)

Uploaded CPython 3.9Windows x86-64

openjij-0.2.0-cp39-cp39-manylinux2014_x86_64.whl (550.9 kB view details)

Uploaded CPython 3.9

openjij-0.2.0-cp39-cp39-macosx_10_15_x86_64.whl (444.4 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

openjij-0.2.0-cp38-cp38-win_amd64.whl (311.4 kB view details)

Uploaded CPython 3.8Windows x86-64

openjij-0.2.0-cp38-cp38-manylinux2014_x86_64.whl (550.9 kB view details)

Uploaded CPython 3.8

openjij-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl (444.2 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

openjij-0.2.0-cp37-cp37m-win_amd64.whl (306.1 kB view details)

Uploaded CPython 3.7mWindows x86-64

openjij-0.2.0-cp37-cp37m-manylinux2014_x86_64.whl (566.9 kB view details)

Uploaded CPython 3.7m

openjij-0.2.0-cp37-cp37m-macosx_10_15_x86_64.whl (432.7 kB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

Details for the file openjij-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 311.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for openjij-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 066d6b0a5acc8ec1e68d2e5a5359f3dbf78865c14738b165aaddd65672da09bf
MD5 61758cc568ee300de9cb9323d705a3a3
BLAKE2b-256 7bac051edeeefe469f57ff1dc70158019106694f8cce6649ac815e62b9612566

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 550.9 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for openjij-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbce62ae18de6b4df9e7216d91f1bde7874495de13034061f21f2660bdef662f
MD5 2a6bdc736aa0e5d221fbeea96bb28909
BLAKE2b-256 f4f4de8f305c7aa70ab124a679dd7ad20b3ebaf5099b4e9ef6e17a5c6fad1d37

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 444.4 kB
  • Tags: CPython 3.9, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for openjij-0.2.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8b8d761d181864335ee0c4188cdab4696896e8828012ee083d6dee0bfc80e282
MD5 87058bf5494c1b38cc97025722aaedf9
BLAKE2b-256 f2fe72a691096fa41f5de3566feffa31933bbbe1d67ec34822e18562c0e63509

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 311.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for openjij-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9240067d159eef5cf3711203d7cd61f6ef716186f294e4a62f013913e68ea481
MD5 6bdfa396f413f77e10333469780fbbed
BLAKE2b-256 b4a01fe89681395bc6d273d8c50210493de0777adea93147af81aa705e87e9d6

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 550.9 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for openjij-0.2.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 067a268b08a9729cbec91e88beee9cbf5f3bc034e593925f547e8939ba5bbf69
MD5 83b01d53dc1da4fbb4167bf9a378f12a
BLAKE2b-256 e6f496c5e39b2d57b12814735e91676712cfe58ec44c50114b1212f9eb39c731

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 444.2 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for openjij-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ad24b609fa2d92c250a6e88758a2d6ce28666794c83b5ce048a16b8ae15e7e9a
MD5 5282ac568d01e9717ce339d094985aa5
BLAKE2b-256 6b8026fb220991e6e4a2fbac44b9de9286d45f4455947b8de54e52abcdfa97ce

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 306.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for openjij-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2a9c08665f1c2c443c77b5dd5a36f8cc1fc7a3024fefe8e11bd50b077a872436
MD5 355443dcb6018911f26a74d9d1cb5aed
BLAKE2b-256 3a6a2587c971a51f0836e5902032bf3203622008a4b876ec7ee99d66cc0dbff4

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 566.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for openjij-0.2.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 364b58d358567ab2629c1a4b52beaf8c28415485d5c2cbc650b62a66ed4168be
MD5 5f19a1136f535efa0c5e0bd00656cd5a
BLAKE2b-256 f5855335a5681003a72af0fbae97a27bc31d26cb19357cf6f5aa84fd3364d08c

See more details on using hashes here.

File details

Details for the file openjij-0.2.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: openjij-0.2.0-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 432.7 kB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for openjij-0.2.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 997d78fd76a979ca671d7879b3ddc8f4faab929d46958dc35c57bfe22015be53
MD5 c17b4684de87cd7783d22e28a8e134aa
BLAKE2b-256 e4243e57ce903b6cd7304935868f6d17e1aeb4684d98f13a133639198b434cb6

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