[PYTHON] Read "Basics of Quantum Annealing" Day 5

Read "Basics of Quantum Annealing" Hidetoshi Nishimori, Masayuki Ozeki, Kyoritsu Shuppan, 2018 4184JBeEEZL.SX350_BO1,204,203,200.jpg https://qiita.com/kaizen_nagoya/items/29580dc526e142cb64e9

"Basics of Quantum Annie Ring" Errata (written by Hidetoshi Nishimori and Masayuki Ozeki) Updated on June 20, 2019 https://www.kyoritsu-pub.co.jp/app/file/goods_contents/3037.pdf

Quantum Annealing Mathematics Hidetoshi Nishimori, Department of Condensed Matter Physics, Graduate School of Science and Engineering, Tokyo Institute of Technology https://repository.kulib.kyoto-u.ac.jp/dspace/bitstream/2433/189516/1/bussei_el_033203.pdf

The book is 1 Quantum mechanics 2 Thermodynamics, statistical mechanics Polite for those who know

Here, the materials are organized on the assumption that neither is known.

Day 1 of reading "Basics of Quantum Annealing" https://qiita.com/kaizen_nagoya/items/2bc284faaf0f61278778

Day 2 of reading "Basics of Quantum Annealing" https://qiita.com/kaizen_nagoya/items/749043f4f8ae026ec5e5

Read "Basics of Quantum Annealing" Day 3 https://qiita.com/kaizen_nagoya/items/3f3d67d841075e8c867a

Read "Basics of Quantum Annealing" Day 4 https://qiita.com/kaizen_nagoya/items/a75e954194de820637a3

Quantum Computer: Three Ways to Get to Quantum Mechanics https://qiita.com/kaizen_nagoya/items/cfc35e62c81a978cc2fc

Seven Ways for Programmers to Study Quantum Mechanics https://qiita.com/kaizen_nagoya/items/7061f62b3629eee395f2

Spinglass theory and information statistical dynamics Hidetoshi Nishimori References https://qiita.com/kaizen_nagoya/items/702c08becfcca98fa9d8 p.183

Simulated annealing (simulated annealing) is a method of numerically realizing this process on a computer to approximately obtain the solution of the optimized space. If you slowly lower T over an infinite amount of time, you will actually reach optimization, but in reality, you will lower the temperature at a moderate speed and stop at an appropriate point. In this sense, it is an approximate solution method.

Chapter 9

Quantum Monte Carlo method

Recent Developments of Quantum Monte Carlo Method Kenji Harada, Graduate School of Informatics, Kyoto University https://www-np.acs.i.kyoto-u.ac.jp/~harada/misc/qmc.pdf

Markov chain

Markov chain basics and Kolmogorov equation https://mathtrain.jp/markovchain

Basics of Stochastic Process-Markov Chain-2016/4/25 Startup Seminar Department of Civil Engineering Transportation Research B4 Midori Maeda The University of Tokyo http://bin.t.u-tokyo.ac.jp/startup16/file/2-2.pdf

Gibbs Boltzmann distribution

  1. Thermodynamics and statistical mechanics of materials Kagoshima University http://www.mech.kagoshima-u.ac.jp/~nakamura/bussei/thermo-statistics.pdf

Entropy and Gibbs Canonical Ensemble https://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/2005/NewMaterialDesign/Statistics.pdf

Statistical Thermodynamics Lecture 9th Contact: Nobuhiro Nishino Room A3-012 Hiroshima University https://home.hiroshima-u.ac.jp/nishino/2010/toukei/toukei_9.pdf

Metropolis method

Front of Monte Carlo method — How to roll and integrate — Koji Fukushima, University of Tokyo https://www.smapip.is.tohoku.ac.jp/~smapip/2003/tutorial/presentation/koji-hukushima.pdf

Bayesian Statistics Theory and Method 5.1 Markov Chain Monte Carlo Method Koya Ohashi, Department of Mathematical and Computational Science, Faculty of Information Science and Technology, Tokyo Institute of Technology http://watanabe-www.math.dis.titech.ac.jp/~kohashi/document/bayes_51.pdf

Hot bath method

Special Lecture on Physics Yukito Iba Institute of Statistical Mathematics, Research Organization of Information and Systems (Tokyo Institute of Technology) https://www.ism.ac.jp/~iba/kougi_2006_ism/c20061.pdf

