2013-08-26 18:00:59 +02:00
|
|
|
.. _welcome:
|
|
|
|
|
|
|
|
Welcome
|
|
|
|
=======
|
2013-08-22 16:20:41 +02:00
|
|
|
|
|
|
|
TRIQS is a scientific project that provides a set of tools for the study of
|
|
|
|
interacting quantum systems. It allows to quickly implement many-body
|
|
|
|
calculations and explore new theoretical and phenomenological ideas within a
|
|
|
|
flexible, easy-to-use python environment (à la Matlab).
|
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
Powerful c++ libraries
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
.. code-block:: c++
|
|
|
|
|
|
|
|
#include <triqs/arrays.hpp>
|
|
|
|
#include <triqs/arrays/linalg/inverse.hpp>
|
|
|
|
#include <triqs/arrays/linalg/determinant.hpp>
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
using triqs::arrays::array; using triqs::arrays::matrix; using triqs::clef::placeholder;
|
|
|
|
int main(){
|
|
|
|
placeholder<0> i_;
|
|
|
|
placeholder<1> j_;
|
|
|
|
matrix<double> A(2,2);
|
|
|
|
A(i_,j_) << i_+j_;
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
matrix<double> B = inverse(A);
|
|
|
|
double C = determinant(A);
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
std::cout << "A^(-1) = "<< B << std::endl;
|
|
|
|
std::cout << "det(A) = " <<C <<std::endl;
|
|
|
|
}
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
User-friendly python interface
|
|
|
|
------------------------------
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
.. plot::
|
|
|
|
:include-source:
|
|
|
|
:scale: 70
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
from pytriqs.gf.local import *
|
|
|
|
g = GfReFreq(indices = ['s','d'], window = [-2,2], n_points = 1000)
|
|
|
|
g['d','d'] = Omega - 0.3
|
|
|
|
g['d','s'] = 0.2
|
|
|
|
g['s','d'] = 0.2
|
|
|
|
g['s','s'] = inverse( Wilson(1.0) )
|
|
|
|
g.invert()
|
2013-08-22 16:20:41 +02:00
|
|
|
|
2013-08-26 18:00:59 +02:00
|
|
|
from pytriqs.plot.mpl_interface import oplot
|
|
|
|
oplot( g['d','d'], '-o', RI = 'S', x_window = (-1.8,1.8), name = "Impurity" )
|
|
|
|
oplot( g['s','s'], '-x', RI = 'S', x_window = (-1.8,1.8), name = "Bath" )
|