pairinteraction
A Rydberg Interaction Calculator
pairinteraction::System< Derived > Class Template Referenceabstract

#include <System.hpp>

+ Inheritance diagram for pairinteraction::System< Derived >:
+ Collaboration diagram for pairinteraction::System< Derived >:

Public Types

using scalar_t = typename traits::CrtpTraits< Derived >::scalar_t
 
using real_t = typename traits::CrtpTraits< Derived >::real_t
 
using ketvec_t = typename traits::CrtpTraits< Derived >::ketvec_t
 
using basis_t = typename traits::CrtpTraits< Derived >::basis_t
 
using operator_t = typename traits::CrtpTraits< Derived >::operator_t
 
- Public Types inherited from pairinteraction::TransformationBuilderInterface< traits::CrtpTraits< Derived >::scalar_t >
using real_t = typename traits::NumTraits< traits::CrtpTraits< Derived >::scalar_t >::real_t
 

Public Member Functions

 System (std::shared_ptr< const basis_t > basis)
 
 System (const System &other)
 
 System (System &&other) noexcept
 
System< Derived > & operator= (const System &other)
 
System< Derived > & operator= (System &&other) noexcept
 
virtual ~System ()
 
std::shared_ptr< const basis_tget_basis () const
 
std::shared_ptr< const basis_tget_eigenbasis () const
 
Eigen::VectorX< real_tget_eigenenergies () const
 
const Eigen::SparseMatrix< scalar_t, Eigen::RowMajor > & get_matrix () const
 
const Transformation< scalar_t > & get_transformation () const override
 
Transformation< scalar_tget_rotator (real_t alpha, real_t beta, real_t gamma) const override
 
Sorting get_sorter (const std::vector< TransformationType > &labels) const override
 
std::vector< IndicesOfBlockget_indices_of_blocks (const std::vector< TransformationType > &labels) const override
 
void get_indices_of_blocks_without_checks (const std::set< TransformationType > &unique_labels, IndicesOfBlocksCreator &blocks) const
 
System< Derived > & transform (const Transformation< scalar_t > &transformation)
 
System< Derived > & transform (const Sorting &transformation)
 
System< Derived > & diagonalize (const DiagonalizerInterface< scalar_t > &diagonalizer, std::optional< real_t > min_eigenenergy={}, std::optional< real_t > max_eigenenergy={}, double rtol=1e-6)
 
bool is_diagonal () const
 
- Public Member Functions inherited from pairinteraction::TransformationBuilderInterface< traits::CrtpTraits< Derived >::scalar_t >
virtual ~TransformationBuilderInterface ()=default
 
virtual const Transformation< traits::CrtpTraits< Derived >::scalar_t > & get_transformation () const=0
 
virtual Transformation< traits::CrtpTraits< Derived >::scalar_t > get_rotator (real_t alpha, real_t beta, real_t gamma) const=0
 
Transformation< traits::CrtpTraits< Derived >::scalar_t > get_rotator (const std::array< real_t, 3 > &to_z_axis, const std::array< real_t, 3 > &to_y_axis) const
 
virtual Sorting get_sorter (const std::vector< TransformationType > &labels) const=0
 
virtual std::vector< IndicesOfBlockget_indices_of_blocks (const std::vector< TransformationType > &labels) const=0
 

Protected Member Functions

virtual void construct_hamiltonian () const =0
 

Protected Attributes

std::unique_ptr< operator_thamiltonian
 
bool hamiltonian_requires_construction {true}
 
bool hamiltonian_is_diagonal {false}
 
std::vector< TransformationTypeblockdiagonalizing_labels
 

Detailed Description

template<typename Derived>
class pairinteraction::System< Derived >

Definition at line 24 of file System.hpp.

Member Typedef Documentation

◆ basis_t

template<typename Derived >
using pairinteraction::System< Derived >::basis_t = typename traits::CrtpTraits<Derived>::basis_t

Definition at line 30 of file System.hpp.

◆ ketvec_t

template<typename Derived >
using pairinteraction::System< Derived >::ketvec_t = typename traits::CrtpTraits<Derived>::ketvec_t

Definition at line 29 of file System.hpp.

◆ operator_t

template<typename Derived >
using pairinteraction::System< Derived >::operator_t = typename traits::CrtpTraits<Derived>::operator_t

Definition at line 31 of file System.hpp.

◆ real_t

template<typename Derived >
using pairinteraction::System< Derived >::real_t = typename traits::CrtpTraits<Derived>::real_t

Definition at line 28 of file System.hpp.

◆ scalar_t

template<typename Derived >
using pairinteraction::System< Derived >::scalar_t = typename traits::CrtpTraits<Derived>::scalar_t

Definition at line 27 of file System.hpp.

Constructor & Destructor Documentation

◆ System() [1/3]

template<typename Derived >
pairinteraction::System< Derived >::System ( std::shared_ptr< const basis_t basis)

Definition at line 28 of file System.cpp.

◆ System() [2/3]

template<typename Derived >
pairinteraction::System< Derived >::System ( const System< Derived > &  other)