simulated annealing

Simulated Annealing method for combinatorial optimization problems http://www.orsj.or.jp/~archive/pdf/bul/Vol.31_01_043.pdf

Intellectual System Design Laboratory SA Program Creation and Parameter Review Kengo Yoshii Doshisha University http://mikilab.doshisha.ac.jp/dia/monthly/monthly04/20040524/yoshii.pdf

Neighborhood Parallel Simulated Annealing in Continuous Optimization Problems Doshisha University Faculty of Engineering Department of Knowledge Engineering Graduation thesis March 2003 Student ID number 990064 Intellectual System Design Laboratory Masataka Oikawa http://isw3.naist.jp/IS/Bio-Info-Unit/gogroup/masata-o/PDF/graduation_thesis.pdf

Spectral Gap for Markov Chain and its Application to Simulated Annealing Chiyonobu Laboratory Daiki Hatta https://sci-tech.ksc.kwansei.ac.jp/~chiyonobu/gseminar/hatta.pdf

Basics of Adaptive Simulated Annealing Hiroki Hirao, Doshisha University http://mikilab.doshisha.ac.jp/dia/monthly/monthly07/20070523/hirao.pdf

Reverse temperature

p.85 Probability of temperature exchange in marginal likelihood calculation Sumio Watanabe Tokyo Institute of Technology http://watanabe-www.math.dis.titech.ac.jp/users/swatanab/exchange_free_energy.pdf

Calculate WBIC from a sample of posterior distribution with inverse temperature 1 http://statmodeling.hatenablog.com/entry/WBIC-approximation

I tried using PFN's Optuna in the inverse temperature parameter optimization of D-Wave's quantum Boltzmann machine. https://qiita.com/YuichiroMinato/items/25232450d2c22d1c2fe9

Estimating the minimum number of samples required for Bayesian learning Estimating a minimum required sample size for Bayesian learning Satoru Tokuda Kenji Nagata Masato Okada https://www.ai-gakkai.or.jp/jsai2015/webprogram/2015/pdf/2F1-5in.pdf

Imaginary time

Introduction to Path Integral-Path Integral in Imaginary-Time as Well- (Introduction to Path Integral-Path Integral in Imaginary-Time as Well-) Takashi Ichinose http://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/1723-01.pdf

Chapter 17 Path Integral Method The University of Tokyo https://ocw.kyoto-u.ac.jp/ja/graduate-school-of-science-jp/course-chemical-statics/pdf/lect13.pdf

Quantum mechanics by path integral and geometric topology in condensed matter physics (Comprehensive subject "Physics and Mathematics 3") Yasuhiro Hatsugai, Graduate School of Engineering, The University of Tokyo 1 http://rhodia.ph.tsukuba.ac.jp/~hatsugai/modules/pico/PDF/lectures/Hatsugai-Geom.pdf

Path integral display part 1: 1 In the case of particles Yuki Nagai The University of Tokyo http://park.itc.u-tokyo.ac.jp/kato-yusuke-lab/nagai/note_071025_path.pdf

sinh https://www.geisya.or.jp/~mwm48961/electro/hyperbolic_fun1.htm

An important official summary of hyperbolic functions https://mathtrain.jp/hyperbolic

Introduction to the world of hyperbolic functions Shinji Akimatsu http://haikara-city.com/wp-content/uploads/2017/09/hyp_world2.pdf

Non-commutative

p.89 Let's take a peek into the non-commutative world University of Tsukuba Mathematics Mitsuo Hoshino https://nc.math.tsukuba.ac.jp/?action=cabinet_action_main_download&block_id=282&room_id=80&cabinet_id=1&file_id=9&upload_id=225

The world of quantum space — Let's solve non-commutative equations — Mori Ide Shizuoka University Faculty of Science Department of Mathematics November 26, 2015 (Thursday) https://www.sci.shizuoka.ac.jp/sciencecafe/news/20151126_02.pdf

Chapter 10

Boltzmann machine learning

Statistical Machine Learning Theory and Boltzmann Machine Learning Muneki Yasuda, Graduate School of Science and Engineering, Yamagata University https://www.r-ccs.riken.jp/labs/cms/workshop/20170322/presentation/yasuda.pdf

A collection of techniques for Boltzmann machine learning with D-Wave https://qiita.com/piyo7/items/c8f21b86f1b17dc42df3

Use the machine learning function "Boltzmann machine" to tackle the difficult problem of quantum many-body system https://academist-cf.com/journal/?p=10216

Gradient method

Variational algorithms and machine learning using quantum computers https://www.jps.or.jp/books/gakkaishi/2019/09/74-09seriesAIphys1.pdf

A new era of machine learning and computing technology pioneered by quantum annealing Department of Applied Information Science, Graduate School of Information Science, Tohoku University * Masayuki Ozeki http://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/2059-02.pdf

Convergent gradient method in quantum large-scale eigenvalue problems https://www.jstage.jst.go.jp/article/jsces/2006/0/2006_0_20060027/_pdf

Contrastive divergence(CD)

Contrastive divergence law and its surroundings Contrastive Divergence and Related Topics Shinichi Maeda Graduate School of Informatics, Kyoto University https://jsai.ixsq.nii.ac.jp/ej/index.php?action=pages_view_main&active_action=repository_action_common_download&item_id=1664&item_no=1&attribute_id=22&file_no=1&page_id=13&block_id=23

Equilibrium point analysis of Contrastive Divergence learning in continuous value RBM New area of the University of Tokyo A RIKEN BSIB Ryo Karakida A, Masato Okada A, B, Shunichi Amari B https://www.jstage.jst.go.jp/article/jpsgaiyo/70.1/0/70.1_2992/_pdf

Contrastive Divergence Law A blog that may end suddenly http://mkprob.hatenablog.com/entry/2014/07/20/034311

persistent contrastive divergence(PCD)

KL information amount

Kullback-Leibler Commentary on the amount of information Gen Kuroki Tohoku University http://www.math.tohoku.ac.jp/~kuroki/LaTeX/20160616KullbackLeibler/20160616KullbackLeibler-0.2.1.pdf

KL divergence between normal distributions https://qiita.com/ceptree/items/9a473b5163d5655420e8

Understand Kullback-Leibler spoken in generative models https://qiita.com/TomokIshii/items/b9a11c19bd5c36ad0287

QBoost(D-WAVE)

Dictionary learning

Dictionary learning algorithm Shosuke Kabashima (Tokyo Institute of Technology), Ayaka Sakata (The Institute of Statistical Mathematics) https://www.ieice.org/ess/sita/forum/article/2015/201512081915.pdf

Pattern discovery from big data by dictionary learning University of Tsukuba Taro Tezuka https://www.jstage.jst.go.jp/article/cicsj/32/4/32_76/_pdf

Dictionary learning algorithm https://qiita.com/kibo35/items/67dedba4ea464cc494b0

Proximal Gradient Method Application Part 1-Super-resolution from sparse coding and dictionary learning- http://yamagensakam.hatenablog.com/entry/2018/04/12/074955

Log-likelihood function

Chapter 10 How to Find the Estimator Osaka University http://www2.econ.osaka-u.ac.jp/~tanizaki/class/2018/basic_econome/04.pdf

Maximum likelihood estimation of log-likelihood function https://stats.biopapyrus.jp/glm/mle.html

Meaning and specific examples of parameter estimation by maximum likelihood method https://mathtrain.jp/mle

Chimera graph

Chimera graph https://qard.is.tohoku.ac.jp/T-Wave/?glossary=キメラグラフ

Graph mapping https://quantum.fixstars.com/introduction_to_quantum_computer/quantum_annealing/programming/graph_mapping/

Quantum artificial brain ~ Coherent Ising Machine for Solving Combination Optimization Problems Kiyoshi Utsunomiya, National Institute of Informatics https://www.jst.go.jp/impact/hp_yamamoto/symposium/pdf/project2_material_3.pdf

About Fujitsu's HPC Initiatives FUJITSU'S LATEST ACTIVITIES IN HPC DEVELOPMENT Yutaka Miyahara http://www.ee.utsunomiya-u.ac.jp/~kawatalab/pse/workshop/j2018/papers/02_0930.pdf

Quench (quenching)

p.107

https://www.keyence.co.jp/ss/products/recorder/heat/basics/type.jsp

