This repository contains the code to simulate a two-dimensional transverse field Ising model with multiple-basis representation states. The Hamiltonian of the model is given by
where
Additionally, the repository contains benchmarking code in the form of matrix-product state (MPS), projected entangled pair state (PEPS) and exact diagonalization (ED) simulations.
The code is written for Python 3 and tested to work with Python 3.8.
To make sure that all requirements of the package are fulfilled, the easiest way to use the code is to create a virtual environment and install the mbrsim
package.
- Creation of a virtual environment
You can create the environment in a folder of your choice. For the rest of the tutorial, we assume it to be in~/.pyenv/
cd ~/.pyenv
python -m venv mbrsimenv
Assuming you are using bash or zsh, you can activate the environment with source ~/.pyenv/mbrsimenv/bin/activate
.
Upon activation, you will notice that your prompt changes.
As long as it is prefixed with (mbrsimenv)
the virtual environment is active.
The virtual environment can be deactivated with deactivate
.
- Cloning the code
You can obtain the code by cloning the repo with
git clone git@github.com:patrick.emonts/multiple-basis-representation
- Install the
mbrsim
package Thembrsim
package is still in the development phase. We recommend an editable install, since the main reason to install the package is development. Execute the following command while standing in the root directory of the repository
pip install -e .
Pip installs all dependencies as specified in the pyproject.toml
and yields a working environment.
The repository is split into two main parts: the package mbrsim
(at src/mbrsim
) and utility scripts in the main folder.
The package mbrsim
contains the simulation code, i.e. the actual implementation of the physical problem, the transverse field Ising model.
All scripts in the main folder call parts of the package and provide the infrastructure to manage the simulations.
The package mbrsim
is divided into several modules:
graph.py
: Build a graph representation of a given latticehamiltonian.py
: Simulation tools for the TFIM with different techniques (exact diagonalization, PEPS, MPS)mbr.py
: Simulation tools for the TFIM with multi-basis representation statesutils.py
: Utility functions for data management and debugging
The script manager.py
is the main script that manages all simulations.
The manager.py
can start different simulations.
Currently, there are four supported simulations: MBR, MPS, PEPS and exact diagonalization (ED).
An example call for a 2x2 lattice with open boundary conditions, solved with ED looks like
python manager.py --nx 2 --ny 2 --hmin 0.2 --hmax 1.0 --nsteps 9 --type ed
The call executes 9 simulations from
A full list of all options can be found with
python manager.py --help
- The magnetization observables have to be tested more in a system where the ground state is not degenerate, e.g. the ferromagnetic case with a small longitudinal field.
- The staggered magnetization in the MBR case has some issue