For all methods, the expressions for the one- and two-body density matrices can be tested by generating the explicit expression for the CC-lagrangian
$$L_{\text{CC}} = \langle \Phi_0 | (1+\Lambda)e^{-T}He^{T} | \Phi_0 \rangle,$$
and compare it to the value computed by taking the trace over the density matrices and Hamiltonian matrix elements
$$L_{\text{CC}} = \sum_{pq} h^p_q \gamma^q_p + \frac{1}{4} \sum_{pqrs} u^{pq}_{rs} \Gamma^{rs}_{pq}.$$
Additionally, at convergence, we should have that $L_{\text{CC}} = E_{\text{CC}}$ where $E_{\text{CC}}$ is the CC-energy: $$E_{\text{CC}} = \langle \Phi_0 | e^{-T}He^{T} | \Phi_0\rangle.$$
For all methods, the expressions for the one- and two-body density matrices can be tested by generating the explicit expression for the CC-lagrangian
$$L_{\text{CC}} = \langle \Phi_0 | (1+\Lambda)e^{-T}He^{T} | \Phi_0 \rangle,$$
$$L_{\text{CC}} = \sum_{pq} h^p_q \gamma^q_p + \frac{1}{4} \sum_{pqrs} u^{pq}_{rs} \Gamma^{rs}_{pq}.$$
and compare it to the value computed by taking the trace over the density matrices and Hamiltonian matrix elements
Additionally, at convergence, we should have that$L_{\text{CC}} = E_{\text{CC}}$ where $E_{\text{CC}}$ is the CC-energy: $$E_{\text{CC}} = \langle \Phi_0 | e^{-T}He^{T} | \Phi_0\rangle.$$