What is a quantum quench? https://www.quora.com/What-is-a-quantum-quench

Condensed Matter Physics Special Lecture What is an artificial atom quantum dot? University of Tsukuba Physics Yasuaki Masumoto https://www.px.tsukuba.ac.jp/~ikezawa/lab/chibadai.pdf

Topological quantum strategy ~ Device innovation brought about by new developments in quantum mechanics ~ https://www.jst.go.jp/crds/pdf/2016/SP/CRDS-FY2016-SP-02.pdf

Partition function

§4 Basics of statistical mechanics

http://phys.sci.hokudai.ac.jp/~kita/StatisticalMechanicsI/Stat4.pdf

Partition function and thermodynamic function of canonical distribution https://nagoya.repo.nii.ac.jp/index.php?action=pages_view_main&active_action=repository_action_common_download&item_id=14201&item_no=1&attribute_id=17&file_no=10&page_id=28&block_id=27

Quantum statistical mechanics Sophia University Faculty of Science and Engineering Tomi Otsuki http://www.ph.sophia.ac.jp/~tomi/kougi_note/stat_phys.pdf

trace

Proof of partition function and trace relationship Z = Tr (exp (-βH)) = Σexp (-βEk) https://batapara.com/archives/19115592.html/

Principle of statistical mechanics http://rhodia.ph.tsukuba.ac.jp/~hatsugai/modules/pico/PDF/lectures/stat.pdf

Partition function, density matrix, classical correspondence http://www7b.biglobe.ne.jp/~fortran/education/partitionfn.pdf

Restricted Boltzmann Machine: RBM

Limited Boltzmann machine https://quantum.fixstars.com/introduction_to_quantum_computer/quantum_computer_research/restricted_boltzmann_machine/

Limited Boltzmann Machine Beginner's Guide POSTD https://postd.cc/a-beginners-guide-to-restricted-boltzmann-machines/

Derivation of restricted Boltzmann machine (RBM) (1) http://aidiary.hatenablog.com/entry/20160316/1458129923

Deep Boltzmann machine

[With simple explanation] Scratch implementation of deep Boltzmann machine with Python ① https://qiita.com/yutaitatsu/items/a9478841357b10789514

High-performance mean-field approximation algorithm for deep Boltzmann machines Chako Takahashi Muneki Yasuda Yamagata University https://ipsj.ixsq.nii.ac.jp/ej/index.php?action=pages_view_main&active_action=repository_action_common_download&item_id=180684&item_no=1&attribute_id=1&file_no=1&page_id=13&block_id=8

Statistical Machine Learning Theory and Boltzmann Machine Learning https://www.r-ccs.riken.jp/labs/cms/workshop/20170322/presentation/yasuda.pdf

Helmholtz machine learning

Machine Learning-Machine Learning-Helmholtz Machine Implementation [Completed] https://codeday.me/jp/qa/20190707/1196714.html

Generative Model Deep Learning PFI Seminar Seiya Tokui https://www.slideshare.net/beam2d/learning-generator

Examination of AdaBoost using SVM as a weak classifier Kobe University Hiroyoshi Matsuda Tetsuya Takiguchi Yasuo Ariki https://pdfs.semanticscholar.org/bf51/de439089be83481f7382f3e2c16a8f00ac80.pdf

I tried various weak learners of AdaBoost https://qiita.com/antimon2/items/8761cea58f498e4ff74b

Identifyer

Weak classifier

Special Lecture on Pattern Recognition ~ Boosting from the Viewpoint of Researchers ~ 2011.10.04 Takatsugu Makita @ National Institute of Advanced Industrial Science and Technology http://www.kameda-lab.org/lecture/2011-tsukubagrad-PRML/20111004_AIST_Makita.pdf

Nonnegative constraint matrix factorization

Nonnegative / binary matrix factorization with a D-Wave quantum annealer by Daniel O'Malley, et al. (2017) https://qard.is.tohoku.ac.jp/T-Wave/?p=397

Nonnegative matrix factorization Kameoka Hirokazu http://www.kecl.ntt.co.jp/people/kameoka.hirokazu/publications/Kameoka2012SICE09published.pdf

