pairinteraction
A Rydberg Interaction Calculator
OperatorPair.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Pairinteraction Developers
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
5
8
9namespace pairinteraction {
10
11template <typename Scalar>
12OperatorPair<Scalar>::OperatorPair(std::shared_ptr<const basis_t> basis)
13 : Operator<OperatorPair<Scalar>>(std::move(basis)) {}
14
15template <typename Scalar>
16OperatorPair<Scalar>::OperatorPair(std::shared_ptr<const basis_t> basis, OperatorType type)
17 : Operator<OperatorPair<Scalar>>(std::move(basis)) {
18 if (type == OperatorType::ENERGY) {
20 } else {
21 throw std::invalid_argument("Only OperatorType::ENERGY is supported.");
22 }
23}
24
25// Explicit instantiations
26template class OperatorPair<double>;
28} // namespace pairinteraction
OperatorPair(std::shared_ptr< const basis_t > basis)