pairinteraction
A Rydberg Interaction Calculator
OperatorAtom.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Pairinteraction Developers
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4#pragma once
5
8
9#include <memory>
10#include <vector>
11
12namespace pairinteraction {
13class Database;
14
15enum class OperatorType;
16
17template <typename Scalar>
18class BasisAtom;
19
20class KetAtom;
21
22template <typename T>
23class OperatorAtom;
24
25template <typename Scalar>
27 using scalar_t = Scalar;
29 using ket_t = KetAtom;
30 using ketvec_t = std::vector<std::shared_ptr<const ket_t>>;
32};
33
34template <typename Scalar>
35class OperatorAtom : public Operator<OperatorAtom<Scalar>> {
36public:
38
41
42 OperatorAtom(std::shared_ptr<const basis_t> basis);
43 OperatorAtom(std::shared_ptr<const basis_t> basis, OperatorType type, int q = 0);
44
45private:
46 friend class Database;
47
48 OperatorAtom(std::shared_ptr<const basis_t> basis,
49 Eigen::SparseMatrix<Scalar, Eigen::RowMajor> &&matrix);
50};
51
52extern template class OperatorAtom<double>;
53extern template class OperatorAtom<std::complex<double>>;
54} // namespace pairinteraction
Class for creating a basis of atomic kets.
Definition: BasisAtom.hpp:40
Class for representing atomic kets.
Definition: KetAtom.hpp:21
typename traits::CrtpTraits< Type >::basis_t basis_t
OperatorAtom(std::shared_ptr< const basis_t > basis)
std::shared_ptr< const basis_t > basis
Definition: Operator.hpp:86
Eigen::SparseMatrix< scalar_t, Eigen::RowMajor > matrix
Definition: Operator.hpp:87
std::vector< std::shared_ptr< const ket_t > > ketvec_t
typename traits::NumTraits< Scalar >::real_t real_t
Helper struct to extract types from a derived basis type. Must be specialized for each derived basis ...
Definition: traits.hpp:24
Helper struct to extract types from a numerical type.
Definition: traits.hpp:35