pairinteraction
A Rydberg Interaction Calculator
pairinteraction Namespace Reference

Namespaces

namespace  args
 
namespace  euler
 
namespace  maths
 
namespace  paths
 
namespace  spherical
 
namespace  traits
 
namespace  utils
 
namespace  wigner
 

Data Structures

struct  AtomDescriptionByParameters
 
struct  AtomDescriptionByRanges
 
class  Basis
 Base class for a basis. More...
 
class  BasisAtom
 Class for creating a basis of atomic kets. More...
 
class  BasisAtomCreator
 Builder class for creating BasisAtom objects. More...
 
class  BasisPair
 
class  BasisPairCreator
 
class  Database
 
struct  database_dir_noexcept
 
class  DiagonalizerEigen
 
class  DiagonalizerFeast
 
class  DiagonalizerInterface
 
class  DiagonalizerLapackeEvd
 
class  DiagonalizerLapackeEvr
 
struct  EigenSystemH
 
class  GitHubDownloader
 
class  GreenTensor
 
struct  IndicesOfBlock
 
class  IndicesOfBlocksCreator
 
struct  Info
 
class  Ket
 Base class for a ket. More...
 
class  KetAtom
 Class for representing atomic kets. More...
 
class  KetAtomCreator
 Builder class for creating KetAtom objects. More...
 
class  KetPair
 
class  MockDownloader
 
class  Operator
 
class  OperatorAtom
 
struct  OperatorMatrices
 
class  OperatorPair
 
class  ParquetManager
 
class  Range
 
struct  Sorting
 
class  System
 
class  SystemAtom
 
class  SystemPair
 
struct  Transformation
 
class  TransformationBuilderInterface
 

Enumerations

enum class  FloatType { FLOAT32 , FLOAT64 }
 
enum class  OperatorType {
  ZERO , ENERGY , ELECTRIC_DIPOLE , ELECTRIC_QUADRUPOLE ,
  ELECTRIC_QUADRUPOLE_ZERO , ELECTRIC_OCTUPOLE , MAGNETIC_DIPOLE , IDENTITY ,
  ARBITRARY
}
 
enum class  Parity : int { ODD = -1 , EVEN = 1 , UNKNOWN = 2 }
 
enum class  TransformationType : unsigned char {
  IDENTITY = 0 , SORT_BY_KET = 1 << 0 , SORT_BY_QUANTUM_NUMBER_F = 1 << 1 , SORT_BY_QUANTUM_NUMBER_M = 1 << 2 ,
  SORT_BY_PARITY = 1 << 3 , SORT_BY_ENERGY = 1 << 4 , ROTATE = 1 << 5 , ARBITRARY = 1 << 6
}
 

Functions

template<typename Derived >
void diagonalize (std::initializer_list< std::reference_wrapper< Derived > > systems, const DiagonalizerInterface< typename Derived::scalar_t > &diagonalizer, std::optional< typename Derived::real_t > min_eigenenergy={}, std::optional< typename Derived::real_t > max_eigenenergy={}, double rtol=1e-6)
 
template<typename Derived >
void diagonalize (std::vector< Derived > &systems, const DiagonalizerInterface< typename Derived::scalar_t > &diagonalizer, std::optional< typename Derived::real_t > min_eigenenergy={}, std::optional< typename Derived::real_t > max_eigenenergy={}, double rtol=1e-6)
 
template<typename Derived >
void diagonalize (std::vector< std::reference_wrapper< Derived > > systems, const DiagonalizerInterface< typename Derived::scalar_t > &diagonalizer, std::optional< typename Derived::real_t > min_eigenenergy={}, std::optional< typename Derived::real_t > max_eigenenergy={}, double rtol=1e-6)
 
std::ostream & operator<< (std::ostream &os, const Parity &parity)
 
constexpr TransformationType operator& (TransformationType x, TransformationType y)
 
constexpr TransformationType operator| (TransformationType x, TransformationType y)
 
constexpr TransformationType operator~ (TransformationType x)
 
template<typename Derived >
Derived operator* (const typename Operator< Derived >::scalar_t &lhs, const Operator< Derived > &rhs)
 
template<typename Derived >
Derived operator* (const Operator< Derived > &lhs, const typename Operator< Derived >::scalar_t &rhs)
 
template<typename Derived >
Derived operator/ (const Operator< Derived > &lhs, const typename Operator< Derived >::scalar_t &rhs)
 
template<typename Derived >
Derived & operator+= (Operator< Derived > &lhs, const Operator< Derived > &rhs)
 
