TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
state.hpp
#include "./hilbert_space.hpp"
#include "../arrays.hpp"
#include "../utility/numeric_ops.hpp"
#include <boost/operators.hpp>
#include <cstddef>
#include <iostream>
#include <unordered_map>

Detailed Description

Provides a type for many-body states in a Hilbert (Fock) space.

Definition in file state.hpp.

Go to the source code of this file.

Classes

class  triqs::hilbert_space::state< HS, T, false >
 Many-body state based on nda::vector. More...
class  triqs::hilbert_space::state< HS, T, true >
 Many-body state based on std::unordered_map. More...

Functions

template<typename HS, typename T, bool BasedOnMap>
auto triqs::hilbert_space::make_zero_state (state< HS, T, BasedOnMap > const &phi)
 Create a zero state in the same Hilbert (Fock) space as the given state.
template<typename HS, typename T, bool BasedOnMap>
std::ostream & triqs::hilbert_space::operator<< (std::ostream &sout, state< HS, T, BasedOnMap > const &psi)
 Write a triqs::hilbert_space::state<HS, T, true> or a triqs::hilbert_space::state<HS, T, false> to a std::ostream.
template<typename TargetState, typename OriginalState>
TargetState triqs::hilbert_space::project (OriginalState const &psi, hilbert_space const &proj_hs)
 Project a state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \) to a new Hilbert (Fock) space \(\mathcal{F}' \).
template<typename TargetState, typename OriginalState>
TargetState triqs::hilbert_space::project (OriginalState const &psi, sub_hilbert_space const &proj_hs)
 Project a state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \) to a new Hilbert (Fock) subspace \(\mathcal{F}'^{(m')} \).