With complex matrix factorization under non-negative constraints Its application to social media analysis Takashi Takeuchi 1, a) Katsuhiko Ishiguro 1, b) Shogo Kimura 1, c) Hiroshi Sawada 2, d) https://ipsj.ixsq.nii.ac.jp/ej/index.php?action=pages_view_main&active_action=repository_action_common_download&item_id=99709&item_no=1&attribute_id=1&file_no=1&page_id=13&block_id=8

Experience average

Statistical power of intellectual information processing-Let's start machine learning-Masayuki Ozeki Department of Systems Science, Graduate School of Informatics, Kyoto University http://www-adsys.sys.i.kyoto-u.ac.jp/mohzeki/summer2016.pdf

Experience AIC, WAIC, WBIC http://rstudio-pubs-static.s3.amazonaws.com/451984_464393c3da5d4f7aa94b7ca4d6cfcf3a.html

p.101 Experience distribution

Ensemble learning

Ensemble learning Osamu Ueda † https://ipsj.ixsq.nii.ac.jp/ej/index.php?action=pages_view_main&active_action=repository_action_common_download&item_id=18021&item_no=1&attribute_id=1&file_no=1&page_id=13&block_id=8

[Introduction] Two typical methods and algorithms for ensemble learning https://spjai.com/ensemble-learning/

Are all advanced machine learning users using it? !! I will explain the mechanism of ensemble learning and the three types https://www.codexa.net/what-is-ensemble-learning/

Ensemble learning-The wisdom of Manjushri if three people come together-Let's make a lot of models and improve the estimation performance! https://datachemeng.com/ensemblelearning/

Ensemble learning framework https://jp.mathworks.com/help/stats/framework-for-ensemble-learning.html

Avoid overfitting: dropout

Tunnel effect

Freezing phenomenon

Strategic Creative Research Promotion Project CREST Research area "Creation of new technology aiming at realization of quantum information processing system" Research subject "Elucidation and control of quantum many-body cooperation phenomenon" Research completion report Research period October 2005-March 2011 Principal Investigator: Seiji Miyashita (Professor, Graduate School of Science, The University of Tokyo) https://www.jst.go.jp/kisoken/crest/report/sh_heisei17/ryoushi/04miyashita.pdf

Combination optimization problem and quantum annealing: theory and performance evaluation of quantum adiabatic development Tadashi Suzuki, Kyoto University https://repository.kulib.kyoto-u.ac.jp/dspace/bitstream/2433/142655/1/KJ00004982313.pdf

Quantum annealing method https://quantum.fixstars.com/introduction_to_quantum_computer/quantum_annealing/

Combinatorial optimization by quantum annealing Masayuki Ozeki http://www.orsj.or.jp/archive2/or63-6/or63_6_326.pdf

This article describes the weaknesses of D-Wave devices.

Outline and basics of quantum computation given to Freshman-Focusing on the concept of quantum computation and the image of quantum gates- Shigeo Kotake http://www.eng.mie-u.ac.jp/research/activities/30/30_13.pdf

Quantum mystery "Don't listen beyond" https://www.tel.co.jp/museum/magazine/017/lab01/02.html

Deep belief net

Deep Learning Technology and Signal Processing / Communication Algorithms-Overview and Prospects- Nagoya Institute of Technology Tadashi Wadayama https://www.ieice.org/ess/sita/forum/article/2018/201807311720.pdf

Golden Thompson Inequalities

the term

Statistical mean Is the term Reintroduction to Stanford Physics Quantum Mechanics https://www.amazon.co.jp/dp/B01B2K28Z6 Art Friedman Leonard Susskind Nikkei BP (2016/01/28) On p.22

Document organization https://researchmap.jp/joyxqexdv-49935/#_49935

https://jp.quora.com/ryoushirikigaku-ga-fun-ka-tsu-ta-to-omoi-tsu-ta-hon-enshuu-kaki-nado-ga-arima-shitara-o-oshie-kuda-sai-ma-sen-ka

[Continuous lecture] Introduction to quantum mechanics (10 lectures in total) Youbute video https://researchmap.jp/joz7zs9b6-49935/#_49935

Easy Quantum Mechanics (1965) (New Book on Popular Science) Ve y Ludnik Tokyo Book (1965) https://researchmap.jp/jo4lwf59f-49935/#_49935

Tools