template<typename Derived >
Derived & operator-= (Operator< Derived > &lhs, const Operator< Derived > &rhs)
 
template<typename Derived >
Derived operator+ (const Operator< Derived > &lhs, const Operator< Derived > &rhs)
 
template<typename Derived >
Derived operator- (const Operator< Derived > &lhs, const Operator< Derived > &rhs)
 
int run_unit_tests (int argc=0, char **argv={}, bool download_missing=false, bool use_cache=true, std::filesystem::path database_dir="")
 
void setup ()
 
 DOCTEST_TEST_CASE ("create a basis for strontium 88")
 
 DOCTEST_TEST_CASE ("create a basis for strontium 87")
 
 DOCTEST_TEST_CASE ("create a basis from kets")
 
 DOCTEST_TEST_CASE ("create a basis and sort it according to parity and m")
 
 DOCTEST_TEST_CASE ("calculation of matrix elements")
 
 DOCTEST_TEST_CASE ("create a BasisPair")
 
 DOCTEST_TEST_CASE ("get matrix elements in the pair basis")
 
 DOCTEST_TEST_CASE ("get a KetAtom")
 
 DOCTEST_TEST_CASE ("too large quantum number m")
 
 DOCTEST_TEST_CASE ("not uniquely specified ket")
 
 DOCTEST_TEST_CASE ("uniquely specified ket")
 
 DOCTEST_TEST_CASE ("get a BasisAtom")
 
 DOCTEST_TEST_CASE ("get an OperatorAtom")
 
 DOCTEST_TEST_CASE ("Get rate limit with GitHubDownloader")
 
 DOCTEST_TEST_CASE ("Download content with GitHubDownloader" *doctest::skip(true))
 
 TEST_CASE ("ParquetManager functionality with mocked downloader")
 
 DOCTEST_TEST_CASE ("ParquetManager functionality with github downloader")
 
 DOCTEST_TEST_CASE ("compare parities")
 
 DOCTEST_TEST_CASE ("print parities")
 
 DOCTEST_TEST_CASE ("sort parities")
 
 DOCTEST_TEST_CASE ("constructing a class derived from ket")
 
 DOCTEST_TEST_CASE ("create a ket for rubidium")
 
 DOCTEST_TEST_CASE ("create a ket for strontium")
 
 DOCTEST_TEST_CASE ("test for equality")
 
 DOCTEST_TEST_CASE ("construct and diagonalize a small Hamiltonian")
 
 DOCTEST_TEST_CASE ("construct and diagonalize two Hamiltonians in parallel")
 
 DOCTEST_TEST_CASE ("construct and diagonalize multiple Hamiltonians in parallel" *doctest::skip(true))
 
 DOCTEST_TEST_CASE ("construct and diagonalize a Hamiltonian using different methods")
 
 DOCTEST_TEST_CASE ("construct and diagonalize a Hamiltonian with energy restrictions")
 
 DOCTEST_TEST_CASE ("handle it gracefully if no eigenenergies are within energy restrictions")
 
template<typename Scalar >
GreenTensor< Scalar > construct_green_tensor (const std::array< typename traits::NumTraits< Scalar >::real_t, 3 > &distance_vector, int interaction_order)
 
template<typename Scalar >
OperatorMatrices< Scalar > construct_operator_matrices (const GreenTensor< Scalar > &green_tensor, const std::shared_ptr< const BasisAtom< Scalar > > &basis1, const std::shared_ptr< const BasisAtom< Scalar > > &basis2)
 
 DOCTEST_TEST_CASE ("construct a pair Hamiltonian")
 
 DOCTEST_TEST_CASE ("construction of rotation matrixes")
 
 DOCTEST_TEST_CASE ("construction of zyz euler angles")
 
 DOCTEST_TEST_CASE ("convert cartesian to spherical basis")
 
 DOCTEST_TEST_CASE ("construction of wigner D matrix")
 

Variables

constexpr int VERSION_MAJOR = 2
 
constexpr int VERSION_MINOR = 0
 
constexpr int VERSION_PATCH = 0
 
constexpr int COMPATIBLE_DATABASE_VERSION_MAJOR = 1
 
constexpr double VOLT_PER_CM_IN_ATOMIC_UNITS = 1 / 5.14220675112e9
 
constexpr double HARTREE_IN_GHZ = 6579683.920501762
 
constexpr double UM_IN_ATOMIC_UNITS = 1 / 5.29177210544e-5
 
