High-precision calculations for one- and two-valence atomic systems
MixedStates.hpp
1#pragma once
2#include "CSF.hpp"
3#include "Coulomb/QkTable.hpp"
4#include "Coulomb/meTable.hpp"
5#include "LinAlg/include.hpp"
6#include "Wavefunction/DiracSpinor.hpp"
7#include <cstddef>
8#include <vector>
9
10namespace CI {
11
12/*!
13 @brief Action of a one-body operator on a CI state, in the CSF basis.
14 @details
15 Forms the vector
16
17 \f[
18 T_I = \sum_K \redmatel{I}{T^{(K)}}{K} \, c^{(0)}_K,
19 \f]
20
21 where \f$ I \f$ runs over the CSFs in @p CSFs (which have total angular
22 momentum @p twoJ /2), \f$ K \f$ runs over the CSFs of the reference state
23 \f$ \Psi_0 \f$ (solution @p i0 of @p Psi0), and \f$ c^{(0)}_K \f$ are its CI
24 expansion coefficients.
25
26 The CSF matrix elements are reduced (see @ref RME_CSF2), formed from the
27 single-particle reduced matrix elements in @p h; so is the result.
28
29 @param CSFs CSFs spanning the block the operator maps into.
30 @param twoJ Twice the total angular momentum, 2J, of @p CSFs.
31 @param Psi0 CI solutions containing the reference state.
32 @param i0 Index of the reference solution within @p Psi0.
33 @param h Table of single-particle reduced matrix elements of T.
34 @param K_rank Rank of the tensor operator T.
35 @return Vector \f$ T_I \f$, of length @p CSFs .size().
36*/
37[[nodiscard]] LinAlg::Vector<double>
38TPsi_reduced(const std::vector<CSF2> &CSFs, int twoJ, const PsiJPi &Psi0,
39 std::size_t i0, const Coulomb::meTable<double> &h, int K_rank);
40
41/*!
42 @brief Solves the CI mixed-states (Sternheimer) equation for a one-body
43 operator.
44 @details
45 Finds the first-order correction to the CI state \f$ \Psi_0 \f$ (solution
46 @p i0 of @p Psi0, with energy \f$ E_0 \f$) due to the one-body operator
47 \f$ T^{(K)} \f$, expanded over the CSFs of a single (J, parity) block:
48
49 \f[
50 \ket{\delta\Psi} = \sum_I c_I \ket{I; J^\pi}.
51 \f]
52
53 The coefficients solve the linear system
54
55 \f[
56 \sum_J \left[ \matel{I}{H}{J} - (E_0 + \omega) \, \delta_{IJ} \right] c_J
57 = - \sum_K \redmatel{I}{T^{(K)}}{K} \, c^{(0)}_K,
58 \f]
59
60 where \f$ H \f$ is the CI Hamiltonian in the block defined by @p target
61 (given as the matrix @p Hci, e.g., from @ref construct_Hci), and the
62 right-hand side is formed by @ref TPsi_reduced.
63
64 Since the right-hand side is reduced (in \f$ T \f$), so is the solution: for
65 any CI state \f$ A \f$ in the same block, the mixed state satisfies
66
67 \f[
68 \sum_I c^A_I \, c_I
69 = \frac{\redmatel{A}{T^{(K)}}{\Psi_0}}{E_0 + \omega - E_A},
70 \f]
71
72 i.e., the sum over the entire spectrum of that block, without finding (or
73 summing over) the individual CI solutions.
74
75 Returned as a @ref PsiJPi holding a single "solution", the coefficients
76 \f$ c_I \f$. Its stored energy is \f$ E_0 \f$, that of the reference state
77 (not an eigenvalue).
78
79 @param Psi0 CI solutions containing the reference state.
80 @param i0 Index of the reference solution within @p Psi0.
81 @param target Defines the block the mixed state lives in (2J, parity, and
82 CSF list); its solutions, if any, are not used.
83 @param Hci CI Hamiltonian matrix in the CSF basis of @p target.
84 @param h Table of single-particle reduced matrix elements of T.
85 @param K_rank Rank of the tensor operator T.
86 @param omega Frequency: the mixed state due to a time-dependent operator,
87 \f$ T e^{-i\omega t} \f$, has denominators
88 \f$ E_0 + \omega - E_A \f$ [0].
89 @return PsiJPi for the @p target block, holding the single mixed state.
90 @see project_out, to remove individual levels from the mixed state.
91
92 @note If @p target has the same J and parity as @p Psi0, and
93 \f$ \omega = 0 \f$, the matrix on the left is singular, since
94 \f$ \Psi_0 \f$ itself has zero eigenvalue. In that case,
95 \f$ \Psi_0 \f$ is projected out (equivalent to subtracting
96 \f$ \redmatel{\Psi_0}{T}{\Psi_0} \f$ from the right-hand side).
97
98 @note Any other state degenerate with \f$ E_0 + \omega \f$ also makes the
99 system singular. Its term in the sum over states is divergent, and must
100 be dealt with separately, as in degenerate perturbation theory.
101
102 @note If the operator cannot connect the two blocks (triangle rule or
103 parity), the right-hand side vanishes, and the mixed state is zero.
104*/
105[[nodiscard]] PsiJPi solve_mixed_state(const PsiJPi &Psi0, std::size_t i0,
106 const PsiJPi &target,
107 const LinAlg::Matrix<double> &Hci,
109 int K_rank, double omega = 0.0);
110
111/*!
112 @brief Removes CI levels from a mixed state, so that it is orthogonal to them.
113 @details
114 A mixed state is implicitly a sum over the entire spectrum of its (J, parity):
115
116 \f[
117 \ket{\delta\Psi} = \sum_A \ket{A}
118 \frac{\redmatel{A}{T^{(K)}}{\Psi_0}}{E_0 + \omega - E_A}.
119 \f]
120
121 Subtracting the projection onto the listed levels removes exactly their terms
122 from that sum, so they may be treated separately: e.g., with experimental
123 energies or matrix elements.
124
125 @param dPsi Mixed state, from @ref solve_mixed_state (taken by value).
126 @param levels Solved CI levels of the same (J, parity): the eigenstates of
127 the CI Hamiltonian used for the mixed state.
128 @param indices Which solutions of @p levels to remove.
129 @return The mixed state, orthogonal to the listed levels.
130
131 @note Removing a level degenerate with \f$ E_0 + \omega \f$ does not help:
132 the mixed state itself does not exist in that case (see
133 @ref solve_mixed_state).
134*/
135[[nodiscard]] PsiJPi project_out(PsiJPi dPsi, const PsiJPi &levels,
136 const std::vector<std::size_t> &indices);
137
138/*!
139 @brief Solves the CI mixed-states equation; constructs the CI matrix
140 internally.
141 @details
142 Convenience overload of @ref solve_mixed_state: forms the CSFs for the
143 requested (@p twoJ, @p parity) block from @p ci_sp_basis, constructs the CI
144 Hamiltonian matrix via @ref construct_Hci, then solves the mixed-states
145 equation.
146
147 Use the other overload if the CI matrix for the target block is already
148 available (e.g., when several operators are considered).
149
150 @param Psi0 CI solutions containing the reference state.
151 @param i0 Index of the reference solution within @p Psi0.
152 @param twoJ Twice the total angular momentum, 2J, of the mixed state.
153 @param parity Parity of the mixed state: +1 or -1. This is the parity of
154 @p Psi0 times that of the operator.
155 @param ci_sp_basis Single-particle basis used to construct the CSFs.
156 @param h Table of single-particle reduced matrix elements of T.
157 @param K_rank Rank of the tensor operator T.
158 @param h1 One-body matrix element table (may include Sigma_1).
159 @param qk Coulomb Q^k integral table.
160 @param Bk Pointer to Breit W^k table; ignored if nullptr.
161 @param Sk Pointer to Sigma_2 L^k table; ignored if nullptr.
162 @param omega Frequency; see the other overload [0].
163 @return PsiJPi for the (@p twoJ, @p parity) block, holding the single mixed
164 state.
165*/
166[[nodiscard]] PsiJPi
167solve_mixed_state(const PsiJPi &Psi0, std::size_t i0, int twoJ, int parity,
168 const std::vector<DiracSpinor> &ci_sp_basis,
169 const Coulomb::meTable<double> &h, int K_rank,
170 const Coulomb::meTable<double> &h1,
171 const Coulomb::QkTable &qk,
172 const Coulomb::WkTable *Bk = nullptr,
173 const Coulomb::LkTable *Sk = nullptr, double omega = 0.0);
174
175} // namespace CI
Base class template to store Coulomb integrals, and similar. 3 specific cases (by template instantiat...
Definition QkTable.hpp:118
Look-up table for matrix elements. Note: does not assume any symmetry: (a,b) is stored independantly ...
Definition meTable.hpp:17
Row-major dense matrix with arithmetic and linear algebra support.
Definition Matrix.hpp:208
Owning 1D array; inherits from Matrix<T> with a single column.
Definition Vector.hpp:25
Functions and classes for Configuration Interaction calculations.
Definition CI_Integrals.cpp:22
LinAlg::Vector< double > TPsi_reduced(const std::vector< CSF2 > &CSFs, int twoJ, const PsiJPi &Psi0, std::size_t i0, const Coulomb::meTable< double > &h, int K_rank)
Action of a one-body operator on a CI state, in the CSF basis.
Definition MixedStates.cpp:10
PsiJPi project_out(PsiJPi dPsi, const PsiJPi &levels, const std::vector< std::size_t > &indices)
Removes CI levels from a mixed state, so that it is orthogonal to them.
Definition MixedStates.cpp:85
PsiJPi solve_mixed_state(const PsiJPi &Psi0, std::size_t i0, const PsiJPi &target, const LinAlg::Matrix< double > &Hci, const Coulomb::meTable< double > &h, int K_rank, double omega)
Solves the CI mixed-states (Sternheimer) equation for a one-body operator.
Definition MixedStates.cpp:39