# 10820PHYS401200 # 電腦與計算物理 Computational Physics ## Instructor * Prof. Pochung Chen. * R521, Physics building. * pcchen {at} phys {dot} nthu {dott} edu {dot} tw . ## Time * M5M6M7. ## Room * R501, Physics building. ## Syllabus ## Development Environment Setup Check list * Python: Anaconda Python Distribution. * Python packages: numpy scipy jupyterlab matplotlib. * Git: Git for windows/mac. ### Python 3 * Install [Anaconda Python Distribution](https://www.anaconda.com/distribution/), Python 3.x version. * “Just Me” (Windows), Install for me only (macOS). * Use [conda](https://conda.io/projects/conda/en/latest/index.html) to create a virtual environment. conda 4.7.x * [Starting conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#starting-conda). * Window: From the Start menu, search for and open "Anaconda Prompt." * [Managing environments](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-environments) * Check conda version: `conda --version` * `conda update -n base -c defaults conda` * Create a new environment: `conda create --name mydev` * To use, or "activate" the new environment: `conda activate mydev` * `conda install numpy scipy jupyterlab matplotlib` * To see a list of all your packages: `conda list` * To see a list of all your environments: `conda info --envs` * Change your current environment back to the default (base): `conda activate` #### Packages and references * [Numpy](https://numpy.org) * [SciPy](https://www.scipy.org) * [JupyterLab](https://jupyterlab.readthedocs.io) * [Matplotlib](http://matplotlib.org) * [Scipy Lecture Notes](https://scipy-lectures.org) #### Tensor Network related * Install [pyuni10 (v2.1.2)](https://anaconda.org/uni10/pyuni10) from anaconda cloud. * `conda install -c uni10 pyuni10' ### Git version control system * [Git official website](https://git-scm.com) * `git clone URL` * `git status` * `git add filenames` * `git commit` * `git push` ### Github * [NTHU-Phys-Qubit](https://github.com/NTHU-Phys-Qubit) * [10820PHYS401200](https://github.com/NTHU-Phys-Qubit/10820PHYS401200) ## Reference * [Introduction to Monte Carlo methods for an Ising Model of a Ferromagnet](https://arxiv.org/abs/0803.0217) by Jacques Kotze. * [Everything You Wanted to Know About Data Analysis and Fitting but Were Afraid to Ask](https://www.springer.com/la/book/9783319190501) by Peter Young. * [arXiv](https://arxiv.org/abs/1210.3781) version. * [Computational Studies of Quantum Spin Systems](https://arxiv.org/abs/1101.3281) by Anders W. Sandvik. * [The density-matrix renormalization group in the age of matrix product states](https://doi.org/10.1016/j.aop.2010.09.012) by Ulrich Schollwöck. * [Prof. Frank Pollmann](http://tccm.pks.mpg.de) * [comp-phys](https://www.pks.mpg.de/~frankp/comp-phys/) * [Prof. Xin Wan](http://zimp.zju.edu.cn/~xinwan/) * [Understand the MPS formalism and the iTEBD algorithm](http://zimp.zju.edu.cn/~xinwan/courses/qiqc15/projects.php) * [Note for iTEBD](https://www.dropbox.com/s/ubhe70yy6zo528i/Notepad_iTEBD_Tor10.pdf?dl=0) * [Supervised Learning with Quantum-Inspired Tensor Networks](https://arxiv.org/abs/1605.05775). * [Sample codes](https://github.com/emstoudenmire/TNML) * [Learning Relevant Features of Data with Multi-scale Tensor Networks](https://arxiv.org/abs/1801.00315) * [Unsupervised Generative Modeling Using Matrix Product States](https://journals.aps.org/prx/abstract/10.1103/PhysRevX.8.031012) * [Deep Learning and Quantum Programming" Spring School @ Song Shan Lake](https://github.com/QuantumBFS/SSSS) * [Towards Quantum Machine Learning with Tensor Networks](https://iopscience.iop.org/article/10.1088/2058-9565/aaea94/meta) * [Tree Tensor Networks for Generative Modeling](https://arxiv.org/abs/1901.02217) ## Python * [Python.org](https://www.python.org) * [Anaconda Distribution](https://www.anaconda.com/distribution/) * [Download](https://www.anaconda.com/distribution/#download-section) * [Jupyter](https://jupyter.org) * [Numpy](http://www.numpy.org) * [Matplotlib](https://matplotlib.org) * [PyFormat](https://pyformat.info) * [UNI10](https://uni10.gitlab.io) Universal Tensor Network Library. * [Tor10](https://github.com/kaihsin/Tor10) A Generic Tensor-Network library that is designed for quantum simulation, base on the pytorch. ## Git & Github repository ## Homework * [Homework-1 GitHub Classroom link](https://classroom.github.com/a/4jPRbsOu), due on 4/13/2020. * [Homework-2 GitHub Classroom link](https://classroom.github.com/a/pn5w_3az), due on 4/13/2020. * [Homework-3 GitHub Classroom link](https://classroom.github.com/a/s8QuHXSZ) * https://journals.aps.org/pr/abstract/10.1103/PhysRev.185.832 * [Homework-4 GitHub Classroom link](https://classroom.github.com/a/pIFWZMyg) * https://journals.aps.org/prb/abstract/10.1103/PhysRevB.86.045139 * [Homework-5 GitHub Classroom link](https://classroom.github.com/a/y3IMqBip) ### Weekly schedule * Week 1: 3/2/2020 * Introduction. * Development environment. * Week 2: 3/9/2020 * Numpy, Matplotlib. * Git. * Week 3: 3/16/2020 * NumPy linear albegra: numpy.linalg * Random walk. * Ising model. * Week 4: 3/23/2020 * Transfer matrix for classical 1D Ising model. * [YouTube](https://youtu.be/oAijmr-D7h4) * [Note](https://www.dropbox.com/s/iqvgn6r8dee9x97/CompPhys_20200323.pdf?dl=0) * Week 5: 3/30/2020 * Transfer matrix for classical 1D Ising model. * [YouTube](https://youtu.be/1B_NRng29Z4) * [Note](https://www.dropbox.com/s/txg96jxfook6eoc/CompPhys_20200330.pdf?dl=0) * Week 6: ~~4/6/2020~~ (No class) * 校際活動週(停課一日) * Week 7: 4/13/2020 * [YouTube](https://youtu.be/OuxsV06oA1s) * [Note](https://www.dropbox.com/s/bgap6m3p729mi3o/CompPhys_20200413.pdf?dl=0) * Tensor network diagram. * Tensor renormalization group. * Singular value decomposition. * HW1, HW2 due. * Week 8: 4/20/2020 * [YouTube](https://youtu.be/2gqM95h5g6Y) * [Note](https://www.dropbox.com/s/03xidg4xg3am9zt/CompPhys_20200420.pdf?dl=0) * 2D Ising model, exact solution. * 2D Ising model, tensor network representation. * Week 9: 4/27/2020 * [Note](https://www.dropbox.com/s/4ylao6whfdd9wmr/CompPhys_20200427.pdf?dl=0) * Week 10: 5/4/2020 * [Note](https://www.dropbox.com/s/l3gd79rlahscc9v/CompPhys_20200504.pdf?dl=0) * Week 11: 5/11/2020 * [Note](https://www.dropbox.com/s/oiidvujlajtlsjh/CompPhys_20200511.pdf?dl=0) * Week 12: 5/18/2020 * [YouTube](https://youtu.be/2B6dZGeH3wg) * [Note](https://www.dropbox.com/s/083xpkslqlgs7b8/CompPhys_20200518.pdf?dl=0) * Week 13: 5/25/2020 * Week 14: 6/1/2020 * [Note](https://www.dropbox.com/s/rlxq1mevzypevts/CompPhys_20200601.pdf?dl=0) * Week 15: 6/8/2020 * [Note](https://www.dropbox.com/s/pkkuiul85mo14es/CompPhys_20200608.pdf?dl=0) * Week 16: 6/15/2020 * Week 17: 6/22/2020