constexpr std::array< std::string_view, 6 > quantum_number_l_labels = {"S", "P", "D", "F", "G", "H"}
 

Enumeration Type Documentation

◆ FloatType

enum class pairinteraction::FloatType
strong
Enumerator
FLOAT32 
FLOAT64 

Definition at line 8 of file FloatType.hpp.

◆ OperatorType

enum class pairinteraction::OperatorType
strong
Enumerator
ZERO 
ENERGY 
ELECTRIC_DIPOLE 
ELECTRIC_QUADRUPOLE 
ELECTRIC_QUADRUPOLE_ZERO 
ELECTRIC_OCTUPOLE 
MAGNETIC_DIPOLE 
IDENTITY 
ARBITRARY 

Definition at line 7 of file OperatorType.hpp.

◆ Parity

enum class pairinteraction::Parity : int
strong
Enumerator
ODD 
EVEN 
UNKNOWN 

Definition at line 11 of file Parity.hpp.

◆ TransformationType

enum class pairinteraction::TransformationType : unsigned char
strong
Enumerator
IDENTITY 
SORT_BY_KET 
SORT_BY_QUANTUM_NUMBER_F 
SORT_BY_QUANTUM_NUMBER_M 
SORT_BY_PARITY 
SORT_BY_ENERGY 
ROTATE 
ARBITRARY 

Definition at line 10 of file TransformationType.hpp.

Function Documentation

◆ construct_green_tensor()

template<typename Scalar >
GreenTensor< Scalar > pairinteraction::construct_green_tensor ( const std::array< typename traits::NumTraits< Scalar >::real_t, 3 > &  distance_vector,
int  interaction_order 
)

Definition at line 43 of file SystemPair.cpp.

References pairinteraction::GreenTensor< Scalar >::set_entries().

+ Here is the call graph for this function:

◆ construct_operator_matrices()

template<typename Scalar >
OperatorMatrices< Scalar > pairinteraction::construct_operator_matrices ( const GreenTensor< Scalar > &  green_tensor,
const std::shared_ptr< const BasisAtom< Scalar > > &  basis1,
const std::shared_ptr< const BasisAtom< Scalar > > &  basis2 
)

◆ diagonalize() [1/3]

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

Definition at line 17 of file diagonalize.cpp.

Referenced by main().

+ Here is the caller graph for this function:

◆ diagonalize() [2/3]

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

Definition at line 30 of file diagonalize.cpp.

◆ diagonalize() [3/3]

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

Definition at line 43 of file diagonalize.cpp.

◆ DOCTEST_TEST_CASE() [1/34]

◆ DOCTEST_TEST_CASE() [2/34]

pairinteraction::DOCTEST_TEST_CASE ( "compare parities"  )

Definition at line 11 of file Parity.test.cpp.

References EVEN, ODD, and UNKNOWN.

◆ DOCTEST_TEST_CASE() [3/34]

◆ DOCTEST_TEST_CASE() [4/34]

◆ DOCTEST_TEST_CASE() [5/34]

pairinteraction::DOCTEST_TEST_CASE ( "construct and diagonalize a Hamiltonian with energy restrictions"  )

◆ DOCTEST_TEST_CASE() [6/34]

◆ DOCTEST_TEST_CASE() [7/34]

pairinteraction::DOCTEST_TEST_CASE ( "construct and diagonalize multiple Hamiltonians in parallel" *  doctest::skiptrue)

◆ DOCTEST_TEST_CASE() [8/34]

pairinteraction::DOCTEST_TEST_CASE ( "construct and diagonalize two Hamiltonians in parallel"  )

◆ DOCTEST_TEST_CASE() [9/34]

pairinteraction::DOCTEST_TEST_CASE ( "constructing a class derived from ket"  )

Definition at line 14 of file Ket.test.cpp.

References EVEN, and pairinteraction::Ket::quantum_number_m.

◆ DOCTEST_TEST_CASE() [10/34]

pairinteraction::DOCTEST_TEST_CASE ( "construction of rotation matrixes"  )

Definition at line 10 of file euler.test.cpp.

◆ DOCTEST_TEST_CASE() [11/34]

pairinteraction::DOCTEST_TEST_CASE ( "construction of wigner D matrix"  )

Definition at line 11 of file wigner.test.cpp.

◆ DOCTEST_TEST_CASE() [12/34]

pairinteraction::DOCTEST_TEST_CASE ( "construction of zyz euler angles"  )

