SOLIDstate
A C++ library for solid state physics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Typedefs | Enumerations | Functions | Variables
solid Namespace Reference

SOLIDstate namespace. More...

Classes

class  BaseState
 BaseState for HilbertSpace base. More...
 
class  Binomials
 Class for handling binomial coefficients. More...
 
class  BaseStateNumberConverter
 Converting BaseState into Number and vice versa It uses combinadics – Combinatorial number system More...
 
class  Eigensolver
 class, which only job is to find ground state (QuantumState) and its corresponding energy for given QuantumSystem More...
 
class  Canonical
 Ensemble: Canonical (int L, int N) with: L – sites N – particles. More...
 
class  IEnsemble
 interface for Ensemble class More...
 
class  Ensemble
 Ensemble parent class. More...
 
class  GrandCanonical
 Ensemble: GrandCanonical (int L) with: L – sites. More...
 
class  ParityGrandCanonical
 Ensemble: ParityGrandCanonical (int L, int parity) with: L – sites parity – parity Sector (even or odd number of particles) More...
 
class  Sector
 contains information about number of sites and particles in the sector More...
 
class  Factory
 produces stuff More...
 
class  Chain
 Chain (IGeometry implementation) class. More...
 
class  IGeometry
 Interface for Geometry class. More...
 
class  Geometry
 Geometry parrent class. More...
 
class  Ring
 Ring (IGeometry implementation) class. More...
 
class  IHamiltonian
 interface for Hamiltonian More...
 
class  Operator
 parent class for Quantum Mechanical Operators More...
 
class  KitaevHamiltonian
 Kitaev Hamiltonian implementation More...
 
class  TermsEnabled
 Terms enebled in Operator. More...
 
class  HilbertSpace
 Hilbert Space class for state enumeration within the Sectors (Sector) More...
 
class  ArgvParser
 simple argv class More...
 
class  Info
 static Info class More...
 
class  StandardMessages
 class for showing miscellaneous information More...
 
class  Timer
 static clock class More...
 
class  Version
 constant char* about solid version More...
 
class  Laboratory
 contains static methods for measurement More...
 
class  MatrixElementFiller
 Static class, which fills the QuantumSystem matrix elements. More...
 
class  IOperatorParameters
 interface for Observable class More...
 
class  Observable
 Observable parent class. More...
 
class  ParityOperator
 implementation of the ParityOperator More...
 
class  ParticleNumberOperator
 implementation of the Total ParticleNumberOperator More...
 
class  Parameters
 class for Parameters storing for generating IHamiltonian, Observable More...
 
class  ParametersChecker
 class useful for debugging of the Parameters More...
 
class  DynamicsSchedule
 Schedule for the dynamics (uniform time step) More...
 
class  MeasurementSchedule
 Schedule for the measurment. More...
 
class  QuantumDynamics
 Quantum Dynamics class. More...
 
class  AdiabaticSolver
 Adiabatic Solver header. More...
 
class  IQuantumDynamicSolver
 Quantum Dynamic Solver interface. More...
 
class  RK4
 Runge–Kutta forth order method (RK4) for solving differentional equations. More...
 
class  SolverSwitcher
 Switcher for QuantumDynamicSolver. More...
 
class  QuantumState
 template class representing Quantum State of the system More...
 
class  QuantumSystem
 general purpouse class for solving quantum systems More...
 
class  ITerm
 interface for Terms class More...
 
class  TermsEnumConverter
 static class for converting TermEnum into ITerm implementations More...
 
class  TermsTypeConverter
 Class for translating labels (e.g M, V) into TermsTypeEnum. More...
 
class  CreatePairTermFermions
 class describes pairing term for Fermions particles More...
 
class  HopTermFermions
 class describes hopping term for Fermions particles More...
 
class  OneBodyInteractionTermFermions
 class describes one body interaction term for Fermions particles More...
 
class  OneBodyInteractionTermSpins
 class describes one body interaction term for Spins particles More...
 
class  TwoBodyInteractionTermFermions
 class describes two body interaction term for Fermions particles More...
 
class  TwoBodyInteractionTermSpins
 class describes two body interaction term for Spins particles More...
 

Typedefs

typedef long int statenumber
 Hilbert space can be huge... More...
 
typedef arma::uvec baseStateContainer
 typedef for BaseState data container More...
 
typedef unsigned int binint
 
typedef std::vector< binintvecint
 
typedef std::vector
< std::vector< binint > > 
binomialArray
 
template<typename T >
using initList = std::initializer_list< std::pair< const std::string, T >>
 typedef for initializer_list More...
 
