High-precision calculations for one- and two-valence atomic systems
SecondOrder.hpp
1#pragma once
2#include "CI_Integrals.hpp"
3#include "CSF.hpp"
4#include "Coulomb/meTable.hpp"
5#include "DiracOperator/TensorOperator.hpp"
6#include <cstddef>
7#include <iostream>
8#include <utility>
9#include <vector>
10
11namespace ExternalField {
12class CorePolarisation;
13}
14
15namespace CI {
16
17//==============================================================================
18/*!
19 @brief Angular coefficients of the two terms of the second-order amplitude
20 A^K.
21 @details
22 For a transition \f$ a \to b \f$ due to two one-body operators, \f$ t \f$
23 (rank \f$ k_t \f$, frequency \f$ \omega \f$) and \f$ s \f$ (rank
24 \f$ k_s \f$, frequency \f$ \omega_s \f$), the amplitude with definite
25 projections \f$ q_1, q_2 \f$ of the two operators is
26
27 \f[
28 A^{k_tk_s}_{q_1q_2} = \sum_n \left[
29 \frac{\matel{b}{t_{q_1}}{n}\matel{n}{s_{q_2}}{a}}{E_a + \omega_s - E_n}
30 + \frac{\matel{b}{s_{q_2}}{n}\matel{n}{t_{q_1}}{a}}{E_a + \omega - E_n}
31 \right],
32 \f]
33
34 the sum over \f$ n \f$ running over the magnetic quantum numbers too, and
35 \f$ E_b = E_a + \omega + \omega_s \f$. The operators are coupled to rank
36 \f$ K \f$, with \f$ Q = q_1 + q_2 = m_b - m_a \f$ and
37 \f$ [K] \equiv 2K+1 \f$:
38
39 \f[
40 A^K_Q = \sum_{q_1q_2}\braket{k_tq_1\,k_sq_2}{KQ}\,A^{k_tk_s}_{q_1q_2}
41 = (-1)^{k_t-k_s+Q}\sqrt{[K]}\sum_{q_1q_2}
42 \threej{k_t}{k_s}{K}{q_1}{q_2}{-Q}\,A^{k_tk_s}_{q_1q_2},
43 \f]
44
45 and the reduced amplitude follows from the Wigner-Eckart theorem (the
46 convention of DiracOperator::TensorOperator::rme3js):
47
48 \f[
49 A^K_Q = (-1)^{J_b-m_b}\threej{J_b}{K}{J_a}{-m_b}{Q}{m_a}\,A^K .
50 \f]
51
52 \f$ A^K \f$ is the reduced matrix element of \f$ [t \times s]^{K} \f$ (both
53 terms). In terms of reduced matrix elements of the two operators,
54
55 \f[
56 A^K = \sum_n \left[
57 c_1(J_n)\,
58 \frac{\redmatel{b}{t}{n}\redmatel{n}{s}{a}}{E_a + \omega_s - E_n}
59 + c_2(J_n)\,
60 \frac{\redmatel{b}{s}{n}\redmatel{n}{t}{a}}{E_a + \omega - E_n}
61 \right],
62 \f]
63
64 with the coefficients returned here
65
66 \f[
67 c_1 = (-1)^{K}\sqrt{[K]}\,(-1)^{J_b+J_a}
68 \sixj{K}{k_s}{k_t}{J_n}{J_b}{J_a},
69 \qquad
70 c_2 = (-1)^{k_t+k_s}\sqrt{[K]}\,(-1)^{J_b+J_a}
71 \sixj{K}{k_t}{k_s}{J_n}{J_b}{J_a}.
72 \f]
73
74 For a real transition the whole frequency is usually carried by \f$ t \f$, so
75 that \f$ \omega = E_b - E_a \f$ and \f$ s \f$ is static. For the dynamic
76 polarisability of a single state, \f$ b = a \f$ and
77 \f$ \omega_s = -\omega \f$, giving the two denominators
78 \f$ E_a \mp \omega - E_n \f$.
79
80 ## Sign convention
81
82 The coupling above is the standard Clebsch-Gordan one, \f$ t \f$ first. The
83 alternative definition
84
85 \f[
86 \tilde A^K_Q = (-1)^{Q}\sqrt{[K]}\sum_{q_1q_2}
87 \threej{k_t}{k_s}{K}{-q_1}{-q_2}{Q}\,A^{k_tk_s}_{q_1q_2}
88 = (-1)^K A^K_Q
89 \f]
90
91 differs by \f$ (-1)^K \f$. It cancels in anything rebuilt from
92 \f$ A^K_Q \f$ (@ref z_component), so only affects quantities taken directly
93 from \f$ A^K \f$ at odd \f$ K \f$: the sign of \f$ \beta \f$.
94
95 ## Specific cases
96
97 With \f$ t = s = d \f$ (E1) and \f$ [J] \equiv 2J+1 \f$:
98
99 \f[
100 \alpha_0 = \frac{A^0}{\sqrt{3[J_a]}}
101 \quad (K=0,\ b=a),
102 \qquad
103 \alpha_2 = -\sqrt{\frac{2J(2J-1)}{3(J+1)(2J+1)(2J+3)}}\;A^2
104 \quad (K=2,\ J_b=J_a=J\ge1),
105 \f]
106 \f[
107 \beta = \frac{A^1}{\sqrt{2}\,\redmatel{b}{\bm\sigma}{a}}
108 \quad (K=1),
109 \f]
110
111 see @ref sigma_rme. With \f$ t = d \f$ and \f$ s = h_W \f$ (PNC,
112 \f$ k_s = 0 \f$, so \f$ K = 1 \f$), at \f$ m_a = m_b = m \f$:
113
114 \f[
115 E_{\rm PNC} = A^1_0
116 = (-1)^{J_b-m}\threej{J_b}{1}{J_a}{-m}{0}{m}\,A^1 .
117 \f]
118
119 @param K Rank of the amplitude.
120 @param kt,ks Ranks of the \f$ t \f$ and \f$ s \f$ operators.
121 @param twoJb 2J of the final state.
122 @param twoJn 2J of the intermediate states.
123 @param twoJa 2J of the initial state.
124 @return \f$ \{c_1, c_2\} \f$.
125*/
126[[nodiscard]] std::pair<double, double>
127A_K_coefs(int K, int kt, int ks, int twoJb, int twoJn, int twoJa);
128
129/*!
130 @brief Converts the reduced amplitude A^K to its contribution to the
131 z-component of the amplitude.
132 @details
133 Undoing the coupling of @ref A_K_coefs,
134
135 \f[
136 A^{k_tk_s}_{q_1q_2}
137 = \sum_{KQ}\braket{k_tq_1\,k_sq_2}{KQ}\,A^K_Q ,
138 \f]
139
140 so the z-component (\f$ m_a = m_b = m \f$, and \f$ q_1 = q_2 = 0 \f$, hence
141 \f$ Q = 0 \f$) is the sum over ranks
142
143 \f[
144 A_{zz} \equiv A^{k_tk_s}_{00}
145 = \sum_K \braket{k_t 0\,,\,k_s 0}{K 0} \,
146 (-1)^{J_b-m}\threej{J_b}{K}{J_a}{-m}{0}{m}
147 A^K,
148 \f]
149
150 the factor returned here being that of the \f$ K \f$ term. The
151 Clebsch-Gordan coefficient is unity for \f$ k_s = 0 \f$ (as for a PNC
152 amplitude), but not in general.
153
154 @param K Rank of the amplitude.
155 @param kt,ks Ranks of the \f$ t \f$ and \f$ s \f$ operators.
156 @param twoJb,twoJa 2J of the final and initial states.
157 @param two_m Twice the z-component of the angular momentum.
158*/
159[[nodiscard]] double z_component(int K, int kt, int ks, int twoJb, int twoJa,
160 int two_m);
161
162//! Relative sign between <A||h||B> and <B||h||A>, for CI states with total
163//! angular momenta 2J_A and 2J_B (cf DiracOperator::TensorOperator::symm_sign)
164[[nodiscard]] int symm_sign(const DiracOperator::TensorOperator *h, int twoJA,
165 int twoJB);
166
167/*!
168 @brief Reduced matrix element of the Pauli spin operator between two CI
169 states, <b||sigma||a>.
170 @details
171 This is the factor that defines the vector transition polarisability, beta:
172 the rank-1 part of the amplitude is written
173
174 \f[
175 A^{1} = i\,\beta\,(\epsilon^L\times\epsilon^S)\cdot
176 \matel{J_bM_b}{\bm\sigma}{J_aM_a},
177 \qquad
178 \beta = \frac{A^1}{\sqrt{2}\,\redmatel{b}{\bm\sigma}{a}},
179 \f]
180
181 the matrix element expressing the Wigner-Eckart factor of the rank-1
182 amplitude (any rank-1 operator would do; \f$ \bm\sigma \f$ is conventional).
183
184 Evaluated directly, as \f$ \bm\sigma = 2S \f$: the single-particle table of
185 @ref DiracOperator::s, contracted with the CI expansions by @ref ReducedME.
186 Nothing is assumed about L and S, which are not good quantum numbers for
187 relativistic CI states.
188
189 @param Psi_b,ib Final CI state (solution @p ib of @p Psi_b).
190 @param Psi_a,ia Initial CI state.
191 @param ci_basis Single-particle basis of the CI expansion.
192 @return \f$ \redmatel{b}{\bm\sigma}{a} \f$.
193
194 @note For a single valence electron the convention is to drop the radial
195 overlap, so that \f$ \redmatel{7s}{\bm\sigma}{6s} = 2S_{\kappa\kappa}
196 \f$ rather than zero (as in the dcp module, via @ref Angular::S_kk).
197 There is no consistent analogue for a multi-configuration state:
198 forcing the radial overlaps to unity spoils even the diagonal matrix
199 element, by adding cross-configuration terms.
200
201 @note So this vanishes for two states with no configuration in common (e.g.,
202 3s3p and 3s4p). Then beta does not parameterise the rank-1 amplitude,
203 and \f$ A^1 \f$ should be used directly.
204*/
205[[nodiscard]] double sigma_rme(const PsiJPi &Psi_b, std::size_t ib,
206 const PsiJPi &Psi_a, std::size_t ia,
207 const std::vector<DiracSpinor> &ci_basis);
208
209//==============================================================================
210/*!
211 @brief Second-order amplitude A^K between two CI states, evaluated
212 with CI mixed states.
213 @details
214 Evaluates \f$ A^K \f$; see @ref A_K_coefs.
215 The sums over the intermediate spectrum are performed with the CI mixed
216 states of @ref solve_mixed_state, so they are complete: there is no sum over
217 individual CI solutions, and no truncation of the spectrum. All intermediate
218 states of a given (J, parity) share the same angular coefficient, so one
219 mixed state per (J, parity) and per term is required.
220
221 Each sum is formed in two independent ways: with the mixed states of
222 \f$ s \f$, and with those of \f$ t \f$. Writing \f$ \ket{A_s} \f$ for the
223 state \f$ a \f$ plus its mixed state due to \f$ s \f$, these are the
224 first-order parts of
225
226 \f[
227 \redmatel{B_s}{t}{A_s}
228 \qquad{\rm and}\qquad
229 \redmatel{B_t}{s}{A_t},
230 \f]
231
232 returned as the two elements of the pair. They must agree; the difference is
233 a check on the numerics.
234
235 Covers, e.g., static, dynamic, and transition polarisabilities
236 (\f$ t = s = E1 \f$) and PNC amplitudes (\f$ s \f$ = PNC operator).
237
238 @param K Rank of the amplitude. It vanishes unless
239 \f$ |k_t-k_s| \le K \le k_t+k_s \f$ and
240 \f$ (J_b, K, J_a) \f$ satisfy the triangle rule.
241 @param Psi_b,ib Final CI state (solution @p ib of @p Psi_b).
242 @param Psi_a,ia Initial CI state.
243 @param t,t_me The \f$ t \f$ operator, and its table of single-particle
244 reduced matrix elements (which may include RPA, structure
245 radiation). For a frequency-dependent operator or RPA, the
246 table should have been formed at @p omega.
247 @param s,s_me The \f$ s \f$ operator, and its table (formed at
248 @p omega_s).
249 @param omega Frequency of \f$ t \f$. For a real transition carried entirely
250 by \f$ t \f$ this is \f$ E_b - E_a \f$, for which the second
251 denominator above is just \f$ E_b - E_n \f$.
252 @param omega_s Frequency of \f$ s \f$. Energy conservation requires
253 \f$ \omega + \omega_s = E_b - E_a \f$; it is zero for a
254 transition carried entirely by \f$ t \f$, and
255 \f$ -\omega \f$ for a dynamic polarisability.
256 @param ints Integral tables, used to construct the CI Hamiltonian of each
257 intermediate (J, parity); e.g., Wavefunction::CI_integrals().
258 @param levels_to_remove CI levels to be removed from the intermediate
259 states (see @ref project_out), so that they may be treated
260 separately - e.g., with experimental energies. See @ref Level;
261 the CI problem for those (J, parity) is solved here, as far as
262 required.
263 @param solved_Jpi CI solutions of the run, one per J/Pi; e.g.,
264 Wavefunction::CIwfs(). An intermediate J/Pi that is among
265 them has its CI Hamiltonian formed at that J/Pi's own
266 reference energy, as in the run; otherwise at the run's
267 ground-state energy (see @ref construct_Hci). Only matters
268 with the energy-dependent corrections (dSigma/dE,
269 Brillouin-Wigner Sigma_2).
270 @param outstream Stream for progress and the intermediate sums.
271 @return The two evaluations of \f$ A^K \f$: with the mixed states of
272 \f$ s \f$, and with those of \f$ t \f$.
273
274 @note The parity selection rule \f$ \pi_a\pi_b = \pi_t\pi_s \f$ must hold,
275 else the amplitude is zero.
276
277 @note If a state of an intermediate (J, parity) is degenerate with the
278 denominator (\f$ E_a + \omega_s \f$ or \f$ E_a + \omega \f$), the
279 mixed-states
280 equation is singular, and its term in \f$ A^K \f$ is divergent. This
281 cannot happen for operators of odd parity (as for polarisabilities and
282 PNC), since then the intermediate states have the opposite parity to
283 \f$ a \f$ and \f$ b \f$.
284
285 @note Corrections to the matrix elements (RPA, structure radiation,
286 normalisation of states) enter through the single-particle tables.
287
288*/
289[[nodiscard]] std::pair<double, double>
290A_K(int K, const PsiJPi &Psi_b, std::size_t ib, const PsiJPi &Psi_a,
291 std::size_t ia, const DiracOperator::TensorOperator *t,
292 const Coulomb::meTable<double> &t_me,
294 const Coulomb::meTable<double> &s_me, double omega, double omega_s,
295 const Integrals &ints, const std::vector<Level> &levels_to_remove = {},
296 const std::vector<PsiJPi> &solved_Jpi = {},
297 std::ostream &outstream = std::cout);
298
299//==============================================================================
300/*!
301 @brief Contribution to A^K from the polarisation of the closed core.
302 @details
303 The intermediate states of @ref A_K carry no core hole. This is the missing
304 term: a core electron \f$ c \f$ excited by one operator and de-excited by
305 the other,
306
307 \f[
308 \redmatel{c}{[t\times s]^0}{c} = \sum_m \left[
309 c_1\,\frac{\redmatel{c}{t}{m}\redmatel{m}{s}{c}}{\en_c + \omega_s - \en_m}
310 + c_2\,\frac{\redmatel{c}{s}{m}\redmatel{m}{t}{c}}{\en_c + \omega - \en_m}
311 \right],
312 \f]
313 \f[
314 A^0_{\rm core} = \sqrt{[J]}\sum_c \sqrt{[j_c]}\,
315 \redmatel{c}{[t\times s]^0}{c},
316 \f]
317
318 with \f$ c_1, c_2 \f$ from @ref A_K_coefs at \f$ (j_c, j_m, j_c) \f$.
319
320 The core is closed, \f$ J=0 \f$, so this is non-zero only for \f$ K=0 \f$
321 (which requires \f$ k_t=k_s \f$) and only for \f$ b=a \f$, the valence factor
322 being \f$ \braket{B}{A} \f$. For \f$ t=s=E1 \f$ it is the core
323 polarisability. Apart from \f$ \sqrt{[J]} \f$ it is the same for every CI
324 level, so it need only be evaluated once.
325
326 @param K Rank of the amplitude; zero unless \f$ K=0 \f$.
327 @param twoJ 2J of the CI state. The diagonal condition is left to the
328 caller: zero unless the final and initial states are the same.
329 @param t,s The two operators.
330 @param omega,omega_s Frequency of each operator; see @ref A_K.
331 @param core Hole states \f$ c \f$; e.g., Wavefunction::core().
332 @param excited Particle states \f$ m \f$: basis states above the Fermi
333 level. Not restricted to the CI basis, and states occupied by
334 the valence electrons are not removed - see @ref A_K_cv.
335 @param dVt,dVs RPA for each operator, solved at the frequency of that
336 operator. May be nullptr.
337 @return \f$ A^0_{\rm core} \f$.
338
339 @note RPA enters once: of the two matrix elements, only the one acting on
340 the core orbital is dressed. Dressing both counts each RPA chain
341 twice, since the sum over \f$ c \f$ already runs over every link of
342 the chain. Same counting as the polarisability module.
343
344 @note No structure radiation: both lines here are core lines
345*/
346[[nodiscard]] double
347A_K_core(int K, int twoJ, const DiracOperator::TensorOperator *t,
348 const DiracOperator::TensorOperator *s, double omega, double omega_s,
349 const std::vector<DiracSpinor> &core,
350 const std::vector<DiracSpinor> &excited,
351 const ExternalField::CorePolarisation *dVt = nullptr,
352 const ExternalField::CorePolarisation *dVs = nullptr);
353
354/*!
355 @brief Core-valence contribution to A^K: the Pauli blocking of the
356 core excitations by the valence electrons.
357 @details
358 @ref A_K_core sums over every particle state, including those occupied by
359 the valence electrons. That excitation is blocked; the path that replaces it
360 is one operator exciting a core electron to \f$ v' \f$, the other dropping a
361 valence electron from \f$ v \f$ into the hole. This is a one-body operator in
362 the valence space,
363
364 \f[
365 \redmatel{v'}{[t\times s]^K_{cv}}{v} = \sum_c \left[
366 c_2\,\frac{\redmatel{v'}{s}{c}\redmatel{c}{t}{v}}
367 {\en_{v'} - \omega_s - \en_c}
368 + c_1\,\frac{\redmatel{v'}{t}{c}\redmatel{c}{s}{v}}
369 {\en_{v'} - \omega - \en_c}
370 \right],
371 \qquad
372 A^K_{cv} = \redmatel{B}{[t\times s]^K_{cv}}{A},
373 \f]
374
375 with \f$ c_1, c_2 \f$ from @ref A_K_coefs at \f$ (j_{v'}, j_c, j_v) \f$. The
376 two terms take the coefficient of the opposite ordering, since the hole
377 reverses the roles of the operators; its sign is cancelled by the reversed
378 energy denominator. The contraction with the CI states is @ref ReducedME.
379
380 For \f$ v'=v \f$ this is the blocking counter term, of weight
381 \f$ n_v/[j_v] \f$ for occupation \f$ n_v \f$. The \f$ v' \ne v \f$ terms
382 contribute for any \f$ K \f$, and between different CI states.
383
384 @param K Rank of the amplitude.
385 @param Psi_b,ib Final CI state.
386 @param Psi_a,ia Initial CI state.
387 @param t,s The two operators.
388 @param omega,omega_s Frequency of each operator; see @ref A_K.
389 @param core Hole states \f$ c \f$; e.g., Wavefunction::core().
390 @param ci_basis Single-particle basis of the CI expansion.
391 @param dVt,dVs RPA for each operator, solved at the frequency of that
392 operator. May be nullptr.
393 @return \f$ A^K_{cv} \f$.
394
395 @note RPA enters twice, on both matrix elements - unlike @ref A_K_core. The
396 blocked pair is a link of the RPA chain, and the chain continues on
397 either side of it: dressing one vertex removes the chains that end on
398 the blocked pair, but not those that pass through it.
399
400 @note No structure radiation; cf @ref A_K_core.
401*/
402[[nodiscard]] double
403A_K_cv(int K, const PsiJPi &Psi_b, std::size_t ib, const PsiJPi &Psi_a,
404 std::size_t ia, const DiracOperator::TensorOperator *t,
405 const DiracOperator::TensorOperator *s, double omega, double omega_s,
406 const std::vector<DiracSpinor> &core,
407 const std::vector<DiracSpinor> &ci_basis,
408 const ExternalField::CorePolarisation *dVt = nullptr,
409 const ExternalField::CorePolarisation *dVs = nullptr);
410
411} // namespace CI
Look-up table for matrix elements. Note: does not assume any symmetry: (a,b) is stored independantly ...
Definition meTable.hpp:17
General tensor operator (virtual base class); all single-particle (one-body) tenosor operators derive...
Definition TensorOperator.hpp:198
Virtual base class for core-polarisation (RPA); computes dV corrections.
Definition CorePolarisation.hpp:147
Functions and classes for Configuration Interaction calculations.
Definition CI_Integrals.cpp:22
std::pair< double, double > A_K(int K, const PsiJPi &Psi_b, std::size_t ib, const PsiJPi &Psi_a, std::size_t ia, const DiracOperator::TensorOperator *t, const Coulomb::meTable< double > &t_me, const DiracOperator::TensorOperator *s, const Coulomb::meTable< double > &s_me, double omega, double omega_s, const Integrals &ints, const std::vector< Level > &levels_to_remove, const std::vector< PsiJPi > &solved_Jpi, std::ostream &outstream)
Second-order amplitude A^K between two CI states, evaluated with CI mixed states.
Definition SecondOrder.cpp:55
double z_component(int K, int kt, int ks, int twoJb, int twoJa, int two_m)
Converts the reduced amplitude A^K to its contribution to the z-component of the amplitude.
Definition SecondOrder.cpp:30
std::pair< double, double > A_K_coefs(int K, int kt, int ks, int twoJb, int twoJn, int twoJa)
Angular coefficients of the two terms of the second-order amplitude A^K.
Definition SecondOrder.cpp:15
double A_K_core(int K, int twoJ, const DiracOperator::TensorOperator *t, const DiracOperator::TensorOperator *s, double omega, double omega_s, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const ExternalField::CorePolarisation *dVt, const ExternalField::CorePolarisation *dVs)
Contribution to A^K from the polarisation of the closed core.
Definition SecondOrder.cpp:192
double sigma_rme(const PsiJPi &Psi_b, std::size_t ib, const PsiJPi &Psi_a, std::size_t ia, const std::vector< DiracSpinor > &ci_basis)
Reduced matrix element of the Pauli spin operator between two CI states, <b||sigma||a>.
Definition SecondOrder.cpp:43
int symm_sign(const DiracOperator::TensorOperator *h, int twoJA, int twoJB)
Relative sign between <A||h||B> and <B||h||A>, for CI states with total angular momenta 2J_A and 2J_B...
Definition SecondOrder.cpp:37
double A_K_cv(int K, const PsiJPi &Psi_b, std::size_t ib, const PsiJPi &Psi_a, std::size_t ia, const DiracOperator::TensorOperator *t, const DiracOperator::TensorOperator *s, double omega, double omega_s, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &ci_basis, const ExternalField::CorePolarisation *dVt, const ExternalField::CorePolarisation *dVs)
Core-valence contribution to A^K: the Pauli blocking of the core excitations by the valence electrons...
Definition SecondOrder.cpp:239
Core-polarisation (RPA) corrections to matrix elements of an external field.
Definition MatrixElements.hpp:9