Certain spatial symmetries will greatly improve the CCD implementation, both with regards to memory consumtption and efficiency. In this notebook i will try to explain to myself how to implement this in the code.
To exploit these symmetries, we begin by stating the full CCD amplitude equation.
It is natural to distinguish the terms quadratic in the amplitudes from the linear terms. We may write this as
where
$$ L = \frac{1}{2} \sum_{cd} \langle ab \vert \vert cd \rangle t^{cd}_{ij} + \frac{1}{2} \sum_{kl} \langle kl \vert \vert ij \rangle t^{ab}_{kl} + \hat{P}(ij \vert ab) \sum_{kc} \langle kb \vert \vert cj \rangle t^{ac}_{ik} $$and
$$ Q = \frac{1}{4} \sum_{klcd} \langle kl \vert \vert cd \rangle t^{cd}_{ij} t^{ab}_{kl} + \hat{P}(ij) \sum_{klcd} \langle kl \vert \vert cd \rangle t^{ac}_{ik} t^{bd}_{jl} - \frac{1}{2} \hat{P}(ij) \sum_{klcd} \langle kl \vert \vert cd \rangle t^{dc}_{ik} t^{ab}_{lj} - \frac{1}{2} \hat{P}(ab)\sum_{klcd}\langle kl \vert \vert cd \rangle t^{ac}_{lk} t^{db}_{ij} $$The antisymmetric interaction which occurs in every sum is
Meaning that only interactions where
will be non-zero. The interaction is also constrained by the following symmetries:
With this in mind, we consider the two first terms in the linear contribution. In the first term we sum over ket states, keeping the indices in the bra fixed. We may define a matrix for the interaction and the t2-amplitudes:
The product of these matrices is a new matrix, with elements:
$$ (T \bullet V)_{\alpha, \beta} = \sum_{\gamma} T_{\alpha, \gamma} \bullet V_{\gamma, \beta} $$So that in the case of the first linear term we may solve this as a matrix multiplication. (if only particle states occur in $\gamma$). The second term may be calculated in the same way, but instead we consider only hole-states. This means that when we set up the matrices above, we need to do it separately for the type of contribution we consider.
The matrices defined above can be divided into submatrices with only pp (particle-particle), ph, hp or hh elements.
$$ V_{\alpha(pq),\beta(rs)} = \begin{bmatrix} V_{\alpha(hh),\beta(hh)} & V_{\alpha(hh),\beta(pp)} \\ V_{\alpha(pp),\beta(hh)} & V_{\alpha(pp),\beta(pp)} \end{bmatrix}$$$$ T_{\alpha(pq),\beta(rs)} = \begin{bmatrix} T_{\alpha(hh),\beta(hh)} & T_{\alpha(hh),\beta(pp)} \\ T_{\alpha(pp),\beta(hh)} & T_{\alpha(pp),\beta(pp)} \end{bmatrix}$$The first linear term in the CCD equations is then found by performing the matrix multiplication
$$ \frac{1}{2} \sum_{cd} \langle ab \vert \vert cd \rangle t^{cd}_{ij} = \frac{1}{2} \sum_{cd} V_{\alpha(ab)\beta(cd)} T_{\alpha(cd) \beta(ij)} =\frac{1}{2} \sum_{\gamma} V_{\alpha(ab),\gamma} T_{\gamma, \beta(ij)}=\frac{1}{2} (V_{\alpha(pp)\beta(pp)} \bullet T_{\alpha(pp) \beta(hh)})_{\alpha(ab),\beta(ij)} $$The second may be found by performing the multiplication
$$\frac{1}{2} \sum_{kl} \langle kl \vert \vert ij \rangle t^{ab}_{kl} =\frac{1}{2} (T_{\alpha(pp)\beta(hh)} \bullet V_{\alpha(hh) \beta(hh)})_{\alpha(ab),\beta(ij)}$$The third sum in the linear contribution is more tricky, since it contains particle-hole terms and since the fixes indices occure in both the bra and ket. We may define another matrix for the interaction
$$ V_{\gamma(pq),\delta(rs)} = \begin{bmatrix} V_{\gamma(ph),\delta(ph)} & V_{\gamma(ph),\delta(hp)} \\ V_{\gamma(hp),\delta(ph)} & V_{\gamma(hp),\delta(hp)} \end{bmatrix}$$If we find a matrix that permutes the elements in $V_{\alpha, \beta} $, so that
$$ \hat{P} V_{\alpha,\beta} = V_{\gamma, \delta} $$The same matrix can be used to transform the $T$-matrix, keeping tabs of the indices.
We also seek a transformation that make the columns or rows in $T$ represent the series of terms occuring in the CCD equations. As it turns out (?), the diagonal entries in the T-matrix follows this pattern. By "rotating" all indices $\pi /4$ radians or shifting them diagonally we obtain the properly transformed matrix.
Notation:
$$ V_{\alpha(hh),\beta(hh)} \rightarrow V_{hhhh} $$We then find
$$ L_1 = \frac{1}{2} \sum_{cd} \langle ab \vert \vert cd \rangle t^{cd}_{ij} = \frac{1}{2}(V_{pppp}T_{pphh})_{abij}$$$$ L_2 = \frac{1}{2} \sum_{kl} \langle kl \vert \vert ij \rangle t^{ab}_{kl} =\frac{1}{2} (V_{hhhh}T_{hhpp})_{abij}$$$$ L_3 = \hat{P}(ij \vert ab) \sum_{kc} \langle kb \vert \vert cj \rangle t^{ac}_{ik} = \hat{P}(ij \vert ab) (V_{phhp} T_{pphh})_{abij}$$$$Q_1 = \frac{1}{4} \sum_{klcd} \langle kl \vert \vert cd \rangle t^{cd}_{ij} t^{ab}_{kl} = \frac{1}{4} (V_{hhpp}T_{pphh}T_{pphh})_{abij}$$$$Q_2 = \hat{P}(ij) \sum_{klcd} \langle kl \vert \vert cd \rangle t^{ac}_{ik} t^{bd}_{jl} $$$$Q_3 = - \frac{1}{2} \hat{P}(ij) \sum_{klcd} \langle kl \vert \vert cd \rangle t^{dc}_{ik} t^{ab}_{lj} $$$$Q_4 = - \frac{1}{2} \hat{P}(ab)\sum_{klcd}\langle kl \vert \vert cd \rangle t^{ac}_{lk} t^{db}_{lj} $$Used instead the following notation/logic when reordering the matrix elements
$$Q4 = ... \sum_{klcd} v^{kl}_{cd} t^{ac}_{ik} t^{db}_{lj} = T^{ac}_{lk} V^{kl}_{cd} T^{db}_{lj} = \tilde{T}^{a}_{clk} \tilde{V}^{clk}_d \tilde{T}^{d}_{blj} $$Which meant I had to transform
$$\tilde{T}^{a}_{clk} = T^{ac}_{lk}$$...and so on.
In [ ]: