Package: openjij
OpenJij : Framework for the Ising model and QUBO.Coverage GraphSunburstGridIciclepython >= 3.8(optional) gcc >= 7.0.0(optional) cmake >= 3.22(optional) NinjaChangeIMPORTOpenJij >= v0.5.0importopenjij.cxxjijOpenJij <= v0.4.9importcxxjijDocumentsC++ Docsinstallinstall via pipNote: (2023/08/09) GPGPU algorithms will no longer be supported.# Binary
$ pip install openjij 
# From Source
$ pip install --no-binary=openjij openjijinstall via pip from source codesTo install OpenJij from source codes, please install CMake first then install OpenJij.cmake setupIf you want to use setup.py instead of PIP, You will need to install CMake>=3.22.We are Highly recommended install CMake via PYPI.$ pip install -U cmakeMake sure the enviroment path for CMake is set correctly.install OpenJij$ pip install --no-binary=openjij openjijinstall from github repository$ git clone git@github.com:OpenJij/OpenJij.git
$ cd openjij
$ python -m pip install -vvv .For ContributorUsepre-commitfor auto chech before git commit..pre-commit-config.yaml# pipx install pre-commit 
# or 
# pip install pre-commit
pre-commit installTestPython$python-mvenv.venv
$..venv/bin/activate
$pipinstallpip-tools$pip-compilesetup.cfg
$pip-compiledev-requirements.in
$pip-syncrequirements.txtdev-requirements.txt
$source.venv/bin/activate
$exportCMAKE_BUILD_TYPE=Debug
$pythonsetup.py--force-cmakeinstall--build-typeDebug-GNinja
$pythonsetup.py--build-typeDebugtest$python-mcoveragehtmlC++$mkdirbuild$cmake-DCMAKE_BUILD_TYPE=Debug-S.-Bbuild
$cmake--buildbuild--parallel
$cdbuild
$./tests/cxxjij_test# Alternatively  Use CTest$ctest--extra-verbose--parallel--schedule-randomNeeds: CMake > 3.22, C++17Format$pip-compileformat-requirements.in
$pip-syncformat-requirements.txt$python-misort$python-mblackAggressive Format$python-misort--force-single-line-imports--verbose./openjij
$python-mautoflake--in-place--recursive--remove-all-unused-imports--ignore-init-module-imports--remove-unused-variables./openjij
$python-mautopep8--in-place--aggressive--aggressive--recursive./openjij
$python-misort./openjij
$python-mblack./openjijLint$pip-compilesetup.cfg
$pip-compiledev-requirements.in
$pip-compilelint-requirements.in
$pip-syncrequirements.txtdev-requirements.txtlint-requirements.txt$python-mflake8
$python-mmypy
$python-mpyrightPython DocumentationUse Juyter Book for build documentation.With KaTeXNeed: Graphviz$pip-compilesetup.cfg
$pip-compilebuild-requirements.in
$pip-compiledoc-requirements.in
$pip-syncrequirements.txtbuild-requirements.txtdoc-requirements.txtPlease place your document todocs/tutorialeither markdown or jupyter notebook style.$pipinstall-vvv.$jupyter-bookbuilddocs--allHow to usePython exampleimportopenjijasojsampler=oj.SASampler()response=sampler.sample_ising(h={0:-1},J={(0,1):-1})response.states# [[1,1]]# with indicesresponse=sampler.sample_ising(h={'a':-1},J={('a','b'):1})[{index:sforindex,sinzip(response.indices,state)}forstateinresponse.states]# [{'b': -1, 'a': 1}]CommunityOpenJij SlackAbout usThis product is maintained by Jij Inc.Please visit our website for more information!https://www.j-ij.com/LicencesCopyright 2023 Jij Inc.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.