Framework for the Ising model and QUBO
Project description
OpenJij : Framework for the Ising model and QUBO.
- 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.2.tar.gz
(273.2 kB
view hashes)
Built Distributions
openjij-0.3.2-cp38-cp38-win_amd64.whl
(309.9 kB
view hashes)
Close
Hashes for openjij-0.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2459b5a9aa9cd7a51a60d59f3df73419006e1669e937222818d7daebd0e0f37 |
|
MD5 | 539e809c51514230825226b7ae0ea217 |
|
BLAKE2b-256 | 3c2f28a23fd2ebc348e9078074de49e871db8534f765ac8ef81cec1aa9b7c05a |
Close
Hashes for openjij-0.3.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e6a61adb68cfbb57304e89cd9ca1a57e73a8ad6d0c5505c1498a2132f00b635 |
|
MD5 | 1aa25e6db0feaac3a53dc9797fd06ec1 |
|
BLAKE2b-256 | 7874cd7d935453212bd799493573ffa7b2115cc2ce8240b3f499683c36f7e7cb |
Close
Hashes for openjij-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 452902b97e7d38735d50082150ba9de29453b21d769bc33d51230b993b4b63cf |
|
MD5 | a029faad0dbf7582fd5e171ebe197589 |
|
BLAKE2b-256 | 4e1cc58de3947e1342299e21a27edb1066a3956442e4ea5c7b56f0f38cb19b12 |
Close
Hashes for openjij-0.3.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 623377252c01c980bc1adc2d93b821330c9c6348d7e220ad949b51f9c534b93e |
|
MD5 | 194db317df03f1d564489d40c5b7f09b |
|
BLAKE2b-256 | 41e5772bfbc53d4950e0026fc34e910095cbc55d2d5688d75d0307b1ad15a6bf |
Close
Hashes for openjij-0.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b628364bed044f068b34670936933ec9398ddd090b2bab51411194b5512e999 |
|
MD5 | c5c45496328846a67789ce04e97aa61a |
|
BLAKE2b-256 | dbef4c9859afee1348966ae5e8e95c869602d1c29d395b2dbe710aaef2ad6f16 |