Definition at line 32 of file System.cpp.

◆ System() [3/3]

template<typename Derived >
pairinteraction::System< Derived >::System ( System< Derived > &&  other)
noexcept

Definition at line 39 of file System.cpp.

◆ ~System()

template<typename Derived >
pairinteraction::System< Derived >::~System ( )
virtualdefault

Member Function Documentation

◆ construct_hamiltonian()

template<typename Derived >
virtual void pairinteraction::System< Derived >::construct_hamiltonian ( ) const
protectedpure virtual

◆ diagonalize()

template<typename Derived >
System< Derived > & pairinteraction::System< Derived >::diagonalize ( const DiagonalizerInterface< scalar_t > &  diagonalizer,
std::optional< real_t min_eigenenergy = {},
std::optional< real_t max_eigenenergy = {},
double  rtol = 1e-6 
)

Definition at line 184 of file System.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE().

+ Here is the caller graph for this function:

◆ get_basis()

template<typename Derived >
std::shared_ptr< const typename System< Derived >::basis_t > pairinteraction::System< Derived >::get_basis

Definition at line 76 of file System.cpp.

◆ get_eigenbasis()

template<typename Derived >
std::shared_ptr< const typename System< Derived >::basis_t > pairinteraction::System< Derived >::get_eigenbasis

Definition at line 85 of file System.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE().

+ Here is the caller graph for this function:

◆ get_eigenenergies()

template<typename Derived >
Eigen::VectorX< typename System< Derived >::real_t > pairinteraction::System< Derived >::get_eigenenergies

Definition at line 97 of file System.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE().

+ Here is the caller graph for this function:

◆ get_indices_of_blocks()

template<typename Derived >
std::vector< IndicesOfBlock > pairinteraction::System< Derived >::get_indices_of_blocks ( const std::vector< TransformationType > &  labels) const
overridevirtual

◆ get_indices_of_blocks_without_checks()

template<typename Derived >
void pairinteraction::System< Derived >::get_indices_of_blocks_without_checks ( const std::set< TransformationType > &  unique_labels,
IndicesOfBlocksCreator blocks 
) const

◆ get_matrix()

template<typename Derived >
const Eigen::SparseMatrix< typename System< Derived >::scalar_t, Eigen::RowMajor > & pairinteraction::System< Derived >::get_matrix

Definition at line 110 of file System.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE().

+ Here is the caller graph for this function:

◆ get_rotator()

template<typename Derived >
Transformation< typename System< Derived >::scalar_t > pairinteraction::System< Derived >::get_rotator ( real_t  alpha,
real_t  beta,
real_t  gamma 
) const
override

Definition at line 130 of file System.cpp.

◆ get_sorter()

template<typename Derived >
Sorting pairinteraction::System< Derived >::get_sorter ( const std::vector< TransformationType > &  labels) const
overridevirtual

Implements pairinteraction::TransformationBuilderInterface< traits::CrtpTraits< Derived >::scalar_t >.

Definition at line 139 of file System.cpp.

Referenced by main().

+ Here is the caller graph for this function:

◆ get_transformation()

template<typename Derived >
const Transformation< typename System< Derived >::scalar_t > & pairinteraction::System< Derived >::get_transformation
overridevirtual

◆ is_diagonal()

template<typename Derived >
bool pairinteraction::System< Derived >::is_diagonal

Definition at line 321 of file System.cpp.

Referenced by pairinteraction::BasisPairCreator< Scalar >::add().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename Derived >
System< Derived > & pairinteraction::System< Derived >::operator= ( const System< Derived > &  other)

Definition at line 46 of file System.cpp.

◆ operator=() [2/2]

template<typename Derived >
System< Derived > & pairinteraction::System< Derived >::operator= ( System< Derived > &&  other)
noexcept

Definition at line 57 of file System.cpp.

◆ transform() [1/2]

template<typename Derived >
System< Derived > & pairinteraction::System< Derived >::transform ( const Sorting transformation)

Definition at line 173 of file System.cpp.

◆ transform() [2/2]

template<typename Derived >
System< Derived > & pairinteraction::System< Derived >::transform ( const Transformation< scalar_t > &  transformation)

Definition at line 158 of file System.cpp.

Referenced by main().

+ Here is the caller graph for this function:

Field Documentation

◆ blockdiagonalizing_labels

template<typename Derived >
std::vector<TransformationType> pairinteraction::System< Derived >::blockdiagonalizing_labels
mutableprotected

Definition at line 67 of file System.hpp.

◆ hamiltonian

template<typename Derived >
std::unique_ptr<operator_t> pairinteraction::System< Derived >::hamiltonian
mutableprotected

◆ hamiltonian_is_diagonal

template<typename Derived >
bool pairinteraction::System< Derived >::hamiltonian_is_diagonal {false}
mutableprotected

Definition at line 66 of file System.hpp.

◆ hamiltonian_requires_construction

template<typename Derived >
bool pairinteraction::System< Derived >::hamiltonian_requires_construction {true}
mutableprotected

The documentation for this class was generated from the following files: