pairinteraction
A Rydberg Interaction Calculator
spherical.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
9#include <Eigen/Dense>
10#include <complex>
11
12using namespace std::complex_literals;
13
15
16const double SQRT_2 = std::sqrt(2.);
17const double SQRT_2_3 = std::sqrt(2. / 3.);
18const double SQRT_8_3 = std::sqrt(8. / 3.);
19
20// clang-format off
21// NOLINTNEXTLINE(cert-err58-cpp)
24// x y z
25 1, -1i, 0, // p_{1,-1}
26 0, 0, SQRT_2, // p_{1,0}
27 -1, -1i, 0 // p_{1,1}
28).finished() * std::sqrt(1./2.);
29// clang-format on
30
31// clang-format off
32// NOLINTNEXTLINE(cert-err58-cpp)
33const Eigen::Matrix<std::complex<double>, 6, 9> CARTESIAN_TO_SPHERICAL_KAPPA2 =
34(Eigen::Matrix<std::complex<double>, 6, 9>() <<
35// xx xy xz yx yy yz zx zy zz
36 1, -1i, 0, -1i, -1, 0, 0, 0, 0, // p_{2,-2}
37 0, 0, 1, 0, 0, -1i, 1, -1i, 0, // p_{2,-1}
38 -SQRT_2_3, 0, 0, 0, -SQRT_2_3, 0, 0, 0, SQRT_8_3, // p_{2,0}
39 0, 0, -1, 0, 0, -1i, -1, -1i, 0, // p_{2,1}
40 1, 1i, 0, 1i, -1, 0, 0, 0, 0, // p_{2,2}
41 SQRT_2_3, 0, 0, 0, SQRT_2_3, 0, 0, 0, SQRT_2_3 // p_{0,0}
42).finished() * std::sqrt(1./24.);
43// clang-format on
44
45} // namespace pairinteraction::spherical
Matrix< Type, 3, 3 > Matrix3
const Eigen::Matrix< std::complex< double >, 6, 9 > CARTESIAN_TO_SPHERICAL_KAPPA2
Definition: spherical.cpp:33
const Eigen::Matrix3< std::complex< double > > CARTESIAN_TO_SPHERICAL_KAPPA1
Definition: spherical.cpp:22