|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/hilbert_space/hilbert_space.hpp>
Fermionic Hilbert (Fock) space generated by a fundamental operator set.
The Hilbert (Fock) space \( \mathcal{F} \) is fully defined by its underlying fundamental operator set \( A = \{ \alpha_i \}_{i=0}^{N-1} \) (see triqs::hilbert_space::fundamental_operator_set). Its dimension is \(\dim(\mathcal{F}) = 2^N \).
As explained in Operators, we can map each occupation number basis state \( \lvert n_{\alpha_0}, n_{\alpha_1}, \dots, n_{\alpha_{N-1}} \rangle = \lvert f \rangle \in \mathcal{F} \) to an integer \( f \in \{ 0, \dots, 2^N - 1 \} \) and back. This allows us to write the complete set of basis states of \( \mathcal{F} \) as \( B_{\mathcal{F}} = \{ \lvert f \rangle \}_{f=0}^{2^N - 1} \). Furthermore, it imposes a natural order on \(B_{\mathcal{F}} \) such that \( \lvert f \rangle < \lvert f' \rangle \) if \( f < f' \).
Definition at line 71 of file hilbert_space.hpp.
Public Member Functions | |
| hilbert_space () | |
| Default constructor constructs an empty Hilbert (Fock) space of dimension \( 0 \). | |
| hilbert_space (fundamental_operator_set const &fops) | |
| Construct a Hilbert (Fock) space from a given triqs::hilbert_space::fundamental_operator_set object. | |
| fock_state_t | get_fock_state (fundamental_operator_set const &fops, std::set< fundamental_operator_set::indices_t > const &alphas) const |
| Get the Fock state \( \lvert f \rangle = \prod_{j=1}^k \hat{c}^\dagger_{\alpha_{i_j}} \lvert 0
\rangle \). | |
| fock_state_t | get_fock_state (int f) const |
| Get the Fock state \( \lvert f \rangle \) corresponding to a given integer \( f \). | |
| auto | get_state_index (fock_state_t f) const |
| Get the integer \( f \) corresponding to a given Fock state \( \lvert f \rangle \). | |
| bool | has_state (fock_state_t f) const |
| Check if a given Fock state belongs to the Hilbert (Fock) space. | |
| bool | operator== (hilbert_space const &hs) const |
| Equal-to operator compares the dimensions of the two Hilbert (Fock) spaces. | |
| auto | size () const |
| Get the dimension \( \dim(\mathcal{F}) \) of the Hilbert (Fock) space \( \mathcal{F} \). | |
Static Public Member Functions | |
| static std::string | hdf5_format () |
| Get the HDF5 format tag. | |
Friends | |
| void | h5_read (h5::group g, std::string const &name, hilbert_space &hs) |
| Read a triqs::hilbert_space::hilbert_space from HDF5. | |
| void | h5_write (h5::group g, std::string const &name, hilbert_space const &hs) |
| Write a triqs::hilbert_space::hilbert_space to HDF5. | |
|
inline |
Construct a Hilbert (Fock) space from a given triqs::hilbert_space::fundamental_operator_set object.
If the size of the fundamental operator set is \( N \), then the dimension of the constructed Hilbert (Fock) space is \( \dim(\mathcal{F}) = 2^N \).
| fops | Fundamental operator set that generates the Hilbert (Fock) space. |
Definition at line 84 of file hilbert_space.hpp.
|
inlinenodiscard |
Get the Fock state \( \lvert f \rangle = \prod_{j=1}^k \hat{c}^\dagger_{\alpha_{i_j}} \lvert 0 \rangle \).
| fops | triqs::hilbert_space::fundamental_operator_set object that defines the Hilbert (Fock) space \(\mathcal{F} \). |
| alphas | Set of indices \( \{ \alpha_{i_1}, \dots, \alpha_{i_k} \} \) specifying the creation operators. |
Definition at line 136 of file hilbert_space.hpp.
|
inlinenodiscard |
Get the Fock state \( \lvert f \rangle \) corresponding to a given integer \( f \).
It throws an exception if \( f \geq 2^N = \dim{\mathcal{F}} \).
| f | Integer \( f \) representing the Fock state \( \lvert f \rangle \). |
Definition at line 122 of file hilbert_space.hpp.
|
inlinenodiscard |
Get the integer \( f \) corresponding to a given Fock state \( \lvert f \rangle \).
It throws an exception if the given Fock state is not in the Hilbert (Fock) space, i.e. if \( f \geq 2^N = \dim{\mathcal{F}} \).
| f | Fock state \( \lvert f \rangle \). |
Definition at line 109 of file hilbert_space.hpp.
|
inlinenodiscard |
Check if a given Fock state belongs to the Hilbert (Fock) space.
| f | Fock state \( \lvert f \rangle \). |
Definition at line 98 of file hilbert_space.hpp.
|
friend |
Read a triqs::hilbert_space::hilbert_space from HDF5.
| g | h5::group to be read from. |
| name | Name of the subgroup. |
| hs | Hilbert (Fock) space to be read into. |
Definition at line 165 of file hilbert_space.hpp.
|
friend |
Write a triqs::hilbert_space::hilbert_space to HDF5.
| g | h5::group to be written to. |
| name | Name of the subgroup. |
| hs | Hilbert (Fock) space to be written. |
Definition at line 153 of file hilbert_space.hpp.