2022년 10월 4일 화요일
양자역학, CHSH 부등식, Bell 부등식
2022년 5월 24일 화요일
mingw-w64 install
At some point, the install program of mingw-w64 does not work properly with error message " The file is not downloaded properly."
The solution to this problem is to directly download the compiled files.
(1) Go to the link
https://sourceforge.net/projects/mingw-w64/files/
(2) Select the chosen version of files (I choose x86_64-posix-seh )
(3) download and unzip. copy the file to c:\mingw-w64 (or to any path of choice)
(4) include the path (/bin and /include) to the Windows.
(For example c:\mingw-w64\bin and c:\mingw-w64\include)
("system property"->"advanced"->"environment variables"-> "Path"->"add")
(5) Now one can use mingw in the command prompt.
2022년 4월 19일 화요일
compile of the code for Eigenvector Continuation for elastic scattering
Original Reference
https://github.com/buqeye/eigenvector-continuation
which is the code for arXiv:2007.03635,
To use the code in Windows, some modification is necessary.
Environment: Mingw64, gfortran, python, no lapack
(1) change the code of fortran file to use internal subroutine instead of lapack library.
this can be done simple commenting.
(2) compile all fortran source code with f2py
python -m numpy.f2py -c -m rmatrix_f2py rmatrix_f2py.f
python -m numpy.f2py -c -m rmatrix_f2py_complex_potential rmatrix_f2py_complex_potential.f
python -m numpy.f2py -c -m coulomb_Barnett coulomb_Barnett.f
(3) copy created dll files(in each sub-directories) to the source directory.
(4) Now we can use the fortran subroutines in python.
(5) The jupyter notebook works now.
2022년 1월 11일 화요일
2021년 10월 7일 목요일
interpolation with multi-dimensional grid data
Suppose we want to interpolate a multi-dimensional function
y = f(x1, x2, x3...)
and we have numerical table of values at grid points of each axis.
This interpolation can be done by using scipy.interpolate.interpn
However, the data have to be prepared in specific forms.
scipy.interpolate.interpn(points, values, xi, method='linear', bounds_error=True, fill_value=nan)
(1) "points" are tuple of grid points in each axis.
2021년 7월 8일 목요일
Physics journals
Let us list impact factors of related with my research. (may be not so recent.)
I am surprised that the rank of Physical Review C is not so high.
1 REVIEWS OF MODERN PHYSICS 45.037
7 PHYSICS REPORTS-REVIEW SECTION OF PHYSICS LETTERS 25.798
9 Nature Physics 19.256
11 REPORTS ON PROGRESS IN PHYSICS 17.032
14 ADVANCES IN PHYSICS 16.375
17 PROGRESS IN PARTICLE AND NUCLEAR PHYSICS 13.421
18 Physical Review X 12.577
28 Annual Review of Nuclear and Particle Science 8.778
29 PHYSICAL REVIEW LETTERS 8.385
47 NUCLEAR DATA SHEETS 5.944
59 PHYSICAL REVIEW D 4.833
64 PHYSICS LETTERS B 4.384
72 PHYSICS TODAY 3.875
79 COMPUTER PHYSICS COMMUNICATIONS 3.627
82 PHYSICAL REVIEW B 3.575
115 PHYSICAL REVIEW C 2.988
129 NUCLEAR PHYSICS B 2.817
130 PHYSICAL REVIEW A 2.777
135 Frontiers in Physics 2.638
353 FEW-BODY SYSTEMS 0.823
396 JOURNAL OF THE KOREAN PHYSICAL SOCIETY 0.535
2021년 6월 11일 금요일
Creating personal library in Linux : 1. Fortran library to be used in Fortran (working)
The purpose of this post is to summarize the procedure to make personal library of routines so that re-use previous works.
(1) Fortran library to be used in Fortran
(2) C/C++ library to be used in C/C++
(3) Fortran library to be used in C/C++
(4) C/C++ library to be used in Fortran
(5) Fortran library to be used in Python
(6) C/C++ library to be used in Python
Let us start from the first/second case.
(1) to make a static library use "ar crvs"
ar rc liball.a dog.o cat.o bird.o #rc=replace/create
ranlib liball.a # make symbol indexing or use "s" for ar
to usegcc main.c -L -l<filename>
(2) to make dynamic/shared library use linker like "gcc" ,"gfortran"
gcc -g -fPIC -Wall -Werror -Wextra -pedantic *.c -shared -o liball.so
to use dynamic librarygcc -g -wall -o app app.c liball.so
* if source file *.f use .mod file, one have to keep them to make shared library.