Apple silicon M1 for the many-body physicist

conda config --add channels conda-forge 
conda config --set channel_priority strict
conda create -n MY-ENV python=3.9 pybind11 cython=0.29.30
pip3 install --no-binary :all: numpy
import numpy
conda config --set pip_interop_enabled true
echo "numpy=1.23.0=pypi*" >> ~/opt/anaconda3/envs/MY-ENV/conda-meta/pinned
conda install scipy


pip3 install --no-binary :all: numpy==1.22.4 --force-reinstall

Let’s do many-body physics: QuSpin for exact diagonalisation

conda install joblib six dill gmpy2 numexpr boost llvm-openmp numba=0.55.2 openmpi-mpicc
Git clone
python install --omp --record install_file.txt
which clang
mv clang arm64-apple-darwin20.0.0-clang
mv clang++ arm64-apple-darwin20.0.0-clang++

Alternative — compile with g++

/bin/bash -c “$(curl -fsSL"
brew install gcc
brew install g++
export CC=gcc-11
export CXX=g++-11
export CFLAGS=”-I/opt/homebrew/include”
python install — omp — default-compiler-flags — record install_file.txt

Get the matrix product states to work — TeNPy

git clone $HOME/TeNPy
cd $HOME/TeNPy
vim ~/.bashrc
bash ./



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Schuckert

Alex Schuckert

Trying to make sense of quantum physics with the help of green tea.