|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
Fock state representations and Hilbert space tools for many-body systems.
In the following, we introduce some basic concepts and notations used throughout the documentation.
Let us start by considering a single particle Hilbert space \( \mathcal{H}_1 \) of finite dimension \( N \) with a complete set of eigenstates \( \{ \lvert \alpha_i \rangle \}_{i=0}^{N-1} \).
We can construct the associated Fock space \( \mathcal{F} \) as the Hilbert space spanned by all possible occupation number configurations of the single particle states. Since we are only considering fermions, each single particle state \( \lvert \alpha_i \rangle \) can either be empty or singly occupied, i.e. \( n_{\alpha_i} \in \{0, 1\} \), which implies that \( \dim(\mathcal{F}) = 2^N \).
The occupation number basis states of the Fock space are therefore given by
\[ \lvert n_{\alpha_0}, n_{\alpha_1}, \dots, n_{\alpha_{N-1}} \rangle = \prod_{i=0}^{N-1} (c_{\alpha_i}^\dagger)^{n_{ \alpha_i}} \lvert 0 \rangle \; , \]
where \( c_{\alpha_i}^\dagger \) is the fermionic creation operator such that \( \lvert \alpha_i \rangle = c_{\alpha_i}^\dagger \lvert 0 \rangle \), and \( \lvert 0 \rangle \) is the vacuum state with no particles.
If we restrict ourselves to \( N < 64 \), we can 1-to-1 map each occupation number basis state \( \lvert n_{\alpha_0}, n_{\alpha_1}, \dots, n_{\alpha_{N-1}} \rangle \) to a single 64-bit integer
\[ f(n_{\alpha_0}, n_{\alpha_1}, \dots, n_{\alpha_{N-1}}) = \sum_{i=0}^{N-1} n_{\alpha_i} 2^i \; , \]
where the \( i \)-th bit of \( f \) is set if and only if the single particle state \( \lvert \alpha_i \rangle \) is occupied.
Classes | |
| class | triqs::hilbert_space::fundamental_operator_set |
| Class representing a fundamental operator set. More... | |
| class | triqs::hilbert_space::hilbert_space |
| Fermionic Hilbert (Fock) space generated by a fundamental operator set. More... | |
| class | triqs::hilbert_space::imperative_operator< HS, T, UseMap > |
| Representation of a many-body operator acting on many-body states. More... | |
| class | triqs::hilbert_space::space_partition< S, OP > |
| Automatic partitioning of a Hilbert (Fock) space into invariant subspaces of a Hermitian operator. More... | |
| 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... | |
| class | triqs::hilbert_space::sub_hilbert_space |
| Subspace of a fermionic Hilbert (Fock) space. More... | |
Typedefs | |
| using | triqs::hilbert_space::fock_state_t = uint64_t |
| Integer type representing a fermionic fock state \( \lvert f \rangle = \lvert n_{\alpha_0}, n_{\alpha_1},
\dots, n_{\alpha_{N-1}} \rangle \). | |
| using | triqs::hilbert_space::indices_t = std::vector<std::variant<long, std::string, double, std::array<long, 3>>> |
| Index type for single particle state indices \( \alpha_i \). | |
Functions | |
| std::string | triqs::hilbert_space::format_indices (indices_t const &alpha, std::string_view sep=",", std::string_view prefix="", std::string_view suffix="") |
| String representation of a single particle state index \( \alpha_i \). | |
| 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')} \). | |
| using triqs::hilbert_space::fock_state_t = uint64_t |
#include <triqs/hilbert_space/hilbert_space.hpp>
Integer type representing a fermionic fock state \( \lvert f \rangle = \lvert n_{\alpha_0}, n_{\alpha_1}, \dots, n_{\alpha_{N-1}} \rangle \).
The least significant bit encodes the occupation of \( \lvert \alpha_0 \rangle \) and the most significant bit of \( \lvert \alpha_{N-1} \rangle \).
Definition at line 53 of file hilbert_space.hpp.
| std::string triqs::hilbert_space::format_indices | ( | indices_t const & | alpha, |
| std::string_view | sep = ",", | ||
| std::string_view | prefix = "", | ||
| std::string_view | suffix = "" ) |
#include <triqs/hilbert_space/fundamental_operator_set.cpp>
String representation of a single particle state index \( \alpha_i \).
The individual index elements of \( \alpha_i \) are first converted to strings (if necessary) and then concatenated using the given separator sep. String index elements are enclosed in single quotes.
Optional prefix and suffix strings can be added around the entire representation.
| alpha | Single particle state index \( \alpha_i \). |
| sep | Separator string inserted between individual index elements. |
| prefix | Optional prefix string. |
| suffix | Optional suffix string. |
Definition at line 93 of file fundamental_operator_set.cpp.
| auto triqs::hilbert_space::make_zero_state | ( | state< HS, T, BasedOnMap > const & | phi | ) |
#include <triqs/hilbert_space/state.hpp>
Create a zero state in the same Hilbert (Fock) space as the given state.
It simply returns the many-body state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} = 0 \), i.e. with all amplitudes \( a_{f_i} = 0 \).
See triqs::hilbert_space::state<HS, T, true> and triqs::hilbert_space::state<HS, T, false> for more details.
| HS | Hilbert space type. |
| T | Amplitude type. |
| BasedOnMap | Whether the amplitudes are stored in a map or a vector. |
| phi | Reference state belonging to \( \mathcal{F}^{(m)} \). |
| std::ostream & triqs::hilbert_space::operator<< | ( | std::ostream & | sout, |
| state< HS, T, BasedOnMap > const & | psi ) |
#include <triqs/hilbert_space/state.hpp>
Write a triqs::hilbert_space::state<HS, T, true> or a triqs::hilbert_space::state<HS, T, false> to a std::ostream.
| HS | Hilbert space type. |
| T | Amplitude type. |
| BasedOnMap | Whether the amplitudes are stored in a map or a vector. |
| sout | std::ostream object. |
| psi | State to be written. |
| TargetState triqs::hilbert_space::project | ( | OriginalState const & | psi, |
| hilbert_space const & | proj_hs ) |
#include <triqs/hilbert_space/state.hpp>
Project a state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \) to a new Hilbert (Fock) space \(\mathcal{F}' \).
The projection is done by creating the target state \( \lvert \psi' \rangle \in \mathcal{F}' = 0 \) and by copying amplitudes from the original to the target state, i.e. we set \( a'_{f_i} = a_{f_i} \) for all \(\lvert f_i \rangle \in B_{\mathcal{F}^{(m)}} \).
| TargetState | Type of the target state. |
| OriginalState | Type of the original state. |
| psi | Original state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \). |
| proj_hs | Hilbert (Fock) space \( \mathcal{F}' \) to project into. |
| TargetState triqs::hilbert_space::project | ( | OriginalState const & | psi, |
| sub_hilbert_space const & | proj_hs ) |
#include <triqs/hilbert_space/state.hpp>
Project a state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \) to a new Hilbert (Fock) subspace \(\mathcal{F}'^{(m')} \).
The projection is done by creating the target state \( \lvert \psi' \rangle \in \mathcal{F}'^{(m')} = 0 \) and by copying amplitudes from the original to the target state for common basis states, i.e. we set \(a'_{f_i} = a_{f_i} \) for all \( \lvert f_i \rangle \in B_{\mathcal{F}^{(m)}} \cap B_{\mathcal{F}'^{(m')}} \).
| TargetState | Type of the target state. |
| OriginalState | Type of the original state. |
| psi | Original state \( \lvert \psi \rangle \in \mathcal{F}^{(m)} \). |
| proj_hs | Hilbert (Fock) space \( \mathcal{F}' \) to project into. |