This document describes the main changes in TRIQS.

Version 3.2.1

TRIQS Version 3.2.1 is a patch-release that includes a number of bug fixes and improvements to the documentation:

  • Fix Memory Error in det_manip try_insert function

  • Restore oplot functionality for MeshLegendre Green functions

  • Ubuntu 24.04 install instructions + Packages

  • Recommend use of Python virtualenvs on OSX

We thank all contributors: Thomas Hahn, Alexander Hampel, Dylan Simon, Nils Wentzell

Find below an itemized list of changes in this release.


  • Remove use of deprecated unittest.assertEquals

  • Bug Fix: Insufficient reserved memory in det_manip try_insert function

  • jenkins: make builduid configurable and dynamic

  • Fix block_gf constructor from mesh and list of block sizes

  • Restore oplot functionality for MeshLegendre Green functions

  • missing cstdint include, see issue #915

  • add l=1 support for function spherical_to_cubic


  • Improve DLR documentation in both C++ and Python

  • Update install instructions for osx and venvs

  • Update conda install instructions with custom environment commands and note for developers

  • Add Nevanlinna to application section on TRIQS Website

  • Add Ubuntu 24.04 (noble) to supported distributions

  • Remove Ubuntu 20.04 from supported distributions

  • fix doc string of k_space_path

  • Add OpenMP to list of build requirements

  • Convert README into markdown and add conda badge

  • Install gpg-agent in Ubuntu install instructions

  • Fix issue in layout.html #912


  • Synchronize ubuntu build environments with unstable

  • Update Dockerfile and Jenkinsfile to include relevant changes of unstable branch


  • Use Boost imported target and bump version requirement to 1.70

Version 3.2.0

TRIQS Version 3.2.0 is a release that

  • Introduces three Discrete Lehmann Representation (DLR) Mesh types

  • Adds conversion routines between DLR and existing Mesh types

  • Allows using symmetries for C++ Green function initialization and symmetrization

  • Extends the overloads for existing Python wrappings of various Gf related functions

  • Extends the Green function evaluation in C++ and Python

  • Makes all C++ Green function meshes consistent with a C++20 Mesh Concept

  • Raises compiler requirements to clang15+ and gcc12+

  • Fixes several library issues

We thank all contributors: John Bonini, Kacper Cybiński, Philipp Dumitrescu, Olivier Gingras, Thomas Hahn, Alexander Hampel, Collins Kariuki, Dominik Kiese, Igor Krivenko, Harry LaBollita, Rémi Lacroix, Henri Menke, Olivier Parcollet, Hugo U. R. Strand, Nils Wentzell, Jie Xiong

Find below an itemized list of changes in this release.

Porting Script

TRIQS 3.2.0 introduces interface changes (summarized below) that require adjustments in TRIQS-based applications. For convenient porting, we have updated our porting script that you can download and run in the top-level directory of your repository.

API Changes

  • Remove previously deprecated GfIndices class

  • Remove domains from meshes in C++ and Python, directly expose mesh parameters

  • In k_space_path, always return ticks as third argument

  • Remove ‘note’ member from BlockGf and Block2Gf

  • Rename extract_mesh to get_mesh and use it for simplification

  • Hamiltonian factory functions now take n_orb instead of orb_names

  • In mesh::brzone and mesh::cyclat take dims instead of periodization matrix

  • Rename function U_matrix to U_matrix_slater

  • Remove previously deprecated lattice tools API


  • Allow for symbolic printing of TBLattice objects using sympy expressions (#898)

  • Generalize Python ‘inverse’ function to allow for inversion of non-lazy / non-gf objects

  • Add complex_t as member type to gf and view types

  • Optimize interpolate_on_segment function, only check boundaries in Debug mode

  • Add free function is_op_hermitian to check on hermiticity of operators

  • Add support for c2py

  • Deprecate oplotr and oploti #477

  • Remove obsolete boost serialization

  • In triqs::stat add global count to accumulator

  • Add benchmark for GfInterpolation and ClosestMeshPoint access

  • Update 3.1 easybuild script with sha256 of release tarball

  • General library simplifications and cleanup

  • Regenerate GPL copyright headers for C++ and Python files

  • Fix all gcc and clang compiler warnings

  • Run clang-format on all source files


  • Add C++ gf_sym_grp class to use symmetries for (parallelized) gf initialization and symmetrization

  • Gf evaluation in Python and C++ can now take most arguments valid to […]

  • Add Python Gf Evaluation for more target types

  • Add Python Gf Evaluation for more MeshProduct combinations: (k,iw), (iw,k), etc.

  • Allow Idx in Gf Python Evaluation

  • Allow for parallelized initialization

  • Allow tau evaluation for legendre Green functions

  • Use Mesh concept in gf and gf_view

  • Extend make_gf_from_fourier wrappings to include more real-time Fourier transforms

  • Add complex_t as member type to gf and view types

  • Add test checking all BlockGf constructors

  • Extend gf_expr and gf_unary_m_expr to include regular_t member type

  • Extend set_from_pade python functions to scalar_valued, tensor_valued

  • Wrap tensor_valued<1> version of various Green function related functions

  • Add MemoryGf concept and use for various simplifications

  • Add gf::operatorindex_t overload for non-product meshes

  • Added array_priority to Gf, BlockGf, Block2Gf so rmul takes priority over ndarrays mul

  • Allow use of @ operator for Gf matrix multiplication in Python

  • In python allow linear interpolation of real-value Gtau + test

  • Test: Store block_gf to file in python and read in C++

  • Use nda::diagonal in implementation of density functions

  • Add deprecation warnings and mesh type check in deprecated classes GfImFreq, GfImTime, …

  • Printing a Gf/BlockGf in python now yields the same as repr(G), no longer ‘name’


  • Add MatsubaraFreq class in Python in correspondence to C++

  • Expose mesh parameters (beta, statistic,…) through member functions

  • Add Mesh, MeshPoint and MeshWithValues concept

  • Evaluate calls in brzone and cyclat now execute index modulo

  • Move interpolation routines out of meshes

  • Add parameter dependent mesh_hash to meshes in Python and C++

  • Default construct all mesh types to zero size

  • Use mesh_hash to check validity in gf accessors

  • Micro optimize closest_mesh_pt

  • Remove cluster_mesh, make mesh::brzone and mesh::cyclat standalone

  • Allow passing a window (pair of float) to mesh::imfreq/refreq and MeshImFreq/MeshReFreq

  • In mesh::brzone rename variable n_l to n_k

  • Use n_iw over n_pts in mesh::imfreq

  • Add proper ostream print overload for mesh::retime

  • Add t_min and t_max functions to mesh::retime

  • Add proper ostream print overload for mesh::refreq, add omega_min() member function


  • Add dlr mesh types in C++: dlr, dlr_imtime, dlr_imfreq

  • Add dlr mesh types in Python: MeshDLR, MeshDLRImTime, MeshDLRImFreq

  • Add plot protocol for MeshDLRImTime and MeshDLRImFreq

  • Free dlr functions to allow for multi-variable meshes

  • Extend support for new meshes in relevant Python Descriptors

  • Extend density function + test

  • Make flatironinstitute/cppdlr a dependency


  • Update SuperLattice after removal of deprecated TBLattice API

  • Remove deprecated functionality in TBLattice and TightBinding

  • Add LatticePoint class and conversion to/from bravais_lattice::point_t

  • Use Euclidean distance in brzone closest_mesh_pt + tests


  • Avoid ASAN false positive in complete_refill

  • Address issue #868, ksi matrix should be constrained to current insertion size

  • Iterate on implementation of rank-k updates in det_manip

  • Allow for rank-k insertions / removals

  • Added swap_row and swap_coli


  • Implement higher-rank updates in mc_generic + tests

  • Expose function in the public interface

  • Review PR for reporting measurements in ETA status messages

  • Remove file impl_tools.hpp and use concept checks to replace its template functions

  • Allow negative n_cycles in mc_generic: run until callback or signal stop #679

  • Allow reporting of measurements during accumulation


  • Use mpi poll barrier in python to reduce CPU (#845)

  • Add cray-mpich support in mpi layer

  • For unrecognized mpi environments, force MPI_INIT using FORCE_MPI_INIT envvar

  • Improvements to triqs.utility.mpi.all_reduce


  • Allow name_block_generator as only argument to BlockGf constructor (#620)

  • Generalize CallProxyNone for multiple arguments and throw proper exception Fix #846

  • Assert dimensions of Sigma to match hopping (#859)

  • In U_matrix_slater support wannier90, QE, and Vasp basis (#860)

  • Make result of trace_rho_op real if operator and rho are hermitian (#871)

  • Fix bug in is_convertible of block2_gf (#872)

  • Fix Issue #881

  • Fix after gf_struct changes (#907)

  • Fix arithmetic inplace operations for block2_gf

  • Fix bug in oplot, propagate options to all plots in a figure

  • Fix bug in oplot for legendre Gfs

  • Fix histogram plotting via oplot

  • Fix bug in gf mesh and shape constructor

  • Fix issue with fit_hermitian call signature in fit_hermitian_tail implementation

  • Fix issue in TB_from_pythTB function

  • Fix Super Lattice Orbital_Names not being of type string

  • Fix bug in gf_expr where scalar_wrap captured it’s value by reference

  • Fix many_body_operator_real cpp2py is_convertible check

  • Fix density function for MeshReFreq Gf

  • Fix numpy imports in test/python/base/

  • No longer use deprecated numpy types etc.

  • Add missing import in h_int_kanamori implementation

  • Correct issue in mesh imfreq print message

  • Avoid use of static pyref as lifetime may extend beyond interpreter

  • In mesh/bases/linear.hpp implement all mesh_point operations with perfect forwarding

  • Properly forward arguments in Matsubara frequency operations

  • Protect brzone::mesh_point_t::value function against race conditions


  • Introduce new TRIQS logo and add files to git repository

  • Change mesh documentation to use statistic keyword over S

  • Add simple build script for triqs + apps (#891)

  • Various doc improvements in mesh implementations

  • Various doc improvements in brillouin_zone and bravais_lattice

  • Adjust singularity section to use apptainer instead

  • Improve BlockGf documentation

  • Requirements: Update Boost minimum version.

  • Add GMP to the list of requirements

  • Improve Documentation of AtomDiag function

  • Replace apt-key add in commands to add debian repository

  • Update Ubuntu prerequisites install instructions, include also python3-clang

  • Simplify brew osx instructions

  • Bump Compiler and cmake version requirements, allow IntelLLVM >= 2023.1.0

  • Add/improve documentation for various wrapped mesh-types and lattice_tools classes

  • Simplify calls to plot directive

  • Update sphinxext.numpydoc.plot_directive, adjust default plot options

  • Adjust documentation examples to library changes and cleanup

  • Update osx install instructions to account for change in brew prefix

  • Slightly extend description of SOM on applications page

  • In ‘UserGuide’ section use TRIQS Python tutorial series over previous code samples

  • Add doc string to AtomDiag python-function and classes

  • Add documentation to wrapped class TightBinding and slightly adjust C++ doc

  • In Ubuntu install instructions include 22.04, remove 18.04, mention and new packages

  • Include list of requirements in toctree for build-from-source prerequisites

  • Fix Ubuntu install instructions with proper openmpi include dir

  • Fix include path for openmpi header files

  • Fix singularity commands in install.rst

  • Fix filenames in various literalincludes for doc/userguide/c++

  • Fix include issue in documentation/manual/mpi


  • Require OpenMP as a library dependency through nda

  • Update dependencies to latest versions and release branches

  • Bump Version numbers for dependencies itertools/mpi/h5/nda/cppdlr

  • Update Findsanitizer.cmake to include TSAN and MSAN and minor fixes

  • Bump cmake requirement to 3.20

  • Update compiler version checks

  • Add target for compiler warnings

  • Disable c++20 compat warnings

  • Clone cppdlr dependency through public git repo

  • Include fmt 9.1.0 as dependency and install it

  • Fix issue in extract_flags.cmake where generator expressions where not properly removed from flags

  • Compile benchmarks with google-bench when -DBuild_Benchs=ON is used

  • General cmake cleanup


  • Update Dockerfiles for linux builds to use gcc12 / clang15

  • Install pandoc into Dockerfile.ubuntu-clang

  • Use sphinx<6 in doc build environments

  • Specify LAPACK_ROOT for osx builds

  • Update osx build to use gcc 13

  • Bump timeout limit to 2 hours

  • Fix CC CXX environment variables in Dockerfile.ubuntu-gcc

Version 3.1.1

TRIQS Version 3.1.1 is a patch-release that improves/adds documentation for

  • Ubuntu 22.04 install instructions + Packages

  • various mesh, domain-types and lattice-tools in C++ and Python

  • wrapped classes: AtomDiagReal, AtomDiagComplex This release also introduces small API improvements to some mesh-types.

Find below an itemized list of changes in this release.


  • Revert a7a4cd: CPLUS_INCLUDE_PATH and LIBRARY_PATH still relevant to cpp2py

  • Fix Findsanitizer.cmake for new asan/ubsan runtime location with clang13+


  • Update install instructions to include Ubuntu 22.04, remove 18.04, mention new packages

  • Add/improve documentation for various wrapped mesh-types and lattice-tools classes

  • Add/improve documentation for various triqs::mesh constructors

  • Add doc string to AtomDiag python-function and classes

  • Add documentation to wrapped class TightBinding

  • Include list of requirements in toctree for build-from-source prerequisites


  • Printing a Gf/BlockGf in python now yields the same string as repr(G), no longer print only ‘name’


  • Allow passing a window (pair of float) to mesh::imfreq/refreq and MeshImFreq/MeshReFreq

  • Improved keywords (n_iw, n_tau, …) for python mesh construction + backward compatibility layer

  • Add proper ostream overload for mesh::retime, mesh::refreq

  • Add t_min() and t_max() member functions to mesh::retime

  • Add omega_min() member function to mesh::refreq

  • Make variable naming more consistent in various C++ mesh and domain implementations

  • matsubara_domain now prints statistic field as string

  • Update 3.1 easybuild script with sha256 of release tarball

Contributors: Nils Wentzell

Version 3.1.0

TRIQS Version 3.1.0 is a release that

  • separates out the multi-array functionality into TRIQS/nda

  • restructures the C++ Green function meshes

  • improves the lattice functionality

  • introduces reworked statistics component

  • introduces a new website theme

  • fixes several library issues

We thank all the people who have contributed to this release: Sophie Beck, Maxime Charlebois, Philipp Dumitrescu, Alexander Hampel, Jonathan Karp, Igor Krivenko, Henri Menke, Olivier Parcollet, Markus Richter, Dylan Simon, Hugo U. R. Strand, Andreas Weh, Nils Wentzell, Rok Žitko

Porting Script

TRIQS 3.1.0 introduced a changes (summarized below) that require adjustments in TRIQS-based applications. For convenient porting, we have updated our porting script that you can download and run in the top-level directory of your respository.

chmod u+x port_to_triqs3

Make sure to review all changes before you commit them. If you run into problems porting your application to this release, feel free to contact us by opening a discussion on github.

Deprecate use of string indices for Green functions

In previous versions of TRIQS it was possible to use string indices when accessing the matrix structure of a Green function in Python

g = GfReFreq(indices = ['s','d'], window = (-2, 2), name = "s+d")
g['d','d'] << Omega - 1.0
g['d','s'] << V
g['s','d'] << V
g['s','s'] << Omega - 2.0

We are deprecating this feature due to lack of use and the implementational complexity that this introduces in the library. Integer indices should be used instead

g = GfReFreq(target_shape = (2, 2), window = (-2, 2), name = "s+d")
g[0, 0] << Omega - 1.0
g[0, 1] << V
g[1, 0] << V
g[1, 1] << Omega - 2.0

Change in gf_struct objects

The aforementioned deprectation goes along with a change in the objects describing the structure of block-diagonal green functions, in our documentation and tutorials often called gf_struct.

Python expressions of the kind

gf_struct = [ ("up", [0, 1]), ("dn" : [0, 1]) ]

should be replaced by

gf_struct = [ ("up", 2), ("dn", 2) ]

In other words, we ask that you only provide the linear matrix size of each block instead of a list of indices. Correspondingly, the C++ type triqs::gfs::gf_struct_t has changed from

std::vector<std::pair<std::string,std::vector<std::variant<int, std::string>>>>



Note that we provide backward compatibility layers in most effected functions and in particular in the interfaces of our applications TRIQS/cthyb, TRIQS/tprf and TRIQS/dft_tools.

Green function meshes (C++)

The Green functions are now templated directly on the mesh types, making the gf_mesh template obsolete. The meshes were further regrouped in the triqs::mesh namespace with some renamings:

  • gf_mesh<imfreq> -> mesh::imfreq

  • gf_mesh<cyclic_lattice> -> mesh::cyclat

  • gf_mesh<brillouin_zone> -> mesh::brzone

  • gf_mesh<cartesian_product<..>> -> mesh::prod<..>

We have kept aliases for backward compatibility.

This means for example that

 auto m = gf_mesh<imfreq>{....};
 auto g = gf<imfreq>{m, {1,1}};

should now read

 auto m = mesh::imfreq{....};
 auto g = gf<imfreq>{m, {1,1}}; // as before

The triqs::lattice::brillouin_zone was previously used both as the Brillouin Zone domain type and as the tag for the associated mesh. If your code uses this class you should replace those occurrences where the latter meaning applies with mesh::brzone. In short:

  • triqs::lattice::brillouin_zone represents the Brillouin Zone domain

  • triqs::mesh::brzone is the mesh on this domain


  auto m = gf_mesh<brillouin_zone>{....};
  auto g = gf<cartesian_product<brillouin_zone,imfreq>> {{m, ...}, ....};


  auto m = mesh::brzone{....};
  auto g = gf<prod<brzone,imfreq>>{{m, ...}, ....};

Backward compatibility help:

  • gf_mesh is aliased to T, with deprecation.

  • porting script mentioned above

Move multi-array into TRIQS/nda library

We have moved the multi-array functionality out of the TRIQS library and into the TRIQS/nda repository. TRIQS/nda is a standalone multi-array library that does not depend on any components of triqs.

Note that most of the classes and functions previously available in the triqs::arrays namespace are now defined in the nda namespace. The relevant header files for nda are

  • nda/nda.hpp for array, matrix, vector, their view classes, arithmetic ops and algorithms

  • nda/h5.hpp for hdf5 read and write functions

  • nda/mpi.hpp for mpi functionalities

  • nda/linalg.hpp for linear algebra functions

triqs::stat Rework

This release includes a rework of the statistics routines in triqs. Associated with this, we have renamed this part of triqs from “statistics” to “stat” in C++ namespace, C++ headers, python module (where wrapped), and documentation.

The main object of triqs::stat is the so-called accumulator class. This class takes in measurements during a Monte Carlo simulation and serves a dual purpose: (a) to perform logarithmic binning which can be used to estimate the auto-correlation time, (b) to perform linear binning to compress and the store data for further processing. The design is flexible –- either log or lin binning can be turned off – in order to be useful in different cases. (Note: In this version, the estimation of the auto-correlation time is purposefully not fully automatic. Some user choice is required to turn the binning data into an auto-correlation time estimate).

triqs::stat also includes function to calculate mean and standard errors (both single thread and mpi version) as well as new jackknife routines (single thread and mpi versions).

Throughout, care has been taken to use numerically stable algorithms, especially when computing variances (mostly two-pass or Welford).

The deprecated “statistics.hpp” including classes binned_series, ts_observer, jackknife, observable were removed.

The histogram class histogram is generally unchanged except header name / namespace changes.

Documentation can be found at

Bath discretization function

To fit a given hybridization function, either in imaginary frequency or time we provide now a bath discretization function ( Given a input delta_in and a number of bath sites Nb the function will fit Nb bath energies and hoppings on the input Green function mesh. The optimization is performed using scipy optimize minimizer BFGS (+basin hopping) or Nelder-Mead. More information can be found in the doc string.

We also added a function make_delta in to construct a hybridization function on the imaginary axis for given hoppings and bath energies.

features of discretize_bath:

  • allow to fit BlockGf objects, with blocks of arbitrary size

  • allow to fit complex hybridization functions

  • fit is directly performed on iw or tau depending on the input

  • Nelder-Mead, or gradient based minimizer BFGS and basin hopping BFGS from scipy

  • input guesses can be provided either as complete guess for the hoppings and / or energies, or as a single value for all hoppings

  • if no guess for the hoppings is passed, the first guess is constructed from: lim_{iw->inf} iw * Delta(iw) or from -Delta(0) - Delta(beta) correspondingly.

Jenkins Sanitizer Checks

We have extended our Jenkins CI setup to run the tests of TRIQS and compiled applications with LLVM sanitizer checks enabled. In particular we make use of the AdressSanitizer and the UndefinedBehaviorSanitizer to catch various kinds of memory errors (e.g. out of bounds memory access) and undefined behavior during testing. This helps us to catch dangerous bugs early.

New website theme

We changed the sphinx theme of the documentation to the read the docs theme. The navigation of the website is done with a vertical sidebar on the left. Additionally we fixed various broken references in the code manual, that sphinx could not build. This theme is also deployed for all other triqs applications in version 3.1.0. If you should find any broken websites please open an issue.

TightBinding and TBLattice improvements

We have improved the user interface for the tight-binding objects both in C++ and Python. This effects the C++ class triqs::lattice::tight_binding as well as the Python classes triqs.lattice.TightBinding and triqs.lattice.TBLattice. All classes now provide member functions fourier(k) and dispersion(k) to calculate h(k) and its energy spectrum for single k-points, arrays of k-points and even on a given k-point mesh. We also deprecate the function hopping, which is now equivalent to fourier due to its confusing name.

We have further added additional Python utility functions triqs.lattice.utils

  • TB_from_wannier90: Create TBLattice object from a wannier90 output file

  • TB_from_pythTB: Create TBLattice object from pythtb.tb_model

  • k_space_path: Generate a Brillouin Zone path and relevant plotting information

Require C++20 capable compiler

TRIQS 3.1.0 uses features from the C++20 standard. To compile this release from source, a modern compiler is required. In particular we support

  • g++ 10.0 and higher

  • clang 13.0 and higher

  • IntelLLVM (icx) 2021.3.0 and higher

See below for an itemized list of changes in this release


  • Major update to port_to_triqs3 porting script including mesh, lattice and nda changes

  • Allow compilation with IntelLLVM One-API Compiler

  • Add discretize bath function for Delta_tau and Delta_iw objects (#802)

  • Add operator utility functions: filter_op, quadratic_terms, quartic_terms, block_matrix_from_op, op_from_block_matrix

  • Remove deprecated python modules triqs.archive,, triqs.utility.mpi_boost

  • Generalize triqs::utility::kronecker for arbitrary arithmetic types and refs

  • Protect pade function against invalid n_points arguments

  • Extend table_imports in to include mesh namespace

  • Fix printing of cxxflags and ldflags in triqs++ compiler wrapper

  • Fix deprecation warnings

  • Replace REQUIRES macro with requires

  • Fix various compiler warnings


  • Fix #833: Incorrect transform to eigenbasis in get_op_mat function

  • Fix #825: quantum_number_eigenvalues returned incorrect values when constraining the number of particles

  • Expose atom_diag constructor for limiting particle subspaces to python

  • Provide access to fock_states and unitary matrix by subspace without copy

  • Implement autopartition with additional effective hybridization term in block determination of atom_diag.

  • Adjust atomdiag implementation after change in convention of nda::linalg::eigenelements

  • Add function get_subspace_dims to atom_diag

  • Expose block-structure constraining constructor to python

  • Allow broadcasting of the eigensystem_t

  • Smaller code cleanups


  • Bump cmake version requirement to 3.12.4

  • Bump TRIQS version number to 3.1.0

  • Require c++20 standard and specify through target_compile_features(… cxx_std_20)

  • Bump compiler version checks to guarantee gcc>=10 or clang>=13

  • Install into share/triqs and not share, update doc

  • Switch Build_Deps default from IfNotFound to Always

  • Add dependency on nda version 1.1 and adjust triqs build accordingly

  • Bump version requirements for mpi, itertools and h5 to 1.1

  • Allow use of IntelLLVM compiler starting version 2021.3

  • Do not install when install prefix is /usr/local

  • Fix issues with build option -DPythonSupport=OFF

  • No longer set CPLUS_INCLUDE_PATH and LIBRARY_PATH in, already done through cmake target

  • Force-set imported targets to global also in

  • Fix warnings in FindMathJax.cmake and FindSphinx.cmake

  • Use googletest main branch (live-at-head) instead of release-1.10.0

  • Remove use of linktime optimizations and cleanup IPO section in CMakeLists.txt

  • Treat all cmake options before adding subdirectories

  • Fail if Build_Documentation AND NOT PythonSupport

  • In extract_flags.cmake inspect INTERFACE_COMPILE_FEATURES and add -std=… flags accordingly

  • Use find_XXX(… HINTS …) over find_XXX(… PATHS …) to not prioritize system dirs


  • Fix py_converter should always return a gf, cleanup in gf converters

  • Require C order for conversion from numpy to nda::array and vice versa


  • Change website theme to sphinx rtd

  • Generate Python Reference Documentation using sphinx autosummary + templates

  • Update install instructions extend conda installation instruction (#796)

  • Remove doc for triqs::arrays and old statistic tool

  • Update documentation examples after triqs mesh rework

  • Merge 3.0.1 and 3.0.2 changelog

  • For osx install numpy, scipy, mpi4py through pip3 instead of brew

  • Remove first_mesh(…) function

  • Fix various rst errors and warnings

  • Various smaller doc improvements

  • Make sure to install ttf, woff2 and eot files


  • Change gf_struct_t to vector<pair<string, long>>

  • Add h5 backward compatibility layer through h5_read_gf_struct function

  • Extended tests of the multivar clef functionality

  • Fix density function for GfReFreq resulting in non hermitian density matrix (#829)

  • Add helper function imag(gf) + test

  • Add block_gf constructor from mesh and std::vectorstd::integral

  • Add function block_sizes to block_gf and block_gf_view

  • Wrap make_gf_from_fourier(block_gf, n_iw / n_tau) to python

  • Fix issue in block_gf and block2_gf scalar arithmetic + test

  • Fix python gf multiplication for nondiagonal matrix shapes + Test

  • Fix make_real_in_tau and is_gf_real_in_tau for matrix_valued Gfs

  • Add test for on comparison of gf with transpose of self

  • Protect evaluate template function to take only gf types

  • Replace conj_r by conj to match changes in nda

  • No longer use mako.template for block_gf implementation

  • Bugfix: Fix getitem and setitem for rank1 Gfs

  • Check that block sizes provided in gf_struct are of type int

  • Fix issue in operator= for default constructed block2_gf

  • Adjust set_operator_structure function to gf_struct changes and and backward compat layer

  • Extend gf_base test to cover slicing in combination with gf evaluation

  • Add function fix_gf_struct_type for the conversion of old gf_struct objects


  • Use gcc-10 or LLVM 13 in all Ubuntu build environments

  • Add LLVM sanitizer instructed build for TRIQS and all applications

  • Disable bionic and centos builds

  • Use gcc-11 for OSX builds

  • Add nda dependency build trigger

  • For cpp2py/itertools/mpi/h5 trigger builds only through nda

  • Increase parallelism to -j4

  • Install rtd-theme sphinx and nbsphinx through apt

  • Install libomp in all Docker build environments

  • Ignore build directories in dockerignore

  • In packaging/Dockerfile.msan add msan instructed zlib and use it in libhdf5

  • Set MSAN_OPTIONS in packaging/Dockerfile.msan

  • In MSAN image fix build of libcxx / libcxxabi and bump libevent / openmpi versions

  • Consistently install libgfortran5 over libgfortran4 in ubuntu Dockerfiles

  • Update Ubuntu version in Dockerfile.ubuntu-clang to 21.04 to resolve sphinx comp issues

  • In Dockerfile.sanitize disable asan alloc_dealloc_mismatch to avoid libc+±13 false positive

  • Install libunwind-dev for ubuntu-clang doc building environment

  • Remove ambiguous Dockerfile.ubuntu-focal-clang


  • Update osx python path for 3.9

  • More explicit node allocation

  • Add ansiColor support


  • Fix mesh::brzone interpolation for non-orthogonal basis vectors, extend python and c++ tests

  • Rework cluster_mesh API and clean-up implementation

  • Add function fourier(k) to tight_binding to calculate h_k

  • Add function dispersion(k) to tight_binding to calculate eigenvalues of h_k

  • Expose tighbinding functions fourier(k) and dispersion(k) to python

  • Add displ_vec and overlap_mat_vec member functions to tight_binding and add python bindings

  • Make all triqs.lattice objects h5read/writeable, printable, comparable

  • Add TBLattice parser for pythTB and add test

  • Add TBLattice parser for wannier90 and add test

  • Add TBLattice.get_kmesh(n_k) and TBLattice.get_rmesh(n_k) functions

  • Document/Cleanup TBLattice and deprecate inconsistent API, Extend bravais_lattice interface

  • Add function k_space_path to triqs.lattice.utils + test

  • Fix error in TBSuperLattice __repr__function

  • Extend test with np.linalg.eigvalsh check of dispersion

  • Change type of periodization_matrix from matrix to matrix

  • Expose brillouin_zone.units as property to python and not as function

  • Merge tprf extensions to TBLattice and TBSuperLattice

  • Make cross-construction between bravais_lattice and brillouin_zone explicit

  • For both brillouin_zone and bravais_lattice use ndim instead of dim to get the number of dimensions

  • Update python bindings for MeshBrZone and MeshCycLat

  • Fix C order problems in SumK


  • Use mpi::monitor to properly stop on rank-selective exception

  • Simplify logic flow in mc_generic exception logic

  • Revert to using report stream for mc_generic status message

  • Clear move statistics in the beginning of each call to run(…)

  • Fix: In clear_statistics of move_set, properly recurse into other move_sets

  • Add functions to clear list of measurements


  • In linear mesh set del to zero for meshes with n_pts==1

  • Introduce MeshBrZone and MeshCycLat in Python

  • Use abbreviation brzone instead of b_zone,

  • Regroup all mesh types and template gf directly on the mesh

  • Simplify return type for get_interpolation

  • Rewrite and cleanup the multivar evaluation

  • Regroup evaluation code in one file

  • Rename matsubara_mesh_opt to imfreq::option

  • Remove size_of_components from concept

  • Remove foreach


  • Make sure that the triqs.utility.mpi functionality works without mpi environment

  • FIX: Do not specify root argument for call to mpi::all_reduce

  • In test main function call initialize mpi only when mpi::has_env


  • Replace macros.hpp by nda/macros.hpp

  • Remove arrays, clef, no-built example, minivec, old statistics

  • Generic make_regular implementation is provided by nda

  • Change range_all to nda::range::all_t

  • Consistently use nda:: over arrays::

  • Replace any occurance of clef::_ph by clef::placeholder to account for renaming in nda

  • Replace any clef::placeholder_prime by clef::placeholder

Version 3.0.2

TRIQS Version 3.0.2 is a patch release that fixes a number of issues and restores compatibility with Python 3.10 and C++20 compilers.

We provide a more detailed description of the changes and fixes below.


  • Fix an issue where triqs::atom_diag::quantum_number_eigenvalues returns incorrect values when constraining the number of particles (#825)


  • Fix density function for GfReFreq resulting in non hermitian density matrix (#829)

  • Protect against bug in cluster_mesh: Throw for non-diagonal periodization matrices

  • Fix a bug in the interpolation for Green functions with a gf_mesh<brillouin_zone> that occured when the underlying bravais_lattice was not a square lattice


  • Switch default for cmake option Build_Deps from IfNotFound to Always

Python 3.10

  • Fix Sequence import, should be from


  • Stop using deprecated template class std::iterator<…>

  • Replace std::result_of by std::invoke_result

Contributors: Weh Andreas, Alexander Hampel, Igor Krivenko, Nils Wentzell

Version 3.0.1

TRIQS Version 3.0.1 is a patch release that fixes a number of issues. In particular a crucial issue in relation to the atom_diag class was resolved.

We provide a more detailed description of the changes and fixes below.

Issue 819 - Atom Diag

For certain Hamiltonians and orderings of the fundamental_operator_set the atom_diag class would yield incorrect eigenenergies. Please refer to issue #819 for more details.

We provide a simple mechanism to detect if a given model was affected by the issue. By setting the runtime environment variable CHECK_ISSUE819 to an arbitrary value with e.g. export CHECK_ISSUE819=1 before starting the calculation, TRIQS will now throw an exception if the model was affected before.

This bug was fixed in pull request #820.


  • Add block_matrix to cpp2py converter table

  • Add missing includes in utility/variant_extensions.hpp

  • Add missing #pragma once in utility/variant_extensions.hpp

  • Increase tolerance in test_delta_infty

  • Use unittest assert methods for better errors


  • For triqs::arrays::vector operator /= fall back to array solution FIX #793

  • Fix issue with slicing of array and matrix proxies


  • Fix issue in block_gf / block2_gf scalar arithmetic + test

  • Fix issue in operator= for default constructed block2_gf

  • Extend gf_base test to cover slicing in combination with gf evaluation


  • Change required cpp2py branch to 2.0.x

  • Correction issue in

  • Treat cmake options before adding build dirs, fail if Build_Documentation AND NOT PythonSupport

  • Link triqs_py against proper namespaced cpp2py target

  • Smaller fixes for nopython build


  • Updates for new jenkins node

  • Switch osx to gcc-11


  • Updates to install.rst

  • Extend conda installation instruction

  • oplot: Replace remaining occurances of RI by mode

  • In osx install instructions install numpy scipy and mpi4py through pip3 instead of brew

Contributors: DerWeh, Alexander Hampel, Igor Krivenko, Henri Menke, Dylan Simon, Hugo U. R. Strand, Nils Wentzell, Rok Žitko

Version 3.0.0

TRIQS Version 3.0.0 is a major release that

  • introduces compatibility with Python 3 (Python 2 no longer supported)

  • separates out the h5, mpi and itertools functionality of the TRIQS library

  • fixes several library issues

A guide with instructions on how to port your application can be found here. We provide a detailed list of the changes below.

We thank all the people who have contributed to this release: Alexander Hampel, Olivier Parcollet, Malte Schueler, Hiroshi Shinaoka, Dylan Simon, Nils Wentzell, Manuel Zingl, Rok Žitko


The separation of various TRIQS library functionalities into their own repositories made it necessary to rename various Python modules as well C++ header files. In addition, we have decided to rename the top-level Python module of TRIQS from ‘pytriqs’ to ‘triqs’. These renamings can be automated using the porting script that we provide. Please refer to our porting guide for more detailed instructions.

Dependency Management

We are managing the interdependencies of the various library components cpp2py, h5, mpi and itertools using cmake. Per default cmake will pull those dependencies from their corresponding GitHub repositories, build them, and install these components together with TRIQS, unless they are found in your system. This behavior can be altered using the additional cmake options

  • -DBuild_Deps="Always" - Always build dependencies, do not try to find them

  • -DBuild_Deps="Never" - Never build dependencies, but find them instead

during the configuration step.

h5py dependency

The dependency on h5py has been a source of of problems in setting up the TRIQS library for many users. We are glad to report that TRIQS 3.0 is no longer dependent on h5py, and instead provides the necessary Python bindings directly in the h5 repository, which per default is built and installed together with TRIQS.

Removal of deprecated API

Some parts of the TRIQS library API that have been deprecated in earlier releases were removed. This includes,

InverseFourier, set_from_inverse_fourier, make_gf_from_inverse_fourier, triqs.applications.XXX, g.N1, g.N2, g.beta, g.statistic, g.indicesL, g.indicesR

for the Python API and

block_gf.domain(), block_gf.mesh(), get_gf_data_shape, get_target_shape

in C++. Note that the porting script will replace some of these with the proper syntax.


  • Port TRIQS and Cpp2Py from Python 2 to Python 3

  • Remove dependency on h5py package

  • Depend only on header-part of Boost library

  • Rename the pytriqs module to triqs

  • Add porting script porting_tools/port_to_triqs3

  • Split of libpython dependent part of libtriqs into seperate library libtriqs_py

  • Remove redundant headers boost_serialization.hpp and serialization.hpp

  • Use std::complex_literals::operatori and remove custom operator_j

  • Remove triqs/utility/variant.hpp and use std::variant instead

  • Make sure that histograms are == comparable in both C++ and Python + Test

  • Remove redundant ostream operator<< for std::array, conflicting with nda

  • Removal of deprecated parts of Python API

  • Removal of deprecated parts of C++ API

  • Avoid use of optional.value() for improved osx compatibility

  • Disable stacktrace implementation on Mac OS due to failure on OSX10.15 (Catalina)

  • Various improvements to triqs++ compiler wrapper

  • Fix issues with simultaneous execution of various c++ tests

  • Fix bug in lattice tools dos function

  • Cpp2pyInfo class no longer requires a base-class

  • Regenerate GPL Copyright headers

  • Various smaller bugfixes / improvements


  • Make python classes AtomDiagReal and AtomDiagComplex serializable using h5

  • Test h5 serialization of atom_diag real/cplx in c++

  • Allow mpi broadcasting of AtomDiag objects using the h5 serialization

  • In atom_diag h5_read / h5_write, make sure to treat all member variables

  • Add operator== for atom_diag objects for c++20 compatible compilers

  • Fix fill_first_eigenstate_of_subspace for case of zero subspaces


  • Bump TRIQS Version number to 3.0.0

  • Bump cmake version requirement to 3.3.2

  • Add external_dependency.cmake file with function for external dependency management

  • Make cpp2py, h5, mpi, itertools, gtest a dependency using add_external_dependency

  • Remove dependence on Boost serialization and clean cmake

  • Add deps/CMakeLists.txt file to manage dependencies

  • In extract_flags.cmake, protect extraction of -L/usr/lib and -I/usr/include

  • Disable warnings about comma operator in array subscript

  • Extend extract_flags.cmake to treat compiler-specific generator expressions properly

  • In extract_flags allow extraction of BUILD_INTERFACE flags

  • Fix install permissions for triqs++ compiler wrapper

  • No longer add ‘-Og’ for debug builds

  • Use -std=c++20 compiler flag if available

  • Add -fconcepts flag only for gcc in c++17 mode

  • Split off libpython-dependent code into seperate libtriqs_py library

  • Suppress certain mpi warnings for ref-file based tests

  • Print file differences for failing ref-file based tests


  • Use namespaced targets for dependencies mpi/itertools/h5

  • Add a warning if ASAN/UBSAN is used without Build_Deps=Always

  • Use cmake_policy(VERSION …) over cmake_policy(SET …)

  • Various cleanings in c++/triqs/CMakeLists.txt

  • In TRIQSConfig.cmake, properly find target dependencies with find_dependency

  • Refactor extract_flags macro and helper functions into cmake/extract_flags.cmake

  • Explicitly set CMake Policy CMP0057 and CMP0074 to NEW

  • Adjust add_python_test to take MPI_NUMPROC argument for mpi testing

  • Use PYTHON_EXECUTABLE over PYTHON_INTERPRETER to be consistent with gtest and pybind

  • Make sure to define H5_USE_110_API when compiling against hdf5 1.12

  • Consider both PKG_ROOT and PKG_BASE env variables in find-modules for NFFT, GMP, FFTW

  • Properly set MATHJAX_PATH in url fallback solution

  • Create separate targets for gmp and gmpxx and only link against the first

  • Add macro add_mpi_test and make sure test executables are found by mpich

  • Allow finding cpp2py in the system

  • Use CPP2PY_XXX python variables over bare ones to avoid issues with preinstalled cpp2py

  • Use FindGit.cmake in external_dependency.cmake, Improve error message on clone failure


  • Remove regenerate on singular det, Throw in regeneration


  • Add porting guide: doc/

  • Update Ubuntu install instructions for TRIQS 3

  • added NRGLjubjana_interface to the list of impurity solvers

  • updated applications page to include new hubbardi version 2.2

  • Fix example code

  • Generate extended toctree for manual documentation pages

  • Update easybuild install instructions for 3.0.0 images

  • Change the Mathjax fallback solution to use version 2.7.8 @ github

  • Add advice on VERSION changes in top-level CMakeLists.txt to porting guide

  • Update documentation in histograms python module

  • Remove h5py from the list of dependencies

  • Fix various c++ and python examples after Python3 port

  • Update installation page to include Section on Anaconda packages

  • Consistently use r/w/a over old hdf5 file modes H5F_ACC_TRUNC …

  • Change order in OSX install instructions to not use brew clang for the pip no-binary installs

  • Fix CC/CXX export commands in osx install instructions

  • Bump cmake version requirement to actual required version

  • Update link to install page in README to use latest stable version

  • Adjust introduction on install page, recommend use of stable releases

  • Update list of requirements

  • Various smaller improvements


  • Disable automatic tailfit in fourier transform of real-frequency Green functions

  • Deprecate the use of string indices

  • Allow pytriqs Gf initialization with g[:] = RHS and add test FIX #773

  • Provide is_gf_hermitian in python also for imtime and tensor_valued<4>

  • Compare block_names also in c++ functions assert_block[2]_gfs_are_close

  • Fix warning about improper np.array access pattern

  • Properly compare gf indices in tests, fix improper indices construction in various spots

  • Fix defintion of density matrix in density(gf_const_view gl)

  • Check that meshes are compatible in lshift assignment

  • When constructing Gf from data, be sure to check compatibility to the mesh

  • Allow fourier transform of real-valued imag/real time Green functions

  • Add comparison operators and output operators to the gf_indices type

  • Add deduction guides for gf{gf_expr} statements

  • Bugfix in block_gf(mesh, gf_struct) constructor for scalar_valued gf

  • Add imaginary time versions of make_hermitian to the pytriqs gf factories

  • Fix wrapper for make_adjoint_mesh(gf_mesh)

  • Change default tolerance of is_gf_hermitian from 1e-13 -> 1e-12

  • Fix make_hermitian and is_gf_hermitian for real-valued Green functions

  • Fix bug in return type of positive_freq_view(gf&) and add test FIX #764

  • Store block_names in block_gf and block2_gf as list of str instead of nparray


  • Align Dockerfiles with app4triqs skeleton

  • Install lldb debugger into ubuntu and centos base images

  • Set CC and CXX env variables in centos-gcc base image

  • Set BUILD_ID to avoid caching

  • Restore and correct PYTHONPATH for apps

  • Force hdf5 1.10 for OSX builds

  • add workaround for centos buggy openmpi

  • Mark test failures as UNSTABLE

  • Add upstream triggers for external dependencies

  • Provide vim in packaging base images for error analysis

  • Switch to centos build to centos 8

  • Update build scripts for Python3


  • Change comparison of many_body_operator_generic to const


  • Various updates/improvements to memory sanitizer compatible Docker environment (packaging/Dockerfile.msan)

  • Generate and test debian packages for Ubuntu 20.04, adjust dependencies

Version 2.2.3

TRIQS Version 2.2.3 is a bug-fix release. In addition to various smaller fixes we improved the usability of TRIQS in conjunction with the LLVM Memory Sanitizer and the usability of the triqs++ compiler-wrapper.

A detailed description of the changes is provided below.


  • In the triqs++ compiler wrapper put any additional flags before cxxflags and ldflags

  • Update memory sanitizer docker image with latest development version

  • Fix memory sanitizer positive in triqs/arrays/linalg/eigenelements.hpp

  • Remove packaging directory from dockerignore


  • Fix install permissions for triqs++ compiler wrapper

  • Be sure to add -Lpath_to_install/lib to triqs++ ldflags

  • In extract_flags.cmake, protect extraction of -L/usr/lib and fix filtering of -I/usr/include

  • Extend extract_flags.cmake to treat compiler-specific generator expressions properly

  • Use extract_flags.cmake of triqs 3.0, properly protect agsinst -I/usr/include flags

  • Make sure to supress certain mpi warnings in ref-file based tests


  • Be sure to properly treat both rvalues and lvalues in c2py functions

  • Fix type usage in py_converter for integral types


  • Properly import all mesh-types in python/triqs/gf/

  • Provide is_gf_hermitian in python also for imtime and tensor_valued<4>

  • Wrap make_hermitian also for tensor_valued and imtime Green functions


  • oxs: force hdf5 1.10

Version 2.2.2

TRIQS Version 2.2.2 introduces various smaller bug fixes and adjustments to the documentation. In particular we now provide a section on the newly added Anaconda packages on the install page. These packages are the recommended way to set up TRIQS on Mac OS. We further removed the dependence of TRIQS on any of the compiled parts of the boost library.

A more detailed description of the changes is provided below.


  • Add NRGLjubjana_interface to the list of impurity solvers

  • Updated Applications page to include new hubbardi version 2.2

  • Add section on Anaconda packages to install page

  • Fix CC/CXX export commands in osx install instructions


  • Fix construction of gf_indices in various places


  • Remove dependence on Boost serialization

  • Add macro add_mpi_test to improve compatibility against mpich

  • Allow a compiler different from TRIQS, but explicitly warn the user


  • Fix error in triqs++ ld flags

  • Disable stacktrace in OSX error messages due to problems with Mac OS 10.15 (Catalina)

  • Fix bug in return type of positive_freq_view(gf&) and add test

  • Fix bug in lattice tools dos function

  • Remove redundant headers boost_serialization.hpp and serialization.hpp =======

Version 2.2.1

TRIQS Version 2.2.1 introduces minor adjustments to the documentation. It further improves compatibility for older osx versions and fixes the triqs++ compiler wrapper.

We provide a more detailed description of the changes below.


  • On OSX Install scipy/numpy via pip rather than homebrew for Python2 compatibility

  • For debian packages do not source /usr/share/

  • Bump cmake version requirement to actual required version

  • Update link to install page in README to use latest stable version


  • Fix issues in flag extraction for triqs++ compiler wrapper


  • Avoid use of optional.value() for improved osx compatibility

Version 2.2.0

TRIQS Version 2.2.0 introduces substantial performance improvements by reworking the array memory allocation and by further changing the behavior of view types of arrays and Green functions. The Release also introduces structural changes to the mpi and itertools components to make them usable as standalone components. Beyond that, this release fixes several library issues and improves the documentation. We provide a more detailed description of the changes below.

Make range and itertools functionality standalone

We have pulled the functionality for integer ranges and the range-adapting functionality (product, enumerate, …) out of the TRIQS namespaces and made the headers standalone. This functionality now lives in the itertools namespace and resides in the top-level itertools folder. Tests can be found in test/itertools.

Make mpi functionality standalone and change namespace

We have pulled the generic mpi functionality (communicator, gather(basic_type), reduce(basic_type), …) out of the triqs::mpi namespace and made the headers standalone. This functionality now lives in the mpi namespace and resides in the top-level mpi folder. Tests can be found in test/mpi. In particular, includes of the header files triqs/mpi/base.hpp and triqs/mpi/vector.hpp should now be replaced with with includes to the according file in the mpi directory.

Non-owning views (C++)

We have changed the behavior of view-types within TRIQS. Prior to TRIQS 2.2 any view (gf_view, array_view, …) would make sure that the data of the underlying object (gf, array, …) is kept alive until all views and the object itself are destroyed. This was achieved through a so-called reference-counting mechanism that lead to substantial performance penalties in some cases. In TRIQS 2.2 view-types no longer keep the underlying memory alive and are thus only valid as long as the base-object is valid. Let us illustrate this with two examples:

Example 1: Returning view-types

array_view<int, 1> f() { return array<int, 1>{1, 2, 3}; }

Here, the array<int, 1> is immediately destroyed at the end of the function body. The view-type that we return is thus immediately invalid. We should instead return an array<int, 1>.

array<int, 1> f() { return array<int, 1>{1, 2, 3}; }

Example 2: Constructing a view from a temporary

array_view<int, 1> av{ zeros<int>(10) };

Here we construct an array_view<int 1> from a temporary of type array<int, 1>. The temporary will be destroyed immediately after the construction, invalidating the view. We should instead be creating an array<int, 1>

array<int, 1> arr{ zeros(10) };

Note that no unnecessary copies will be made in the code above.

Our analysis has shown that in practice this change in behavior rarely affects existing applications. You can however automatically detect any problems related to this change by using the dynamic analyzer checks described in the following.

Dynamic Analyzer Checks (ASAN, UBSAN)

The clang and gcc compiler provide so-called dynamic analyzer checks that allow us to detect various memory access errors and occurances of undefined behavior. We have simplified the process of running these checks for TRIQS and any application based on the app4triqs skeleton by adding additional options to the cmake configuration. In order to run these checks you will need to configure TRIQS and your application with -DASAN=ON and/or -DUBSAN=ON.

No longer install googletest

The build-system of the TRIQS library will no longer install the googletest project as this can lead to conflicts with system-provided packages. Applications should instead compile and link against their own version of googletest. This is done for example in the app4triqs application skeleton.


Starting with TRIQS Version 2.2.0 we will issue compatible releases of the app4triqs application skeleton. These will serve as a basis to the corresponding compatible releases of many of our official applications. Making adjustments to the project structure directly within app4triqs allows us to easily propagate these changes to all compatible applications.


  • All views are now borrowed (non-owning) by default

  • Major Test cleanings

  • Fix make_regular for array_expr

  • Allow a=0 for regular arrays

  • Initialize std::complex memory blocks by calls to calloc

  • Explicitly delete rebind to rvalues for view types

  • Move arrays::range to itertools::range

  • Reduce hdf5 compression level from 8->1 for higher performance


  • We now generate and install a triqs++ compiler wrapper

  • gtest is no longer installed by TRIQS but should now be compile by the applications (cf. app4triqs)

  • Install Findsanitizer.cmake - It locates sanitizer runtime libraries and interface targets

  • We now LD_PRELOAD the proper sanitizer runtime libraries when Python tests are executed

  • Allow compilation also with the parallel version of hdf5

  • Consistently use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR over the CMAKE_XXX equivalents

  • extend add_cpp2py_module function to allow optional header dependencies

  • Specify boost library components explicitly, Avoid using BoostConfig.cmake

  • Synchronize and clean find_package modules for FFTW GMP GSL and NFFT

  • Explicitly prepend py_ to all python tests

  • Adjust the project name and export extra version info

  • C++ standard is now propagated through the triqs target

  • Create INTERFACE targets for triqs dependencies and export them (e.g. triqs::mpi, triqs::blas_lapack)

  • Make the remaining python ref tests standalone and adjust FindTest.cmake

  • FIX clang+cmake linktime problems

  • Add parse_commit script to parse the commit messages into a tag-grouped format

  • Add script to generate copyright headers generically

  • Use only is_gf_v, is_block_gf_v, Add is_instantiation_of_v<TMPL, T>

  • Properly check signbit in ostream operator of real_or_complex FIX #729

  • Fix all positives of address and undefined sanitizer


  • Change the License for the itertools, mpi and cpp2y directories to Apache 2

  • Remove and Clean usage of forward compat header c14.hpp and c17.hpp

  • Adjust fundamental operator set to respect order in gf_struct #342


  • Major overhaul of the documentation file structure

  • Add documentation for fit_legendre function

  • Include a markdown cheat sheet in the feature request issue template

  • Add issue_templates for bug report and feature request

  • Update the website for TRIQS-based applications

  • Document functions make_hermitian, is_gf_hermitian, Refactor and clean

  • Improve C++ Api documentation of make_zero_tail, fit_tail and fit_hermitian_tail

  • Add a page about how to contribute to TRIQS

  • Add GreenFunction concept

  • Add a brief description for the use of singularity containers

  • Add information on OpenMP specific environment variables

  • Improve documentation for Dichotomy function

  • Update osx install instructions to fully load llvm install into environment

  • Minor refactoring of installation page, Update singularity weblinks

  • Add warning about compilation memory usage to install page

  • Extensions to triqs.css file

  • Set up fallback solution in FindMathJax.cmake

  • Update the description of versioning

  • Add C++2Rst generated rst files, Make the regeneration optional with target docs_cpp2rst

  • Update OSX install instructions

  • Clean old python-package dependencies from install instructions and docker files

  • Update homebrew formula and osx install instructions


  • Fix generic make_gf_from_fourier for block_gf and block2_gf

  • Make direct fourier (ImTime -> Matsubara) checks less rigid

  • Issue warning in k-mesh fourier for non-diagonal periodization matrix


  • Generalize is_gf_hermitian and make_hermitian for imtime and rank<4> green functions

  • Explicitly check is_within_boundary for index_to_linear and index_to_point in Debug mode

  • Remove modulo operation from cluster_mesh::operator[]

  • Remove unnecessary modulo operations from index_to_linear of cluster_mesh FIX #725

  • Rename slice_t to value_t for all gf target types

  • Adjust the the delta(g) function in after tail adjustments

  • Fix gf_indices construction in partial evaluation of Green functions


  • Protect the write vector of size 0 in h5

  • Add missing h5_write/read for vector


  • Add range slicing capabilities with slice(Range,start,end) + test

  • Add range striding capabilities with stride(Range,step) + test

  • Move chunk_range into itertools, add omp_chunk (omp version of mpi_chunk) to itertools/omp_chunk.hpp

  • Add a doc example for enumerate


  • Add sanitization build including both asan and ubsan

  • Make linux builds use requirements.txt

  • try to exclude large git packs from build

  • Switch ubuntu-clang build to libc++ packages

  • Add Dockerfile supporting msan with mkl


  • We added separate functions warmup/accumulate


  • Add range-adapting function mpi::chunk(Range) that distributes over all mpi ranks

  • Encapsulate generic mpi functionality in its own mpi namespace

  • Adjust slice_range/length to match the API of range(N,M,1) where M is excluded

  • Add a generic mpi_reduce_in_place function

  • Correction in mpi_reduce for compatibility against older mpis

  • Allow conversions mpi::communicator <-> boost::mpi::communicator if boost/mpi.hpp included

  • Rename slice_range->chunk_range and slice_length->chunk_length

  • Add std::string broadcasting


  • Store orbital positions and names for bravais_lattice, FIX #724

  • Add BrillouinZone member to tight-binding-lattice


  • Add is_almost_zero(precision) function to many_body_operator FIX #745

  • Rename reduction_t -> data_t in fundamental op. set


  • Add Easybuild script for TRIQS release 2.1.1


  • Add missing imports of ‘warnings’ python module

  • Deprecate use of ‘inverse’ in fourier function names

  • Restore compatibility for old numpy versions

  • Important Bugfix in Gf * Mat and Mat * Gf arithmetic

  • Wrap fit_tail and fit_hermitian_tail for BlockGf

  • Generalize implementation of map_block for lambdas of general return type

  • Add utility class capture_stdout to capture output

  • Make sure to specify module dependencies in all desc files

  • Extend make_zero_tail functionality to work on (im/re)time Green functions

  • Extend mpi.bcast(x) to bcast(x, root = 0) and recv() to recv(source = 0)


  • Reduce hdf5 compression level from 8->1 for higher performance (negligible change in file sizes, substantial change in write/read times)

Version 2.1.1

TRIQS Version 2.1.1 introduces minor adjustments to the cmake files and the documentation. It further provides a build script for the EasyBuild framework.


  • Manually pip install numpy first on osx

  • Rename docker repo to packaging


  • Use short version of binder link in install page

  • Fix github logo


  • Synchronize and clean find_package modules for FFTW GMP GSL and NFFT

  • Allow compilation also with the parallel version of hdf5


  • Easyconfig Build Script for TRIQS release 2.1.1

Version 2.1.0

TRIQS Version 2.1.0 is a bugfix release. It resolves a variety of issues. In particular it addresses a series of stability issues with the new treatment of the high-frequency tails of the Green Function as it was introduced in Version 2.0.0.

When upgrading to TRIQS 2.1.0 be sure to account for the updated install instructions. The cpp2py tool will now be automatically installed together with TRIQS and should no longer be installed seperately. The corresponding cpp2py deb package should thus also be removed.


  • Introduce g.target_space() to generate an idx range + test

  • Add density function for real-frequency gf/block_gf

  • GfReFreq density density_zero_T + test

  • Add functions is_gf_hermitian and make_hermitian + tests

  • Important fix in pytriqs/gf matrix product and add test, Fix #608


  • Add functionality to substack (vstack) matrices + test

  • Improve thread-safety of array_views (atomic counter)

  • Bugfix for iterators of length zero


  • Fix Issue #475

  • Additional Tests for products of matsubara frequencies


  • Enfore string block-names in BlockGf python constructor

  • FIX in BlockGf converter to check that names are convertible to std::string


  • Fix a problem with improper usage of LIBRARY_PATH when using clang

  • Integrate cpp2py as a cmake sub-project

  • Check that compiler is either clang or gcc, Cleanup some intel remains

  • FindNFFT.cmake and FindTest.cmake are now installed to share/cmake/Modules

  • Adjust cmake-related install dirs to more standard directories

  • Replace Alps Find Lapack by System FindLAPACK.cmake

  • Check that cpp2py and triqs compiler match

  • Only generate but do not install the TRIQS modulefile

  • Export GIT_EXECUTABLE into TRIQSConfig


  • replace fortran wrappers

  • A fix that avoids unnecessary copies in gesvd gelss


  • Make tight_binding object h5 read and writeable + test

  • Fix h5 read/write for cyclic_lattice mesh


  • Fix tail least-squares error: properly normalize, Small bugfixes

  • Fix assymetry bug in replace_by_tail

  • Fix in BlockGf functionality of make_zero_tail

  • Add fit_hermitian_tail function that enforces G(i,j)(iw) = conj(G(j,i)(-iw))

  • Add tail_issues test summarizing any resolved problems with high frequency moments

  • Adjust maximum fitting order based on largest fitted frequency

  • Important Bugfix in known_moment fitting


  • Add try_change_col_row and complete

  • expose precision warning and error bounds


  • Incorporate patch for empty subspaces

  • We now expose n_min, n_max and f_shell + test


  • Assert that a move has been registered in attempt() FIX #663

  • collect_results: Inform user that we are waiting for other mpi-threads

  • make measure timer optional, Fix #650


  • Add warning about compilation memory usage to install page

  • Commit generated rst files, add an optional target for regeneration (docs_cpp2rst)

  • Add documentation for the fit_tail functionality, update to fourier docs

  • Change brew install instructions to use python@2

  • Updated install instructions after cpp2py inclusion

  • Update install script for master branch


  • Fix the delta(g) function in after tail adjustments

  • Generalize fit_[hermitian_]tail for BlockGf, Some cleanining in make_gf_from_fourier

  • time_pt h5 serialization

  • Add REQUIRES macro for clang/gcc to start using concept-style template constraints

  • Bugfix in linear interpolation, adjust rouding error margin, FIX #668

  • Add missing HDFArchiveInert import to pytriqs.archive FIX #671

  • Fix MeshPoint arithmetic in Python FIX #557

  • Fix backward compat for mesh_brillouin_zone h5_read

  • Generalize the density(G, tail) function to block Gfs

  • Add range generating function product_range(i,j,k,…) + test

  • Add python function make_zero_tail in accordance with cpp implementation

  • Add key-word argument for center of SemiCircular

  • Generalize legendre functionality for arbitrary target types

  • Fix Issue #649, #638, #624, #581, #594

  • Add comparison of tight_binding object for c++ and python

  • Add known moments argument to density calulculation

  • Add make_gf_from_fourier<n1,n2>(Gf_multivar, mesh1, mesh2)

  • Add wrapping of fit_tail for scalar_valued gf’s

  • Add real / imag for block[2] gf and test


  • Add fit_legendre(gt,order) function + test

  • Adjust descriptors for BlockGf Functionality FIX #106

  • Fix of Flat descriptor for scalar_valued gf


  • Fix generic make_gf_from_fourier for block_gf and block2_gf

  • Make direct fourier (ImTime -> Matsubara) checks less rigid

  • Updated Python Fourier test for BlockGf

  • Allow known_moment fitting for block_gf and block2_gf

  • Assume vanishing 0th moment in tail-fit, improved error msgs

Version 2.0.0


  • Allowing known moments in direct fourier to python interface


  • Add -Og flag for debug mode


  • enable compression in c++ h5write of array / array_stack


  • Add swap_index_view


  • wip

  • remove tail doc for C++


  • Add g + 1, 1+g for scalar_valued gf. Clean implementation


  • Add wrapper for density for scalar_valued


  • grab the version number from the latest annotated git tag

  • Move out ipython notebooks to

  • Update

  • add back Jenkinsfile

  • Adjust fourier known moments interface, all tests passing

  • Fourier real, WIP. Dont fit moments for retime

  • Add known moments to set_from_fourier functions

  • More verbose mesh print functionality

  • Adjust interface of tail_fitter and tail_fit_on_window

  • Exposet n_tail_max to user. Change fit_tail API.

  • Fix ambiguity in fit_tail for imfreq. Add wrapper in python

  • Add fit_and_replace function for backward compatiblity, Add restricted_view(Gf,N), Tests

  • Putting tail_fitter into refreq, further cleaning

  • disabling gf mpi_gather / scatter functionality in tests

  • Bugfix in flatten2d for empty array, cleaning and test

  • Fixing fourier imtime and test

  • Fix array comparison of borrow and nonborrowed view

  • Add fourier block test

  • Add points around beta to Fit Derivative function

  • Move to order 8

  • Descriptor Fourier updaate

  • add back density test

  • Add working notebook for gtau tail

  • Implement evaluator, adding tests, refactoring/checking failing tests

  • BUGFIX in multivariable get_tail call, refactoring and cleaning

  • Moving prod mesh deduction rule and std::pair print functionality

  • Add get_tail functions for multivariable Green functions + test

  • BUGFIX in imfreq.hpp index map for results

  • Add initializier list constructor for rank=3 arrays

  • Minor refactoring in density.cpp

  • Adjust direct fourier and refactor

  • update notebook

  • Adjust set_tail_parameters and wrap, reenable direct fourier

  • Making the vector with the fitting indeces shared, minor refactoring

  • Switch to a vector of indices for the fitting procedure

  • Automatically determine number of points in tail and step

  • push notebook

  • Fix R =1, simplify code.

  • Add testing nb : temporary

  • Build only Vandermonde on first get_tail call and reuse

  • Bugfix, fixed moment fitting working

  • Adding implementation of known moments fitting

  • update itertools test for make_product, cleaning

  • clean gelss_cache, return lls error, introduce make_product(array<range,N>)

  • add gesvd header include to gelss

  • Rename lapack test, move gelss_cache into gelss.hpp

  • Add gelss_cache object, test and gesvd lapack interface

  • tail notebook

  • Revert “draft complex_Freq”

  • draft complex_Freq


  • Disable clang


  • Add Pade for scalar_valued function

  • Add evaluator with slice

  • density for bosonic Gf

  • Evaluator on BZ.

  • Add Evaluator for g(k,om) : experimental

  • Add * and sign for statistic_enum

  • Add linear_dims in Python interface


  • Add replace_by_tail without n_min

  • Rename get_tail -> fit_tail, further cleaning after creation of tail_fitter class

  • pulling out tail_fitter

  • Remove old tail in Python : port tests

  • Remove Old Singularity, further cleaning and fixes

  • Add wrapper for get_tail with known moments

  • Replacing tail in fourier / density, smaller bugfixes

  • Adjust n_moments automatically

  • Add tests


  • Small fix in add of gf

  • Add map_block function to, maps function to every element of Block[2]Gf

  • adding fourier factory functions to python interface + tests


  • fix typo in new add scalar code

  • Adding functionality for scalar_valued gf in python + tests


  • gf_density boson test fails! n = infty…

  • tail fit sigma cancellation test


  • Refactoring fourier matsubara and fourier lattice tests


  • Add checkfor known moments to fourier

  • Adjustments in for block_gf and precision

  • add overloads for block/block2, some tests and cleaning

  • Additional fourier tests and test cleaning

  • Adding factory functions for lattice fourier + tests

Version 1.5

To port an application’s cmakelists:

  • The best is to look at a complete example, ctint tutorial or cthyb.

  • Import TRIQS AND Cpp2Py which are 2 separate packages now.

  • We now use modern cmake techniques, i.e. imported targets

  • Simply link your target to triqs (imported target).


  • Obsolete : TRIQSTest are deprecated. Cf cthyb and ctint tutorial for examples.

  • build_pytriqs is also removed. Cf test/python in cthyb to set up the environment variable properly

  • New Python interface for Gf.


API changes

  • Remove the gf.local module, simply use gf

    from import ... --> from import ...

  • g.indices -> g.indices[0]

  • Change gf_struct_t in fundamental_operator_set.hpp from

    std::map<std::string,std::vector<std::variant<int, std::string>>>


    std::vector<std::pair<std::string,std::vector<std::variant<int, std::string>>>>

    to properly maintain the order of blocks.

  • In any Python script, replace e.g.

    gf_struct = { "up" : [0, 1], "dn" : [0, 1] } by

    gf_struct = [ ["up", [0, 1]], ["dn" : [0, 1]] ]


Version 1.4


  • Replace Doxygen by the local simpler tool c++2doc.


  • boost mpi is no longer detected by triqs. You can either add 2 lines to detect it in CMake, or port your apps to triqs::mpi. To port an apps using mpi :

    • detect boost mpi lib, and link to it, using e.g. in CMakeLists :

      find_package(Boost \({BOOST_VERSION} REQUIRED COMPONENTS mpi serialization system) link_libraries(\){Boost_LIBRARIES})

    • include “boost/mpi.hpp” if needed.

  • The library is installed in C++14 mode.

  • New install/build conventions for apps. Here are the changes to be made:

    • in

    1. m = module(full_name = 'module_name', app_name='application_a') (instead of full_name="pytriqs.applications.application_a.module_name")

    2. m.use_module("gf", "triqs") (instead of m.use_module("gf"))

    3. m.add_include(... with path relative to c++ dir (not relative to current dir)) (e.g. add_include(solver_core.hpp) instead of add_include("../c++/solver_core.hpp"))

    • in CMakeLists.txt

    1. add line include_directories(c++)

    • in python/CMakeLists.txt

    1. change python_destination: remove pytriqs.applications…

    2. change triqs_python_extension: change to triqs_python_extension_and_install, and remove second argument

    3. change install DESTINATION : replace variable TRIQS_PYTHON_LIB_DEST with PYTHON_LIB_DEST_ROOT

    • in your python scripts:

    1. replace everywhere pytriqs.applications.* with *

    A more detailed documentation can be found here:

Many-body operators

  • They are now polymorphic, they can handle complex and real case. many_body_operator is not a template any more. many_body_operator_generic is the general case.

  • The are in triqs::operators namespace (moved from utility).

Green’s functions

  • Added support for complex G(tau). By default G(tau) is complex.

  • Accordingly G(iw) is defined by default on the full (positive and negative) frequency axis. Plotting is affected.

  • [API break] As a consequence is twice as big. Now[0] refers to the smallest negative frequency so older codes using direct data access will break. The n^th frequency can be retrieved with G(n) which is the recommended usage as it is independent from the storage details.

  • Fourier transforms have been updated.

  • When writing to HDF5:

    • If the imaginary part of G(tau) is zero, then G(tau) is written as a real array (to gain space) otherwise it is written as a complex array

    • If the negative and positive frequencies of G(iw) are all equivalent through G(-iw) = G(iw)* then only the positive frequencies are saved (to gain space). Otherwise the full axis is written

    • Note that the behavior described above is only followed when writing to the HDF5 file. When a G(tau) or a G(iw) is read from the HDF5, it will always be turned into a complex G(tau) or a G(iw) on the full frequency axis.


  • All c++ tests have been ported to Google test.

  • The c++ test tools have been reorganized into triqs/test_tools. The google test sources are there as well as two headers gfs.hpp and arrays.hpp with macros to easily compare arrays and Green’s functions within a google test code.

  • The test cmake files have been simplified. There are just two macros to run a test:

    • add_cpp_test(testname) that adds a c++ test.

    • add_python_test(testname) that adds a python test.

    • From an external project these macros are called triqs_add_cpp_test and triqs_add_python_test.

  • For both tests, if there is a file testname.ref then the output of the test, written in a file testname.out will be compared to testname.ref and the test will fail if they are different.

  • It is now up to the user to check a result against a reference archive. As a convention, the reference archives end with .ref.h5 and the test generates a file .out.h5. The program h5diff is no longer used by the library (h5diff had several limitations). The python tests have been changed accordingly.

  • The module pytriqs.utility.comparison_tests has functions that make it easy to compare arrays and green’s functions in a python script.

  • The module pytriqs.utility.h5diff allows to compare two archives.

Version 1.3


  • TRIQS depends on a number of third-party Sphinx extensions to build its documentation. These extensions are now installed under ${CMAKE_INSTALL_PREFIX}/share/triqs/sphinxext, in order to let TRIQS-based application to reuse the extensions and to inherit the visual style of the docs.

  • Preinstalled Sphinx extension sphinxcontrib-doxylink is not needed anymore to build the documentation.

Green functions

  • New Python method DOS.copy().

  • New convenience functions in module,

    • inverse(): compute the inverse of a Green’s function;

    • delta(): compute Delta_iw from G0_iw;

    • dyson(): solve Dyson’s equation for given two of G0_iw, G_iw and Sigma_iw to yield the third;

    • tail_fit(): fit the tails of Sigma_iw and optionally G_iw;

    • read_gf_from_txt()/write_gf_to_txt(): read/write a GfReFreq from/to text files.

Many-body operators

  • HDF5 support.

  • Various utilities related to the many-body operators are organized in a separate sub-package pytriqs.operators.util. It includes the following modules,

    • hamiltonian: commonly-used Hamiltonians, Slater, Kanamori, density-density;

    • U_matrix (moved from dft_tools): construction of interaction matrices;

    • observables: operators of commonly used observables (S_z, S^2, L_z, L^2, L*S and so on);

    • op_struct: auxiliary functions to work with spin and orbital indices.

Monte-Carlo tools

  • Function mc_generic::start() returns different exit codes depending on the way it has been stopped, by receiving a signal or by stop_callback().

Determinant manipulation

  • New functions insert2(), remove2(), change_row() and change_col(), which are combinations of try_* and complete_operation().

  • New functions insert2_at_end(), remove_at_end() and remove2_at_end().

  • Optimized version of change_one_row_and_one_col() and other minor optimizations.


  • Support for unsigned long long.

  • The lists and tuples in Python are now written by hdf_archive with keys as “0”, “1”, “2”, “3”, instead of “00000000”, “00000001”, “0000002”, “0000003”, … This is necessary for C++ compatibility, where std::vector<T> is written in HDF5 as a subgroup with object named by their number, for generic T (i.e. not int, double, std::string). This change is backward compatible: old archive can be read by new code, but would break h5diff.


  • Support for rich comparison methods.

  • Make sure to include array converter in gf converter

  • New C++ attribute ignore_in_python that prevents a class method from wrapping in Python.

  • One can use two special line prefixes, type: and default: when documenting a member of the parameter class. They allow to override the corresponding fields in the generated table.

  • Converters for unsigned int, unsigned long and unsigned long long.

  • Converter for std::tuple (from any Python sequence/to tuple()).

  • std::pair is now converted to tuple().


  • The Google Test framework ( has been adopted by the project. Some of C++ test have been ported to it.

  • New header file test_tools.hpp with convenience functions and additional GTest macros for C++ testing.


  • Added a reference to a Computer Physics Communications paper about TRIQS.

  • Numerous updates to the documentation.

Version 1.2


  • New wrapping of boost random generators. No effect on API.

  • HDF5 cleaned, now using only C library (not C++) for simpler installation.


  • New wrapper tool to glue C++ and Python. Cython is gone.

Green Functions

  • transpose() method now returns a NEW green function, like conjugate(), etc…

  • Suppress the possibility to save/load in HDF5 for a tail alone (must be part of a GF).

Version 1.1

  • New constructors for the gf [api change]

  • Fix for gf expression templates

  • The gf tails now have fixed size to avoid mpi problems

  • Fixes in gf expression templates

  • New python random generator interface

  • Fixes for issues #11, #18, #25

Version 1.0

There have been changes from versions 0.x to 1.0.0 that will most likely have consequences for your scripts and archives.

Python classes

The number of python classes in the old 0.x releases was increasing with no clear naming convention. In TRIQS 1.0 we have unified the naming of the classes following the PEP naming conventions <>_:

  • Package and module names: lowercase with underscores

  • Class names: CapWords

  • Function names: lowercase with underscores

  • Function and method arguments: lowercase with underscores


We provide an update script porting_tools/ which should help you upgrade your archive. The usage is very simple::

$ python old_archive new_archive

where old_archive is your old archive to be upgraded and new_archive is the name of the new archive. If you encounter problems please post an issue with a copy of your archive.