Quantum Computer on Github https://github.com/kaizen-nagoya/way_to_quantum_computer

docker for windows 7 https://qiita.com/kaizen_nagoya/items/490e5a250efabc9dc557

Introduction to "Introduction to maxima" (Windows edition) https://qiita.com/kaizen_nagoya/items/77cfe874c73d8eae92fc

Background knowledge

Koji Husimi, Probability Theory and Statistics Theory https://researchmap.jp/josgkrcbv-2087795/#_2087795

Work record

macOS


$ brew cask install anaconda
$ pip install matplotlib
$ pip install cmake
$ pip install openjij
$ python openjijch1.py

h_i:  {0: -1, 1: -1, 2: -1, 3: -1, 4: -1}
Jij:  {(0, 1): -1, (0, 2): -1, (0, 3): -1, (0, 4): -1, (1, 2): -1, (1, 3): -1, (1, 4): -1, (2, 3): -1, (2, 4): -1, (3, 4): -1}
[[1, 1, 1, 1, 1]]
[{0: 1, 1: 1, 2: 1, 3: 1, 4: 1}]
[[1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1], [1, -1, 1]]
[-4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0]
['a', 'c', 'b']
[{'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}, {'a': 1, 'c': -1, 'b': 1}]
{'states': array([[ 1, -1,  1]]), 'num_occurrences': array([10]), 'min_energy': -4.0}
[[1, 1, 0], [1, 1, 0], [1, 1, 0]]
[-46.04283667268458, -45.40319673739635, -45.43927510769896, -45.8420452385678, -44.69211986420642]
{'states': array([[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1,
        1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0,
        1, 1, 1, 0, 0, 0]]), 'num_occurrences': array([28]), 'min_energy': -46.04283667268458}

Run

openjijch1.py


import openjij as oj
#https://openjij.github.io/OpenJijTutorial/_build/html/ja/index.html
import random
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
mpl.use('Agg')

#Create an interaction with the longitudinal magnetic field that represents the problem. OpenJij accepts problems in a dictionary type.
N = 5
h = {i: -1 for i in range(N)}
J = {(i, j): -1 for i in range(N) for j in range(i+1, N)}

print('h_i: ', h)
print('Jij: ', J)

#First, create an instance of Sampler that solves the problem. You can select the algorithm that solves the problem by selecting this instance.
sampler = oj.SASampler()
#Problem with sampler method(h, J)Throw to solve the problem.
response = sampler.sample_ising(h, J)

#Calculation result(Status)Is result.It is in states.
print(response.states)

#Or look at samples to see it with a subscript.
print(response.samples)

#Actually h,The dictionary key, which indicates the J subscript, can handle non-numeric values.
h = {'a': -1, 'b': -1}
J = {('a', 'b'): -1, ('b', 'c'): 1}
sampler = oj.SASampler(iteration=10)  #Try to solve with SA 10 times.You can solve it 10 times at once with the argument iteration.
response = sampler.sample_ising(h, J)
print(response.states)

print(response.energies)

print(response.indices)

print(response.samples)

print(response.min_samples)

# Q_Create ij as a dictionary.
Q = {(0, 0): -1, (0, 1): -1, (1, 2): 1, (2, 2): 1}
sampler = oj.SASampler(iteration=3)
#When solving QUBO.sample_Let's use qubo
response = sampler.sample_qubo(Q)
print(response.states)

N = 50
#Randomly create a Qij
Q = {(i, j): random.uniform(-1, 1) for i in range(N) for j in range(i+1, N)}

#Solve with OpenJij
sampler = oj.SASampler(iteration=100)
response = sampler.sample_qubo(Q)

#Let's take a look at the energy.
print(response.energies[:5])

fig=plt.figure()
plt.hist(response.energies, bins=15)
plt.xlabel('Energy', fontsize=15)
plt.ylabel('Frequency', fontsize=15)
#plt.show()
fig.savefig('ch1.png')


min_samples = response.min_samples

print(min_samples)

File ch1.png

Reference

Question of Quantum Computer 16 "Basics of Quantum Annealing" https://qiita.com/kaizen_nagoya/items/683961f9e747e144413d

docker (28) Openjij tutorial with docker https://qiita.com/kaizen_nagoya/items/09a52b25d54091c8db6f

Today's python error (macOS) https://qiita.com/kaizen_nagoya/items/bb79e96104b5ff536de8

Introduce Python3 (Anaconda3) to Windows (M.S.) (7 traps) https://qiita.com/kaizen_nagoya/items/7bfd7ecdc4e8edcbd679

2019 version of Anaconda3 (python3) on Windows (M.S.) https://qiita.com/kaizen_nagoya/items/c05c0d690fcfd3402534

Greek letters

http://www.latex-cmd.com/special/greek.html

https://www.koka.ac.jp/morigiwa/sfc/greek.htm

letter command Lowercase command
A \alpha \alpha
B \beta \beta
\Gamma \Gamma \gamma \gamma
\Delta \Delta \delta \delta
E \epsilon \epsilon
Z \zeta \zeta
H \eta \eta
\Theta \Theta \theta \theta
I \iota \iota
K \kappa \kappa
\Lambda \Lambda \lambda \lambda
M \mu \mu
N \nu \nu
\Xi \Xi \xi \xi
O o (omicron)
\Pi \Pi \pi \pi
P \rho \rho
\Sigma \Sigma \sigma \sigma
T \tau \tau
\Upsilon \Upsilon \upsilon \upsilon
\Phi \Phi \phi \phi
X \chi \chi
\Psi \Psi \psi \psi
\Omega \Omega \omega \omega

LaTex input is almost equal to reading. The following three may be difficult to understand. xi to Kusai, Guzai, Kushi. chi is Kai. o has no LaTeX command and is read by Omiccilon.

perpendicular

Document history

ver. 0.01 First draft 20191115 ver. 0.02 Addition of reference materials 20191116

<a href="https://b.hatena.ne.jp/entry/s/qiita.com/kaizen_nagoya/items/116a5a6add72a5bf1630" class="hatena-bookmark-button" data-hatena-bookmark-layout="basic" -label-counter "data-hatena-bookmark-lang =" ja "title =" Add this entry to Hatena Bookmark "> <img src =" https://b.st-hatena.com/images/v4/public /entry-button/[email protected] "alt =" Add this entry to Hatena Bookmark "width =" 20 "height =" 20 "style =" border: none; "/>

Recommended Posts

Read "Basics of Quantum Annealing" Day 5
Read "Basics of Quantum Annealing" Day 6
Basics of Quantum Information Theory: Entropy (2)
Basics of Quantum Information Theory: Data Compression (1)
Basics of Quantum Information Theory: Horebaud Limits
Basics of Quantum Information Theory: Trace Distance
Basics of Quantum Information Theory: Quantum State Tomography
Basics of Quantum Information Theory: Data Compression (2)
Read "Quantum computer made in 14 days". Day 5 Quantum well improvement / addition of barriers
Basics of Python ①
Basics of python ①
Read "Quantum computer made in 14 days". Third day
Read "Quantum computer made in 14 days". First day
Basics of Quantum Information Theory: Topological Toric Code
Basics of Quantum Information Theory: Fault Tolerant Quantum Computation
Basics of Quantum Information Theory: Quantum Error Correction (Shor's Code)
Basics of Python scraping basics
Basics of Quantum Information Theory: Quantum Error Correction (CSS Code)
# 4 [python] Basics of functions
Basics of network programs?
Basics of Perceptron Foundation
Basics of Quantum Information Theory: Quantum Error Correction (Stabilizer Code: 4)
Basics of regression analysis
Basics of python: Output
I read "Basics of Electric Circuits and Transmission Lines"
Read "Quantum computer made in 14 days". the 2nd day
Basics of Quantum Information Theory: Quantum Error Correction (Classical Linear Code)
Basics of Quantum Information Theory: Universal Quantum Calculation by Toric Code (1)
Quantum computer implementation of quantum walk 2
Basics of Machine Learning (Notes)
python: Basics of using scikit-learn ①
Combinatorial optimization with quantum annealing
Supervised learning 1 Basics of supervised learning (classification)
Quantum computer implementation of quantum walk 3
XPath Basics (1) -Basic Concept of XPath
Quantum computer implementation of quantum walk 1
[Day 5] View and template basics
Basics of Python × GIS (Part 1)
Basics of Quantum Information Theory: Logical Operation by Toric Code (Brading)