template<typename T >
using uniformParameters = std::map< std::string, T >
 typedef for map<std::string, T> More...
 
template<class T >
using Schedule = std::function< void(T &, double)>
 typedef for function of parameters (T) and time (double) More...
 
template<class T >
using ScheduleMap = std::map< std::string, Schedule< T >>
 typedef for map of label and Schedule<T> More...
 
typedef std::function< bool(double)> TimeToMeasure
 typedef for function that returns bool (time to measure?) from argument double (time) More...
 
template<template< typename > class T1, typename T2 >
using mapTermsFunction = std::map< TermsEnum, std::function< void(QuantumSystem< T1, T2 > &)>>
 typedef for map between TermsEnum and corresponding function More...
 

Enumerations

enum  TermsEnum {
  TermsEnum::FermionHop, TermsEnum::FermionOneBodyInteraction, TermsEnum::FermionTwoBodyInteraction, TermsEnum::FermionThreeBodyInteraction,
  TermsEnum::FermionCreateParticle, TermsEnum::FermionCreatePair, TermsEnum::FermionCreateTriple, TermsEnum::SpinHop,
  TermsEnum::SpinOneBodyInteraction, TermsEnum::SpinTwoBodyInteraction
}
 enum class for Terms enumeration More...
 
enum  TermsTypeEnum { TermsTypeEnum::LocalDiagonal, TermsTypeEnum::LocalNondiagonal, TermsTypeEnum::NonlocalDiagonal, TermsTypeEnum::NonlocalNondiagonal }
 Terms Type enum class. More...
 

Functions

template KitaevHamiltonian
< arma::Mat, double > 
Factory::CreateHamiltonian< KitaevHamiltonian< arma::Mat, double > > ()
 
template KitaevHamiltonian
< arma::Mat, arma::cx_double > 
Factory::CreateHamiltonian< KitaevHamiltonian< arma::Mat, arma::cx_double > > ()
 
template KitaevHamiltonian
< arma::SpMat, double > 
Factory::CreateHamiltonian< KitaevHamiltonian< arma::SpMat, double > > ()
 
template KitaevHamiltonian
< arma::SpMat, arma::cx_double > 
Factory::CreateHamiltonian< KitaevHamiltonian< arma::SpMat, arma::cx_double > > ()
 
template
ParticleNumberOperator
< arma::Mat, double > 
Factory::CreateObservable< ParticleNumberOperator< arma::Mat, double > > (int)
 
template
ParticleNumberOperator
< arma::Mat, arma::cx_double > 
Factory::CreateObservable< ParticleNumberOperator< arma::Mat, arma::cx_double > > (int)
 
template
ParticleNumberOperator
< arma::SpMat, double > 
Factory::CreateObservable< ParticleNumberOperator< arma::SpMat, double > > (int)
 
template
ParticleNumberOperator
< arma::SpMat, arma::cx_double > 
Factory::CreateObservable< ParticleNumberOperator< arma::SpMat, arma::cx_double > > (int)
 
template ParityOperator
< arma::Mat, double > 
Factory::CreateObservable< ParityOperator< arma::Mat, double > > (int)
 
template ParityOperator
< arma::Mat, arma::cx_double > 
Factory::CreateObservable< ParityOperator< arma::Mat, arma::cx_double > > (int)
 
template ParityOperator
< arma::SpMat, double > 
Factory::CreateObservable< ParityOperator< arma::SpMat, double > > (int)
 
template ParityOperator
< arma::SpMat, arma::cx_double > 
Factory::CreateObservable< ParityOperator< arma::SpMat, arma::cx_double > > (int)
 
const std::string green ("\033[1;32m")
 
const std::string red ("\033[0;31m")
 
const std::string reset ("\033[0m")
 
template<template< typename > class T1, typename T2 >
T1< T2 > DirectSum (T1< T2 > A, T1< T2 > B)
 Direct sum of two matrices. More...
 
constexpr unsigned int StrToInt (const char *str, int h=0)
 Covertr string to intiger copied from StackOverflow More...
 
template<typename T >
void Symmatgen (arma::SpMat< T > &mat)
 Symmetrize the matrix by adding transpose to it

\[ A \to A + A^\dagger \]

. More...

 
template void CreatePairTermFermions::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void CreatePairTermFermions::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void CreatePairTermFermions::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void CreatePairTermFermions::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 
template void HopTermFermions::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void HopTermFermions::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void HopTermFermions::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void HopTermFermions::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 
template void OneBodyInteractionTermFermions::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void OneBodyInteractionTermFermions::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void OneBodyInteractionTermFermions::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void OneBodyInteractionTermFermions::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 
template void OneBodyInteractionTermSpins::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void OneBodyInteractionTermSpins::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void OneBodyInteractionTermSpins::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void OneBodyInteractionTermSpins::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 
template void TwoBodyInteractionTermFermions::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void TwoBodyInteractionTermFermions::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void TwoBodyInteractionTermFermions::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void TwoBodyInteractionTermFermions::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 
template void TwoBodyInteractionTermSpins::FillElements< arma::Mat, double > (QuantumSystem< arma::Mat, double > &qSystem)
 
template void TwoBodyInteractionTermSpins::FillElements< arma::Mat, arma::cx_double > (QuantumSystem< arma::Mat, arma::cx_double > &qSystem)
 
template void TwoBodyInteractionTermSpins::FillElements< arma::SpMat, double > (QuantumSystem< arma::SpMat, double > &qSystem)
 
template void TwoBodyInteractionTermSpins::FillElements< arma::SpMat, arma::cx_double > (QuantumSystem< arma::SpMat, arma::cx_double > &qSystem)
 

Variables

Binomials binomials
 global binomials array More...
 
const int binomialsNo = 30
 
arma::wall_clock clockss
 

Detailed Description

SOLIDstate namespace.

Typedef Documentation

typedef arma::uvec solid::baseStateContainer

typedef for BaseState data container

typedef unsigned int solid::binint
typedef std::vector<std::vector<binint> > solid::binomialArray
template<typename T >
using solid::initList = typedef std::initializer_list<std::pair<const std::string, T>>

typedef for initializer_list

Template Parameters
Tdata type: double, std::complex<double> are supported
template<template< typename > class T1, typename T2 >
using solid::mapTermsFunction = typedef std::map<TermsEnum, std::function<void(QuantumSystem<T1, T2> &)>>

typedef for map between TermsEnum and corresponding function

Template Parameters
T1matrix type: arma::Mat and arma:SpMat are supported
T2data type: double, std::complex<double> are supported
template<class T >
using solid::Schedule = typedef std::function<void(T &, double)>

typedef for function of parameters (T) and time (double)

Template Parameters
Tparameters, e.g. arma::SpMat<double>
template<class T >
using solid::ScheduleMap = typedef std::map<std::string, Schedule<T>>

typedef for map of label and Schedule<T>

Template Parameters
Tparameters, e.g. arma::SpMat<double>
typedef long int solid::statenumber

Hilbert space can be huge...

typedef std::function<bool(double)> solid::TimeToMeasure

typedef for function that returns bool (time to measure?) from argument double (time)

template<typename T >
using solid::uniformParameters = typedef std::map<std::string, T>

typedef for map<std::string, T>

Template Parameters
Tdata type: double, std::complex<double> are supported
typedef std::vector<binint> solid::vecint

Enumeration Type Documentation

enum solid::TermsEnum
strong

enum class for Terms enumeration

Enumerator
FermionHop 

\(a_i^\dagger a_j\)

FermionOneBodyInteraction 

\(\hat n_i \hat n_j \)

FermionTwoBodyInteraction 

\(\hat n_i \hat n_j \)

FermionThreeBodyInteraction 

\(\hat n_i \hat n_j \hat n_k \)

FermionCreateParticle 

\(a_i^\dagger\)

FermionCreatePair 

\(a_i^\dagger a_j^\dagger\)

FermionCreateTriple 

\(a_i^\dagger a_j^\dagger a_k^\dagger \)

SpinHop 
SpinOneBodyInteraction 
SpinTwoBodyInteraction 
enum solid::TermsTypeEnum
strong

Terms Type enum class.

Distinction between (Non)Local and (Non)Diagonal Terms.

Example of Local and NonLocal operator \(A\):

o ---- o ---- o ---- o ---- o
^             ^      ^
|             |______|
Local A           NonLocal A

Example of Diagonal and NonDiagonal Term \(A\)

\[ \textrm{Diagonal:}\,\,\langle n | A | n \rangle \neq 0, \]

\[ \textrm{NonDiagonal:}\,\,\langle n | A | n \rangle = 0, \]

where \(|n\rangle\) is BaseState

Enumerator
LocalDiagonal 
LocalNondiagonal 
NonlocalDiagonal 
NonlocalNondiagonal 

Function Documentation

template void solid::CreatePairTermFermions::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::CreatePairTermFermions::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::CreatePairTermFermions::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::CreatePairTermFermions::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)
template<template< typename > class T1, typename T2 >
T1<T2> solid::DirectSum ( T1< T2 >  A,
T1< T2 >  B 
)

