Quantum Simulation with Matrix Product State, a Tensor network method for the study of Quantum Systems
Project description
mps
Code for MPS of Quantum Many-Body Systems
Setup
-
Download from git the repository
git clone --recursive git@github.com:gcataldi96/ed-su2.git
-
Add the simsio library as a submodule (it should be already there)
git submodule add https://github.com/rgbmrc/simsio.git git add . git commit -m "Add simsio submodule to the TTN code"
-
Create the Environment with all the needed python packages
conda env create -f environment.yml conda activate mps
Enjoy 👏
Configure Simsio Simulations
This is an example of a config file that should be created inside the folder configs (if this latter does not exist, create the directory):
===:
template: |
n$enum:
<<<: common
g: $g
common:
dim: 2
lvals: [2,2]
pure: false
has_obc: false
DeltaN: 2
m: 1.0
n0:
<<<: common
g: j0
n1:
<<<: common
g: j1
where j0 and j1 are two values of g that one would like to simulate.
If you want to create a larger set of simulations automatically, run a script like the following:
from simsio import gen_configs
import numpy as np
params = {"g": np.logspace(-1, 1, 10)}
gen_configs("template", params, "config_NAME_FILE")
Then, in "config_NAME_FILE.yaml" it will add simulations like
ni:
<<<: common
g: j
where
$i$ is the $i^{th}$ simulation corresponding to the model with the g-parameter (which is not common to all the other simulations) equal to $j$
Run Simulations
To run simulations, just type on the command shell the following command:
nohup bash -c "printf 'n%s\n' {0..N} | shuf | xargs -PA -i python SU2_model.py config_NAME_FILE.yaml {} B" &>/dev/null &
where
-
N is the total number of simulations in the config_file_name,
-
A is the number of processes in parallel
-
B is the number of single-node threads per simulation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for qs_mps-2023.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e60b1e82893bc7f9ef2a7b52aade0bfa7bfa4c4e2f3d451ceef88c4c4d0d38e |
|
MD5 | 3f2172ebd3086f8a0264a1b403ce2ffa |
|
BLAKE2b-256 | 324ff35fb06637f9441ab12603b726c3f4f2d94ea9177e6eb98e3679f6f49b55 |