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 Distribution

openjij-0.3.3.tar.gz (273.1 kB view details)

Uploaded Source

Built Distributions

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

openjij-0.3.3-cp39-cp39-win_amd64.whl (310.1 kB view details)

Uploaded CPython 3.9Windows x86-64

openjij-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (561.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

openjij-0.3.3-cp39-cp39-macosx_10_15_x86_64.whl (463.8 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

openjij-0.3.3-cp38-cp38-win_amd64.whl (309.9 kB view details)

Uploaded CPython 3.8Windows x86-64

openjij-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (562.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

openjij-0.3.3-cp38-cp38-macosx_10_15_x86_64.whl (463.6 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

openjij-0.3.3-cp37-cp37m-win_amd64.whl (305.5 kB view details)

Uploaded CPython 3.7mWindows x86-64

openjij-0.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (575.2 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

openjij-0.3.3-cp37-cp37m-macosx_10_15_x86_64.whl (450.1 kB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: openjij-0.3.3.tar.gz
  • Upload date:
  • Size: 273.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for openjij-0.3.3.tar.gz
Algorithm Hash digest
SHA256 856a5a55869be3430a624b477ff87a0159391cc2495f7fde958bd829f16a669c
MD5 72d8ae7c525d99b1769d38a569c5ff76
BLAKE2b-256 996b62fa7f01162fc31a8706a4f3453444000155db0ee71e96f2937ea67621e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openjij-0.3.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0f0bbea23cc06f50ba07d1f66a929368656aefe185faee0ddeb7633082a9d0b7
MD5 3d0cacf5c9ab451305880d659e676a0d
BLAKE2b-256 a1191ed8c0eaf3fe74d171e4d83e31cd5ec9689d0e6fe54b86e14037060acd37

See more details on using hashes here.

File details

Details for the file openjij-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for openjij-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be1dfbfca9436ae4a3b908129ef96086c055b2b50edbe92acbfecaa166be072c
MD5 340b578e0b0500b01ffe2aa7e7ccb8a2
BLAKE2b-256 6d80975a07a6e1fffe9feab8b0b2de7b4483199d2af6f984f6d86e2d256660e3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openjij-0.3.3-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8e215aeca02fe147e048b8de702774edd988a1f5a2c93646b4aee953140b0291
MD5 7d5dc903319b7fb0aabad3e21abfbe3b
BLAKE2b-256 fa086139ac75e57f4b318232cc63da069d27f5e661d3a3fd708002da958108d5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openjij-0.3.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9e8b609cebdf13ecf82dcaea5d4e56d982552bb73800aee253f76af3ff05587d
MD5 9f1a5cf2f7c5bcffb4ad9def50e112bc
BLAKE2b-256 3b5fe52ab6c830b810b662dd1535bb3d27138590d10f0e57438b6377a367895f

See more details on using hashes here.

File details

Details for the file openjij-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for openjij-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b3de77ae656e21797fe1c9698ab726f2d383171eff694b9e0c99e6791b18e48
MD5 c1dfb7cd1dd5501113d5855a769d39df
BLAKE2b-256 b444be5dfa840c30c6c280fec3555ebe372f91b64ea1f3218bed3e399eddbdff

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openjij-0.3.3-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6b97a0c0ef6faf7f7dc53ae200355f3c217e788183ebdc6cf30bb13a81c2dc20
MD5 026603b79e9fd95c6b58d81a00ee765b
BLAKE2b-256 2156bddfe70bec33714a3b8ae2b54b8a46a5f02d049b44f7989995b8290135ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openjij-0.3.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 305.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 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.3.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6f26a478572f5b56a54b5f9c5135799fc63d6c76de88607ec914e2d061e1047b
MD5 33f043dc210a218ab958e685246c141e
BLAKE2b-256 cc83b71c5c5cd918ab0423b2088860d9e08f91ad2943691c55d64e58aa4401a3

See more details on using hashes here.

File details

Details for the file openjij-0.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for openjij-0.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19e050affb2f8260b5ecedb2e3614d7527ef5cd7df661e2a828e3efb49c20cf1
MD5 c5b8978785a8406deedeafafbb388906
BLAKE2b-256 1344023dba198fa0d5177607dd10376b5e9b647e381f01e33221e6a3a24150d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openjij-0.3.3-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 450.1 kB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 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.3.3-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2cdf78bbdb164e0dbef07f19eec0ed288d4ae046b12edafea0a053c776d0d23b
MD5 0e60af49b58d73153c6e1a8e23779387
BLAKE2b-256 0528377de79ef045345a4c07753e53b2359fc83137550b16fa246b4b3c4ecbe4

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