Package: v-quantum-annealing
v_quantum_annealing : Framework for the Ising model and QUBO.Coverage GraphSunburstGridIciclepython >= 3.7(optional) gcc >= 7.0.0(optional) cmake >= 3.22(optional) NinjaChangeIMPORTv_quantum_annealing >= v0.5.0importv_quantum_annealing.cxxvqav_quantum_annealing <= v0.4.9importcxxvqaDocumentsC++ Docsinstallinstall via pipNote: To use GPGPU algorithms, please follow the sectioninstall via pip from source codesbelow.
GPGPU algorithms are automatically enabled once CMake finds CUDA frameworks during installation.# Binary
$ pip install v_quantum_annealing 
# From Source (CUDA)
$ pip install --no-binary=v_quantum_annealing v_quantum_annealinginstall via pip from source codesTo install v_quantum_annealing from source codes, please install CMake first then install v_quantum_annealing.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 v_quantum_annealing$ pip install --no-binary=v_quantum_annealing v_quantum_annealinginstall from github repository$ git clone git@github.com:v_quantum_annealing/v_quantum_annealing.git
$ cd v_quantum_annealing
$ 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/cxxvqa_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./v_quantum_annealing
$python-mautoflake--in-place--recursive--remove-all-unused-imports--ignore-init-module-imports--remove-unused-variables./v_quantum_annealing
$python-mautopep8--in-place--aggressive--aggressive--recursive./v_quantum_annealing
$python-misort./v_quantum_annealing
$python-mblack./v_quantum_annealingLint$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 exampleimportv_quantum_annealingasojsampler=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}]Communityv_quantum_annealing 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.