Definition at line 32 of file euler.test.cpp.

◆ DOCTEST_TEST_CASE() [13/34]

pairinteraction::DOCTEST_TEST_CASE ( "convert cartesian to spherical basis"  )

◆ DOCTEST_TEST_CASE() [14/34]

pairinteraction::DOCTEST_TEST_CASE ( "create a basis and sort it according to parity and m"  )

◆ DOCTEST_TEST_CASE() [15/34]

pairinteraction::DOCTEST_TEST_CASE ( "create a basis for strontium 87"  )

Definition at line 35 of file BasisAtomCreator.test.cpp.

References pairinteraction::Database::get_global_instance(), and pairinteraction::BasisAtomCreator< Scalar >::set_species().

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [16/34]

pairinteraction::DOCTEST_TEST_CASE ( "create a basis for strontium 88"  )

Definition at line 22 of file BasisAtomCreator.test.cpp.

References pairinteraction::Database::get_global_instance(), and pairinteraction::BasisAtomCreator< Scalar >::set_species().

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [17/34]

pairinteraction::DOCTEST_TEST_CASE ( "create a basis from kets"  )

◆ DOCTEST_TEST_CASE() [18/34]

◆ DOCTEST_TEST_CASE() [19/34]

pairinteraction::DOCTEST_TEST_CASE ( "create a ket for rubidium"  )

Definition at line 12 of file KetAtomCreator.test.cpp.

References pairinteraction::KetAtomCreator::create(), pairinteraction::Database::get_global_instance(), and ODD.

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [20/34]

◆ DOCTEST_TEST_CASE() [21/34]

pairinteraction::DOCTEST_TEST_CASE ( "Download content with GitHubDownloader" *  doctest::skiptrue)

Definition at line 28 of file GitHubDownloader.test.cpp.

References pairinteraction::GitHubDownloader::download(), and pairinteraction::Database::get_global_instance().

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [22/34]

◆ DOCTEST_TEST_CASE() [23/34]

◆ DOCTEST_TEST_CASE() [24/34]

◆ DOCTEST_TEST_CASE() [25/34]

◆ DOCTEST_TEST_CASE() [26/34]

pairinteraction::DOCTEST_TEST_CASE ( "Get rate limit with GitHubDownloader )

Definition at line 13 of file GitHubDownloader.test.cpp.

References pairinteraction::Database::get_global_instance(), and pairinteraction::GitHubDownloader::get_rate_limit().

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [27/34]

pairinteraction::DOCTEST_TEST_CASE ( "handle it gracefully if no eigenenergies are within energy restrictions"  )

◆ DOCTEST_TEST_CASE() [28/34]

◆ DOCTEST_TEST_CASE() [29/34]

pairinteraction::DOCTEST_TEST_CASE ( "ParquetManager functionality with github downloader"  )

◆ DOCTEST_TEST_CASE() [30/34]

pairinteraction::DOCTEST_TEST_CASE ( "print parities"  )

Definition at line 19 of file Parity.test.cpp.

References EVEN, ODD, and UNKNOWN.

◆ DOCTEST_TEST_CASE() [31/34]

pairinteraction::DOCTEST_TEST_CASE ( "sort parities"  )

Definition at line 30 of file Parity.test.cpp.

References EVEN, ODD, and UNKNOWN.

◆ DOCTEST_TEST_CASE() [32/34]

pairinteraction::DOCTEST_TEST_CASE ( "test for equality"  )

Definition at line 44 of file KetAtomCreator.test.cpp.

References pairinteraction::KetAtomCreator::create(), and pairinteraction::Database::get_global_instance().

+ Here is the call graph for this function:

◆ DOCTEST_TEST_CASE() [33/34]

◆ DOCTEST_TEST_CASE() [34/34]

◆ operator&()

constexpr TransformationType pairinteraction::operator& ( TransformationType  x,
TransformationType  y 
)
inlineconstexpr

Definition at line 21 of file TransformationType.hpp.

◆ operator*() [1/2]

template<typename Derived >
Derived pairinteraction::operator* ( const Operator< Derived > &  lhs,
const typename Operator< Derived >::scalar_t &  rhs 
)

Definition at line 216 of file Operator.cpp.

◆ operator*() [2/2]

template<typename Derived >
Derived pairinteraction::operator* ( const typename Operator< Derived >::scalar_t &  lhs,
const Operator< Derived > &  rhs 
)

Definition at line 209 of file Operator.cpp.

◆ operator+()

template<typename Derived >
Derived pairinteraction::operator+ ( const Operator< Derived > &  lhs,
const Operator< Derived > &  rhs 
)

Definition at line 248 of file Operator.cpp.

◆ operator+=()

template<typename Derived >
Derived & pairinteraction::operator+= ( Operator< Derived > &  lhs,
const Operator< Derived > &  rhs 
)

Definition at line 230 of file Operator.cpp.

◆ operator-()

template<typename Derived >
Derived pairinteraction::operator- ( const Operator< Derived > &  lhs,
const Operator< Derived > &  rhs 
)

Definition at line 258 of file Operator.cpp.

◆ operator-=()

template<typename Derived >
Derived & pairinteraction::operator-= ( Operator< Derived > &  lhs,
const Operator< Derived > &  rhs 
)

Definition at line 239 of file Operator.cpp.

◆ operator/()

template<typename Derived >
Derived pairinteraction::operator/ ( const Operator< Derived > &  lhs,
const typename Operator< Derived >::scalar_t &  rhs 
)

Definition at line 223 of file Operator.cpp.

◆ operator<<()

std::ostream & pairinteraction::operator<< ( std::ostream &  os,
const Parity parity 
)
inline

Definition at line 13 of file Parity.hpp.

References EVEN, and ODD.

◆ operator|()

constexpr TransformationType pairinteraction::operator| ( TransformationType  x,
TransformationType  y 
)
inlineconstexpr

Definition at line 25 of file TransformationType.hpp.

◆ operator~()

constexpr TransformationType pairinteraction::operator~ ( TransformationType  x)
inlineconstexpr

Definition at line 29 of file TransformationType.hpp.

◆ run_unit_tests()

int pairinteraction::run_unit_tests ( int  argc = 0,
char **  argv = {},
bool  download_missing = false,
bool  use_cache = true,
std::filesystem::path  database_dir = "" 
)

Definition at line 246 of file run_unit_tests.cpp.

References pairinteraction::paths::get_cache_directory(), pairinteraction::Database::get_global_instance(), OS_NAME, VERSION_MAJOR, VERSION_MINOR, and VERSION_PATCH.

Referenced by bind_run_unit_tests(), and main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setup()

void pairinteraction::setup ( )

Definition at line 18 of file setup.cpp.

References pairinteraction::paths::get_cache_directory().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TEST_CASE()

pairinteraction::TEST_CASE ( "ParquetManager functionality with mocked downloader"  )

Variable Documentation

◆ COMPATIBLE_DATABASE_VERSION_MAJOR

constexpr int pairinteraction::COMPATIBLE_DATABASE_VERSION_MAJOR = 1
inlineconstexpr

◆ HARTREE_IN_GHZ

constexpr double pairinteraction::HARTREE_IN_GHZ = 6579683.920501762
constexpr

Definition at line 25 of file BasisPairCreator.test.cpp.

Referenced by DOCTEST_TEST_CASE().

◆ quantum_number_l_labels

constexpr std::array<std::string_view, 6> pairinteraction::quantum_number_l_labels = {"S", "P", "D", "F", "G", "H"}
constexpr

Definition at line 19 of file KetAtom.cpp.

Referenced by pairinteraction::KetAtom::get_label().

◆ UM_IN_ATOMIC_UNITS

constexpr double pairinteraction::UM_IN_ATOMIC_UNITS = 1 / 5.29177210544e-5
constexpr

Definition at line 27 of file BasisPairCreator.test.cpp.

Referenced by DOCTEST_TEST_CASE().

◆ VERSION_MAJOR

constexpr int pairinteraction::VERSION_MAJOR = 2
inlineconstexpr

Definition at line 8 of file version.hpp.

Referenced by bind_version(), and run_unit_tests().

◆ VERSION_MINOR

constexpr int pairinteraction::VERSION_MINOR = 0
inlineconstexpr

Definition at line 9 of file version.hpp.

Referenced by bind_version(), and run_unit_tests().

◆ VERSION_PATCH

constexpr int pairinteraction::VERSION_PATCH = 0
inlineconstexpr

Definition at line 10 of file version.hpp.

Referenced by bind_version(), and run_unit_tests().

◆ VOLT_PER_CM_IN_ATOMIC_UNITS

constexpr double pairinteraction::VOLT_PER_CM_IN_ATOMIC_UNITS = 1 / 5.14220675112e9
constexpr

Definition at line 20 of file BasisAtomCreator.test.cpp.

Referenced by DOCTEST_TEST_CASE().