Direct sum of two matrices.

It returns the following matrix product:

\[ A\oplus B = \left[ \begin{array}{cc} A & 0 \\ 0 & B \end{array}\right] \]

Template Parameters
T1matrix type: arma::Mat and arma:SpMat are supported
T2data type: double, std::complex<double> are supported
Parameters
Aupper matrix
Blower matrix
Returns
T1<T2> direct sum \(A\oplus B\)
template KitaevHamiltonian< arma::Mat, arma::cx_double> solid::Factory::CreateHamiltonian< KitaevHamiltonian< arma::Mat, arma::cx_double > > ( )
template KitaevHamiltonian< arma::Mat, double> solid::Factory::CreateHamiltonian< KitaevHamiltonian< arma::Mat, double > > ( )
template KitaevHamiltonian<arma::SpMat, arma::cx_double> solid::Factory::CreateHamiltonian< KitaevHamiltonian< arma::SpMat, arma::cx_double > > ( )
template KitaevHamiltonian<arma::SpMat, double> solid::Factory::CreateHamiltonian< KitaevHamiltonian< arma::SpMat, double > > ( )
template ParityOperator< arma::Mat, arma::cx_double> solid::Factory::CreateObservable< ParityOperator< arma::Mat, arma::cx_double > > ( int  )
template ParityOperator< arma::Mat, double> solid::Factory::CreateObservable< ParityOperator< arma::Mat, double > > ( int  )
template ParityOperator<arma::SpMat, arma::cx_double> solid::Factory::CreateObservable< ParityOperator< arma::SpMat, arma::cx_double > > ( int  )
template ParityOperator<arma::SpMat, double> solid::Factory::CreateObservable< ParityOperator< arma::SpMat, double > > ( int  )
template ParticleNumberOperator< arma::Mat, arma::cx_double> solid::Factory::CreateObservable< ParticleNumberOperator< arma::Mat, arma::cx_double > > ( int  )
template ParticleNumberOperator< arma::Mat, double> solid::Factory::CreateObservable< ParticleNumberOperator< arma::Mat, double > > ( int  )
template ParticleNumberOperator<arma::SpMat, arma::cx_double> solid::Factory::CreateObservable< ParticleNumberOperator< arma::SpMat, arma::cx_double > > ( int  )
template ParticleNumberOperator<arma::SpMat, double> solid::Factory::CreateObservable< ParticleNumberOperator< arma::SpMat, double > > ( int  )
const std::string solid::green ( "\033[1;32m"  )
template void solid::HopTermFermions::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::HopTermFermions::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::HopTermFermions::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::HopTermFermions::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)
template void solid::OneBodyInteractionTermFermions::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::OneBodyInteractionTermFermions::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::OneBodyInteractionTermFermions::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::OneBodyInteractionTermFermions::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)
template void solid::OneBodyInteractionTermSpins::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::OneBodyInteractionTermSpins::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::OneBodyInteractionTermSpins::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::OneBodyInteractionTermSpins::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)
const std::string solid::red ( "\033[0;31m"  )
const std::string solid::reset ( "\033[0m"  )
constexpr unsigned int solid::StrToInt ( const char *  str,
int  h = 0 
)

Covertr string to intiger copied from StackOverflow

Parameters
strstring to convert
h
Returns
constexpr unsigned int intiger string representation
template<typename T >
void solid::Symmatgen ( arma::SpMat< T > &  mat)

Symmetrize the matrix by adding transpose to it

\[ A \to A + A^\dagger \]

.

Template Parameters
T
Parameters
matmatrix to symmetrize
template void solid::TwoBodyInteractionTermFermions::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::TwoBodyInteractionTermFermions::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::TwoBodyInteractionTermFermions::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::TwoBodyInteractionTermFermions::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)
template void solid::TwoBodyInteractionTermSpins::FillElements< arma::Mat, arma::cx_double > ( QuantumSystem< arma::Mat, arma::cx_double > &  qSystem)
template void solid::TwoBodyInteractionTermSpins::FillElements< arma::Mat, double > ( QuantumSystem< arma::Mat, double > &  qSystem)
template void solid::TwoBodyInteractionTermSpins::FillElements< arma::SpMat, arma::cx_double > ( QuantumSystem< arma::SpMat, arma::cx_double > &  qSystem)
template void solid::TwoBodyInteractionTermSpins::FillElements< arma::SpMat, double > ( QuantumSystem< arma::SpMat, double > &  qSystem)

Variable Documentation

Binomials solid::binomials

global binomials array

exporting global binomials

const int solid::binomialsNo = 30
arma::wall_clock solid::clockss