TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
functions.hpp
Go to the documentation of this file.
1// Copyright (c) 2017-2018 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
2// Copyright (c) 2017-2018 Centre national de la recherche scientifique (CNRS)
3// Copyright (c) 2018-2020 Simons Foundation
4// Copyright (c) 2017 Igor Krivenko
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You may obtain a copy of the License at
17// https://www.gnu.org/licenses/gpl-3.0.txt
18//
19// Authors: Michel Ferrero, Igor Krivenko, Nils Wentzell
20
25
26#pragma once
27
28#include "./atom_diag.hpp"
29
30#include <vector>
31
32namespace triqs::atom_diag {
33
34 using namespace triqs::gfs;
35
40
55 template <bool Complex> double partition_function(atom_diag<Complex> const &atom, double beta);
56
72 template <bool Complex> typename atom_diag<Complex>::block_matrix_t atomic_density_matrix(atom_diag<Complex> const &atom, double beta);
73
91 template <bool Complex>
93 typename atom_diag<Complex>::many_body_op_t const &op, atom_diag<Complex> const &atom);
94
112 template <bool Complex>
115 atom_diag<Complex> const &atom);
116
131 template <bool Complex>
132 std::vector<std::vector<quantum_number_t>> quantum_number_eigenvalues(typename atom_diag<Complex>::many_body_op_t const &op,
133 atom_diag<Complex> const &atom);
134
148 template <bool Complex>
149 std::vector<std::vector<quantum_number_t>> quantum_number_eigenvalues_checked(typename atom_diag<Complex>::many_body_op_t const &op,
150 atom_diag<Complex> const &atom);
151
153
154} // namespace triqs::atom_diag
Provides a lightweight exact diagonalization solver for fermionic Hamiltonians.
Lightweight exact diagonalization solver for finite fermionic Hamiltonians.
Definition atom_diag.hpp:91
triqs::operators::many_body_operator_generic< scalar_t > many_body_op_t
Many-body operator type compatible with scalar_t.
vector< scalar_t > full_hilbert_space_state_t
State vector type of the full Hilbert space.
std::vector< matrix_t > block_matrix_t
Block-diagonal matrix type, one dense block per invariant subspace.
std::conditional_t< Complex, std::complex< double >, double > scalar_t
Scalar type of the matrix elements: double or std::complex<double>.
Definition atom_diag.hpp:94
double partition_function(atom_diag< Complex > const &atom, double beta)
Compute the atomic partition function at inverse temperature .
Definition functions.cpp:42
atom_diag< Complex >::block_matrix_t atomic_density_matrix(atom_diag< Complex > const &atom, double beta)
Compute the atomic density matrix at inverse temperature .
Definition functions.cpp:51
atom_diag< Complex >::scalar_t trace_rho_op(typename atom_diag< Complex >::block_matrix_t const &density_matrix, typename atom_diag< Complex >::many_body_op_t const &op, atom_diag< Complex > const &atom)
Compute the trace of a many-body operator weighted by a block-diagonal density matrix.
Definition functions.cpp:70
std::vector< std::vector< quantum_number_t > > quantum_number_eigenvalues_checked(typename atom_diag< Complex >::many_body_op_t const &op, atom_diag< Complex > const &atom)
Tabulate the eigenvalues of a quantum-number operator , also checking that the operator is diagonal ...
std::vector< std::vector< quantum_number_t > > quantum_number_eigenvalues(typename atom_diag< Complex >::many_body_op_t const &op, atom_diag< Complex > const &atom)
Tabulate the eigenvalues of a quantum-number operator over all eigenstates of the Hamiltonian.
atom_diag< Complex >::full_hilbert_space_state_t act(typename atom_diag< Complex >::many_body_op_t const &op, typename atom_diag< Complex >::full_hilbert_space_state_t const &st, atom_diag< Complex > const &atom)
Act with a many-body operator on a state vector, .