Autodocs - Container Table
-
template<class State = danceq::internal::State<128, 2, uint64_t>>
class ContainerTable The class uses lookup-tables to enumerate states for a small subsystem.
Template parameters
class State: The only template parameter is the State class
Default: danceq::internal:: State <128,2,uint64_t>
Things to know
The class enumerates a subsystems of length \(L_P\) with a maximal number of particle number \(n_P = \max \left(L_P\cdot(Q-1),n\right)\) where \(n\) is the total particle number of the entire system.
More information can be found here.
The underlying State class can be accessed via
Container::state_class
.The debugging level can be adjusted from 0 (no debugging) to 10 (maximal debugging):
#define dbug_level 10; // 10 maximal debugging, 0 is no debugging
Warning
The maximal length per subsystem is limited by the underlying integer type IntType of the State class. The length L has to fulfill \(\textbf{Nbits}\cdot\textbf{L} \leq \texttt{sizeof_IntType}\cdot 8\) where Nbits is the number of bits needed to encode a local site.
Public Static Attributes
-
static const bool is_State = false
Needed for specification.
Protected Types
-
using state_class = State
State class.
State class can be retrieved from the BasisU1:
// Definition of classes using State = danceq::internal::State<256,4>; using Container = danceq::internal::ContainerTable<State> ; // This equivalent to: State state; Container::state_class state;
Protected Functions
-
ContainerTable(uint64_t L_, uint64_t n_max_ = -1UL)
Constructor.
Constructs an instance with a given length L_ and maximal particle number n_max_. Default particle number of -1 sets n_max to L_ (Q-1).
- Parameters:
L_ – System size.
n_max_ – Particle number.
-
~ContainerTable()
Deconstructor.
-
int32_t info(void) const
Prints information about the class.
Prints information about the class such as basics parameters and current memory usage.
- Returns:
error_code
-
int32_t get_number_of_bytes(uint64_t *number_of_bytes) const
Returns the memory usages in bytes.
- Parameters:
number_of_bytes – Pointer for output.
- Returns:
error_code
-
int32_t get_index(uint64_t *output, const State &state, uint64_t start, uint64_t end) const
Returns the index of a specific state within start to end.
- Parameters:
output – Pointer for output
state – State
start – Start of interval
end – End of interval
- Returns:
error_code
-
int32_t is_maximal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const
Check if a specific state is maximal within start to end.
Default value of n_=-1 means that the particle number is calculated within the function.
- Parameters:
output – Pointer for output
state – State
start – Start of interval
end – End of interval
n_ – Particle number within the interval
- Returns:
error_code
-
int32_t is_minimal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const
Check if a specific state is minimal within start to end.
Default value of n_=-1 means that the particle number is calculated within the function.
- Parameters:
output – Pointer for output
state – State
start – Start of interval
end – End of interval
n_ – Particle number within the interval
- Returns:
error_code
Private Members
-
const uint64_t L
Length of subsystem.
-
const uint64_t n_max
Maximal number of particles.
-
std::vector<uint64_t> table
Lookup-table.
The index of each state truncated to the subsystem, \(\vert\Psi_i\rangle\), can be accessed by its integer representation: \(\textbf{i} = \textbf{table} \left[\vert\Psi_i\rangle\right]\). The maximal size is \(2^{\textbf{Nbits}\cdot \textbf{L}}\) where Nbits is the number of bits (defined by the State class) to encode a local site.
-
std::vector<typename State::integer_type> maximal_state_per_n
Defines the maximal state per allowed particle number.
Maximal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.
-
std::vector<typename State::integer_type> minimal_state_per_n
Defines the minimal state per allowed particle number.
Minimal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.