Git Product home page Git Product logo

tenes's Introduction

TeNeS logo

Branch Build status Documentation
master (latest stable) master doc_en doc_ja
develop (latest) develop doc_en doc_ja

TeNeS

TeNeS (Tensor Network Solver) is a solver for 2D quantum lattice system based on a PEPS wave function and the CTM method. TeNeS can make use of many CPU/nodes through an OpenMP/MPI hybirid parallel tensor operation library, mptensor.

Online manual

Getting started

Prerequisites and dependencies

The following tools are required for building TeNeS.

  • C++11 compiler
  • CMake (>=3.6.0)

TeNeS depends on the following libraries, but these are downloaded automatically through the build process.

TeNeS can be parallerized by using MPI and ScaLAPACK.

TeNeS tools (tenes_simple, tenes_std) are written in Python3. The following external packages are required:

  • numpy
  • scipy
  • toml
  • typing (mandatory for python < 3.5)

Install

Simplest way to build

$ mkdir build
$ cd build
$ cmake ../
$ make

(NOTE: Some system (e.g. CentOS) provides CMake 3 as cmake3)

The above commands makes an exectutable file tenes in the build/src directory.

Install binaries and samples

$ cmake -DCMAKE_INSTALL_PREFIX=<path to install to> ../
$ make
$ make install

The above installs tenes, tenes_std, and tenes_simple into the <path to install to>/bin . Samples will be also installed into the <path to install to>/share/tenes/<VERSION>/sample . The default value of the <path to install to> is /usr/local .

Specify compiler

CMake detects your compiler automatically but sometimes this is not what you want. In this case, you can specify the compiler by the following way,

$ cmake -DCMAKE_CXX_COMPILER=<path to your compiler> ../

Disable MPI/ScaLAPACK parallelization

To disable parallelization, pass the -DENABLE_MPI=OFF option to cmake commands.

If you use macos, MPI/ScaLAPACK parallelization is disabled by default because the combination of Apple Accelerate BLAS/LAPACK library with ScaLAPACK seems to have some troubles.

Use the pre-built mptensor

TeNeS is based on the parallerized tensor library, mptensor (>= v0.3). The build system of TeNeS installs this automatically, but you can use the extra pre-built mptensor by the following way.

$ cmake -DMPTENSOR_ROOT=<path to mptensor> ../

Specify Python interpreter

TeNeS tools tenes_simple and tenes_std use python3 which can be found in PATH via /usr/bin/env python3. Please make sure that python3 command invokes Python3 interpreter, for example, by using type python3 .

If you want to fix the interpreter to be used (or /usr/bin/env does not exist), you can specify it by the following way,

$ cmake -DTENES_PYTHON_EXECUTABLE=<path to your interpreter> ../

Usage

Use pre-defined model and lattice

For example, the following file simple.toml represents the transverse field Ising model on the square lattice.

[parameter]
[parameter.general]
is_real = true

[parameter.simple_update]
num_step = 1000
tau = 0.01

[parameter.full_update]
num_step = 0
tau = 0.01

[parameter.ctm]
iteration_max = 10
dimension = 10

[lattice]
type = "square lattice"
L = 2
W = 2
virtual_dim = 2
initial = "ferro"

[model]
type = "spin"
Jz = -1.0 # negative for FM interaction
Jx = 0.0
Jy = 0.0
G = 1.0   # transverse field

tenes_simple is a utility tool for converting this file to another file, std.toml, denoting the operator tensors including bond hamiltonian.

$ tenes_simple simple.toml

Calculate imaginary time evolution operators

tenes_std is another utility tool for calculating imaginary time evolution operators and converting std.toml to the input file of tenes, input.toml.

$ tenes_std std.toml

By editing std.toml, users can perform other models and lattices as ones like.

Perform

To perform simulation, pass input.toml to tenes as the following

$ tenes input.toml

Results can be found in output directory. For example, expectation values of operators per site are stored in output/densities.dat as the following,

Sz          =  2.97866964051826333e-01  0.00000000000000000e+00
Sx          =  3.86024172907023511e-01  0.00000000000000000e+00
hamiltonian = -7.57303058659582140e-01  0.00000000000000000e+00
SzSz        =  2.16869216589772901e-01  0.00000000000000000e+00
SxSx        =  3.19350111777505108e-01  0.00000000000000000e+00
SySy        = -4.77650003168152704e-02  0.00000000000000000e+00

The file format of input/output files is described in the manual page.

Question or comment

Feel free to ask any question through an issue (public) or an e-mail (private) (tenes-dev__at__issp.u-tokyo.ac.jp, __at__ -> @).

Pull request is welcome (even for a small typo, of course!).

License

TeNeS is available under the GNU GPL v3.

Acknowledgement

TeNeS was supported by MEXT as "Exploratory Challenge on Post-K computer" (Frontiers of Basic Science: Challenging the Limits) and "Priority Issue on Post-K computer" (Creation of New Functional Devices and High-Performance Materials to Support Next-Generation Industries). We also would also like to express our thanks for the support of the "Project for advancement of software usability in materials science" of The Institute for Solid State Physics, The University of Tokyo, for the development of TeNeS.

tenes's People

Contributors

yomichi avatar k-yoshimi avatar smorita avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.