Welcome
TRIQS Community
Where to start?
TRIQS Software Stack
Core libraries
The TRIQS library
Numerical Algorithms
Applications
Applications based on TRIQS
Impurity Solvers
Hybridization-expansion solver
Segment Picture Hybridization-expansion solver
Interaction-expansion solver
X-Crossing Approximation (XCA) solver
Hubbard I solver
Hartree Fock solver
gem - Gutzwiller Embedding Method
PYED - Exact diagonalization for finite quantum systems (external)
Interface to the pomerol exact diagonalization solver (external)
Interface to the EDIpack impurity solver
Interface to the w2dynamics impurity solver
Interface to the NRG Ljubljana impurity solver
Ab-Initio Tools
DFT tools - Toolbox for ab initio calculations of correlated materials
dftkit - DFT converters for TRIQS
modest - Modular Electronic Structure Toolkit
solid_dmft - Python wrapper to perform DFT+DMFT calculations using TRIQS
MagInt - ab initio inter-site exchange in correlated insulators
Analytic Continuation
Maxent
Nevanlinna Analytic Continuation
SOM - Stochastic Optimization Method for Analytic Continuation (external)
Interface to Omegamaxent
Other Applications
TPRF - The Two-Particle Response Function tool box
TRIQS Solver benchmarks
App4Triqs Application Skeleton
Installation
Packaged Versions of TRIQS
Ubuntu Debian packages
Anaconda
Docker
Apptainer
Binder
Compiling TRIQS from source using EasyBuild
Compiling TRIQS from source (Advanced)
Prerequisites
A complete list of requirements
C++ compilers
Tools and Libraries
Building the TRIQS documentation
Installing required libraries on Ubuntu
Issues
Prerequisites for the TRIQS Compilation on Mac OS X
Disclaimer
Installation of the dependencies
Installation steps
Using the command line
Using the provided Python script
Environment setup
Further reading
Customizing your installation
cmake options
Unix environment variables
Common environment variables
Environment variables for software developement
Environment variables affecting OpenMP
Python Virtual Environments
Usage
Compiling a package from source
Using the clang compiler
Get and install clang on linux
Usage
libclang
Version compatibility
TRIQS version numbering
TRIQS applications version numbering
How to determine the version of the installed TRIQS library
API Documentation
C++ API
Python API
triqs.atom_diag
Examples
triqs.atom_diag.AtomDiag
AtomDiag()
triqs.atom_diag.atom_diag
triqs.atom_diag.atom_diag.act
triqs.atom_diag.atom_diag.atomic_density_matrix
triqs.atom_diag.atom_diag.atomic_g_iw
triqs.atom_diag.atom_diag.atomic_g_l
triqs.atom_diag.atom_diag.atomic_g_tau
triqs.atom_diag.atom_diag.atomic_g_w
triqs.atom_diag.atom_diag.partition_function
triqs.atom_diag.atom_diag.quantum_number_eigenvalues
triqs.atom_diag.atom_diag.quantum_number_eigenvalues_checked
triqs.atom_diag.atom_diag.trace_rho_op
triqs.atom_diag.atom_diag.AtomDiagComplex
triqs.atom_diag.atom_diag.AtomDiagReal
triqs.dos
triqs.dos.dos
triqs.dos.dos.dos_from_file
triqs.dos.dos.DOS
triqs.dos.dos.DOSFromFunction
triqs.dos.hilbert_transform
triqs.dos.hilbert_transform.HilbertTransform
triqs.experimental
triqs.experimental.lattice
triqs.experimental.lattice.lattice
triqs.experimental.utility
triqs.experimental.utility.utility
triqs.fit
triqs.fit.fit
triqs.fit.fit.linear
triqs.fit.fit.quadratic
triqs.fit.fit.Fit
triqs.gfs
triqs.gfs.backwd_compat
triqs.gfs.backwd_compat.gf_imfreq
triqs.gfs.backwd_compat.gf_imtime
triqs.gfs.backwd_compat.gf_legendre
triqs.gfs.backwd_compat.gf_refreq
triqs.gfs.backwd_compat.gf_retime
triqs.gfs.block2_gf
triqs.gfs.block2_gf.Block2Gf
triqs.gfs.block_gf
triqs.gfs.block_gf.call_factory_from_dict
triqs.gfs.block_gf.fix_gf_struct_type
triqs.gfs.block_gf.BlockGf
triqs.gfs.descriptor_base
triqs.gfs.descriptor_base.convert_scalar_to_const
triqs.gfs.descriptor_base.is_lazy
triqs.gfs.descriptor_base.is_scalar
triqs.gfs.descriptor_base.Omega
triqs.gfs.descriptor_base.iOmega_n
triqs.gfs.descriptor_base.Base
triqs.gfs.descriptor_base.BaseBlock
triqs.gfs.descriptor_base.Const
triqs.gfs.descriptor_base.Function
triqs.gfs.descriptor_base.LazyCTX
triqs.gfs.descriptor_base.Omega_
triqs.gfs.descriptors
triqs.gfs.descriptors.semi
triqs.gfs.descriptors.Flat
triqs.gfs.descriptors.Fourier
triqs.gfs.descriptors.LegendreToMatsubara
triqs.gfs.descriptors.MatsubaraToLegendre
triqs.gfs.descriptors.OneFermionInTime
triqs.gfs.descriptors.SemiCircular
triqs.gfs.descriptors.Wilson
triqs.gfs.dlr_crm_dyson_solver
triqs.gfs.dlr_crm_dyson_solver.minimize_dyson
triqs.gfs.gf
triqs.gfs.gf.add_method_helper
triqs.gfs.gf.bckwd
triqs.gfs.gf.call_factory_from_dict
triqs.gfs.gf.AddMethod
triqs.gfs.gf.CallProxyNone
triqs.gfs.gf.Gf
triqs.gfs.gf.Idx
triqs.gfs.gf_factories
triqs.gfs.gf_factories.gf_factories_dlr_imfreq
triqs.gfs.gf_factories.gf_factories_dlr_imtime
triqs.gfs.gf_factories.gf_factories_fourier
triqs.gfs.gf_factories.gf_factories_hermitian
triqs.gfs.gf_fnt
triqs.gfs.gf_fnt.gf_fnt_fit_and_density
triqs.gfs.gf_fnt.gf_fnt_fourier
triqs.gfs.gf_fnt.gf_fnt_misc
triqs.gfs.lazy_expressions
triqs.gfs.lazy_expressions.all_terminals
triqs.gfs.lazy_expressions.eval_expr
triqs.gfs.lazy_expressions.eval_expr_with_context
triqs.gfs.lazy_expressions.lazy_function
triqs.gfs.lazy_expressions.make_lazy
triqs.gfs.lazy_expressions.transform
triqs.gfs.lazy_expressions.LazyExpr
triqs.gfs.lazy_expressions.LazyExprTerminal
triqs.gfs.plot
triqs.gfs.plot.dispatcher
triqs.gfs.plot.bz
triqs.gfs.plot.bz_x_x
triqs.gfs.plot.one_var
triqs.gfs.plot.plot_base
triqs.gfs.plot.select_indices
triqs.gfs.semicirc
Functions
triqs.gfs.semicirc.g_semicirc_tau
triqs.gfs.semicirc.g_semicirc_tau_adapquad
triqs.gfs.semicirc.g_semicirc_w
triqs.gfs.semicirc.g_semicirc_z
triqs.gfs.tools
triqs.gfs.tools.conjugate
triqs.gfs.tools.delta
triqs.gfs.tools.discretize_bath
triqs.gfs.tools.dyson
triqs.gfs.tools.fit_legendre
triqs.gfs.tools.inverse
triqs.gfs.tools.make_delta
triqs.gfs.tools.make_zero_tail
triqs.gfs.tools.map_block
triqs.gfs.tools.read_gf_from_txt
triqs.gfs.tools.transpose
triqs.gfs.tools.write_gf_to_txt
triqs.gfs.wrapped_aux
triqs.gfs.wrapped_aux.wrapped_aux_other
triqs.gfs.wrapped_aux.wrapped_aux_target_rank_0
triqs.gfs.wrapped_aux.wrapped_aux_target_rank_1
triqs.gfs.wrapped_aux.wrapped_aux_target_rank_2
triqs.gfs.wrapped_aux.wrapped_aux_target_rank_3
triqs.gfs.wrapped_aux.wrapped_aux_target_rank_4
triqs.lattice
triqs.lattice.bz_patch
triqs.lattice.bz_patch.BZPatch
triqs.lattice.lattice_tools
triqs.lattice.lattice_tools.dos
triqs.lattice.lattice_tools.dos_patch
triqs.lattice.lattice_tools.BravaisLattice
triqs.lattice.lattice_tools.BrillouinZone
triqs.lattice.lattice_tools.TightBinding
triqs.lattice.point
triqs.lattice.point.LatticePoint
triqs.lattice.super_lattice
triqs.lattice.super_lattice.TBSuperLattice
triqs.lattice.tight_binding
triqs.lattice.tight_binding.dos
triqs.lattice.tight_binding.dos_patch
triqs.lattice.tight_binding.TBLattice
triqs.lattice.utils
triqs.lattice.utils.TB_from_pythTB
triqs.lattice.utils.TB_from_wannier90
triqs.lattice.utils.TB_to_sympy
triqs.lattice.utils.extend_wannier90_to_spin
triqs.lattice.utils.k_space_path
triqs.lattice.utils.parse_hopping_from_wannier90_hr_dat
triqs.lattice.utils.parse_lattice_vectors_from_wannier90_wout
triqs.mc_tools
triqs.mc_tools.random_generator
triqs.mc_tools.random_generator.random_generator_names
triqs.mc_tools.random_generator.random_generator_names_list
triqs.mc_tools.random_generator.RandomGenerator
triqs.mesh
triqs.mesh.matsubara_freq
triqs.mesh.matsubara_freq.MatsubaraFreq
triqs.mesh.mesh_point
triqs.mesh.mesh_point.MeshPoint
triqs.mesh.mesh_point.MeshValueGenerator
triqs.mesh.mesh_product
triqs.mesh.mesh_product.call_factory_from_dict
triqs.mesh.mesh_product.MeshProduct
triqs.mesh.meshes
triqs.mesh.meshes.make_adjoint_mesh
triqs.mesh.meshes.EnergyT
triqs.mesh.meshes.MeshBrZone
triqs.mesh.meshes.MeshChebyshev
triqs.mesh.meshes.MeshCycLat
triqs.mesh.meshes.MeshDLR
triqs.mesh.meshes.MeshDLRImFreq
triqs.mesh.meshes.MeshDLRImTime
triqs.mesh.meshes.MeshImFreq
triqs.mesh.meshes.MeshImTime
triqs.mesh.meshes.MeshLegendre
triqs.mesh.meshes.MeshReFreq
triqs.mesh.meshes.MeshReFreqLog
triqs.mesh.meshes.MeshReFreqPts
triqs.mesh.meshes.MeshReTime
triqs.operators
Examples
triqs.operators.operators
triqs.operators.operators.c
triqs.operators.operators.c_dag
triqs.operators.operators.dagger
triqs.operators.operators.is_op_hermitian
triqs.operators.operators.n
triqs.operators.operators.CanonicalOpsT
triqs.operators.operators.Operator
triqs.operators.util
triqs.operators.util.U_matrix
triqs.operators.util.extractors
triqs.operators.util.hamiltonians
triqs.operators.util.observables
triqs.operators.util.op_struct
triqs.plot
triqs.plot.mpl_interface
triqs.plot.mpl_interface.oplot
triqs.plot.mpl_interface.oploti
triqs.plot.mpl_interface.oplotr
triqs.plot.mpl_interface.use_amsmath
triqs.plot.protocol
triqs.plot.protocol.clip_array
triqs.plot.protocol.plot_protocol_apply
triqs.plot.protocol.plot_function_table
triqs.stat
triqs.stat.histogram
triqs.stat.histogram.plot
triqs.stat.histograms
triqs.stat.histograms.cdf
triqs.stat.histograms.pdf
triqs.stat.histograms.Histogram
triqs.sumk
triqs.sumk.sumk_discrete
triqs.sumk.sumk_discrete.SumkDiscrete
triqs.sumk.sumk_discrete_from_lattice
triqs.sumk.sumk_discrete_from_lattice.SumkDiscreteFromLattice
triqs.utility
triqs.utility.bound_and_bisect
triqs.utility.bound_and_bisect.bound_and_bisect
triqs.utility.bound_and_bisect.determine_bounds
triqs.utility.capture_stdout
triqs.utility.comparison_tests
triqs.utility.comparison_tests.assert_array_close_to_scalar
triqs.utility.comparison_tests.assert_arrays_are_close
triqs.utility.comparison_tests.assert_block2_gfs_are_close
triqs.utility.comparison_tests.assert_block_gfs_are_close
triqs.utility.comparison_tests.assert_gfs_are_close
triqs.utility.dichotomy
triqs.utility.dichotomy.dichotomy
triqs.utility.dist_on_nodes
triqs.utility.dist_on_nodes.DistributionOnNodes
triqs.utility.dist_on_nodes.DistributionOnNodesOneStack
triqs.utility.dist_on_nodes.DistributionOnNodesTest
triqs.utility.h5diff
Attributes
triqs.utility.h5diff.compare
triqs.utility.h5diff.h5diff
triqs.utility.mpi
triqs.utility.mpi.check_for_mpi
triqs.utility.mpi_mpi4py
Attributes
triqs.utility.mpi_mpi4py.all_reduce
triqs.utility.mpi_mpi4py.barrier
triqs.utility.mpi_mpi4py.bcast
triqs.utility.mpi_mpi4py.is_master_node
triqs.utility.mpi_mpi4py.master_gets_host_names
triqs.utility.mpi_mpi4py.myprint_err
triqs.utility.mpi_mpi4py.myprint_out
triqs.utility.mpi_mpi4py.recv
triqs.utility.mpi_mpi4py.report
triqs.utility.mpi_mpi4py.send
triqs.utility.mpi_mpi4py.slice_array
triqs.utility.mpi_mpi4py.slice_inf
triqs.utility.mpi_mpi4py.slice_sup
triqs.utility.mpi_nompi
Attributes
triqs.utility.mpi_nompi.all_reduce
triqs.utility.mpi_nompi.barrier
triqs.utility.mpi_nompi.bcast
triqs.utility.mpi_nompi.is_master_node
triqs.utility.mpi_nompi.master_gets_host_names
triqs.utility.mpi_nompi.myprint_err
triqs.utility.mpi_nompi.myprint_out
triqs.utility.mpi_nompi.recv
triqs.utility.mpi_nompi.report
triqs.utility.mpi_nompi.send
triqs.utility.mpi_nompi.slice_array
triqs.utility.redirect
Attributes
triqs.utility.redirect.start_redirect
triqs.utility.redirect.stop_redirect
triqs.utility.redirect.T
triqs.utility.utilities
triqs.utility.utilities.TimePt
User guide
Why use TRIQS?
Dynamical mean-field theory on a Bethe lattice
Python Tutorials
Basics
Introducing Python and the IPython Notebook
Script mode
Interactive shell mode
The IPython Notebook
A Very Short Introduction to Python
Calculating
Simple loops / indentation
If statements
Defining a function
Importing modules
Lists
The NumPy Library
Defining a new class
Getting help
Matplotlib Examples
Goal of this tutorial
Inline plots
Making the plot prettier
Subplots
Histograms and text
Python-like approach to matplotlib
More examples
TRIQS Green’s functions
Matrix-Valued Green’s functions
Block Green’s functions
Additional Initialization Descriptors
Imaginary-frequency Green’s functions
Arithmetic Operations
Obtaining the density
Fourier transforms
Compact meshes for imaginary time / frequency: DLR Green’s function
Pade analytical continuation
Exercises
HDF5 Archives
Writing to an archive
Reading from an archive
Manipulating fermionic operators
Fundamental operators
Number operator
Operations with operators
Exact Diagonalization
Introduction to multivariable Green’s functions
Imports and parameters
Constructing and Initializing a Lattice Green’s function
NumPy Broadcasting
Evaluate the Green’s function
Partial evaluation
Defining a Tight-Binding Hamiltonian
Model DMFT
A first DMFT calculation
The iterated perturbation theory
Dynamical mean-field theory
Bethe lattice DMFT
Visualizing the Mott transition
Comparison with the literature
General reminder: Anderson impurity model and CTHYB solver
The TRIQS/CTHYB impurity solver
Setting up the impurity solver
Visualizing the imaginary time sampled
\(G(\tau)\)
Visualizing the Matsubara-frequency results
Single-orbital Hubbard model
Solution 1
Solution 2
Solution 3
Solution 4
Solution 5
Solution 6
Two-orbital Hubbard model
Solution 1
Solution 2
Solution of exercise 3
Valence-Bond DMFT solution of the Hubbard model
Analyzing the precomputed results
Two-particle Response
Fermions on the square lattice & perfect nesting
Square lattice with nearest-neighbour hopping
Non-interacting lattice Green’s function
Fermi surface nesting
Susceptibility
\(\chi_0\)
of non-interacting fermions
Theory
Fast calculation using Fourier transform
Goals and questions
Compute the susceptibility
\(\chi_0(\mathbf{q}, i\omega_n)\)
Static susceptibility
\(\chi_0(\mathbf{q}, \omega=0)\)
and perfect nesting
The random phase approximation (RPA)
RPA solver
Two-particle self consistency (TPSC)
Theory
Behaviour of
\(U_{sp}\)
and
\(U_{ch}\)
vs.
\(U\)
Finite temperature antiferromagnetism in two dimensional systems
Mermin-Wagner theorem
TPSC and the Mermin-Wagner theorem
Code from previous notebooks
\(\chi_0\)
calculator for arbitrary
\(\beta\)
RPA spin structure factor
\(S_{RPA}\)
as a function of temperature
\(T\)
TPSC spin structure factor
\(S_{TPSC}\)
as a function of temperature
Questions
Remarks
A tight-binding model on a square lattice
Learn more about Python, ipython and the notebook
Changelog
Version 4.0.0
Python bindings: cpp2py to clair + c2py
Renamings
Removal of deprecated API
Experimental package
Documentation
Dependency Management
General
gfs
mesh
det_manip
mc_generic
mc_tools
stat
operators
lattice
blockgf
py
plot
cmake
porting_tools
packaging
doc
jenkins
Version 3.3.3
General
blockgf
mc_generic
cmake
doc
jenkins
test
Version 3.3.2
General
Gf
doc
cmake
Version 3.3.1
General
doc
Version 3.3.0
General
Gf
atom_diag
doc
cmake
jenkins
Version 3.2.1
General
doc
jenkins
cmake
Version 3.2.0
Porting Script
API Changes
General
Gf
Meshes
DLR
Lattice
det_manip
mc_generic
MPI
Fixes
doc
cmake
jenkins
Version 3.1.1
cmake
doc
gf
Meshes
Version 3.1.0
Porting Script
Deprecate use of string indices for Green functions
Change in gf_struct objects
Green function meshes (C++)
Move multi-array into TRIQS/nda library
triqs::stat Rework
Bath discretization function
Jenkins Sanitizer Checks
New website theme
TightBinding and TBLattice improvements
Require C++20 capable compiler
General
atom_diag
cmake
cpp2py
doc
gf
jenkins
lattice
mc_generic
mesh
mpi
nda
Version 3.0.2
atom_diag
gf
cmake
Python 3.10
c++20
Version 3.0.1
Issue 819 - Atom Diag
General
array
Gf
cmake
jenkins
doc
Version 3.0.0
Renamings
Dependency Management
h5py dependency
Removal of deprecated API
General
atom_diag
cmake
detmanip
doc
gf
jenkins
operators
packaging
Version 2.2.3
General
cmake
cpp2py
gf
jenkins
Version 2.2.2
doc
gf
cmake
General
Version 2.2.1
doc
cmake
General
Version 2.2.0
Make range and itertools functionality standalone
Make mpi functionality standalone and change namespace
Non-owning views (C++)
Dynamic Analyzer Checks (ASAN, UBSAN)
No longer install googletest
app4triqs
arrays
cmake
doc
fourier
gf
h5
itertools
jenkins
mc_generic
mpi
lattice
operators
packaging
pytriqs
General
Version 2.1.1
jenkins
doc
cmake
General
Version 2.1.0
gf
array
clef
BlockGf
cmake
lapack
lattice
tail
det_manip
atom_diag
mc_tools
doc
General
pytriqs
fourier
Version 2.0.0
fourier,tail
cmake
hdf5
arrays
doc
gf/py
py
General
travis
gf
tail
pytriqs
pytriqs/gf
test
tail,fourier
Version 1.5
API changes
Version 1.4
Documentation
Installation
Many-body operators
Green’s functions
Tests
Version 1.3
Installation
Green functions
Many-body operators
Monte-Carlo tools
Determinant manipulation
HDF5
c++2py
Tests
Miscellaneous
Version 1.2
C++
Python
Green Functions
Version 1.1
Version 1.0
Python classes
Archives
About TRIQS
Authors & contributors
Citation
License
Disclaimer
Logo files
More
Contributing
Issues and feature requests
Contributing to code and documentation
How to make a pull request?
How to contribute to documentation?
Github discussions
Frequently-asked questions
Q: How do I write my GF data to text files, e.g. to plot using other plotting tools?
Q: How do I save the triqs hash and script for debugging purposes?
TRIQS
API Documentation
triqs.lattice
triqs.lattice.lattice_tools
triqs.lattice.lattice_tools.BrillouinZone
triqs.lattice.lattice_tools.BrillouinZone.reciprocal_matrix
View page source
triqs.lattice.lattice_tools.BrillouinZone.reciprocal_matrix
BrillouinZone.
reciprocal_matrix
Get the matrix
\(B^T\)
containing the reciprocal basis vectors as its rows.