@felix00 The wfn returned from CC calculations will hold the ccsd density if it was calculated. Since the density is not required to compute the energy it will not be constructed in a simple
energy('ccsd') calculation. As you have seen requesting a gradient will require the density to be constructed so the wfn that is returned will be updated and
wfn.Da() will now return the ccsd density.
In all cases the density returned by
wfn.Da() is in the SO basis, you can obtain the MO basis density by transforming using
wfn.Ca(). Or using the
So to answer your three questions they are different matrices the first would be the SCF density in the SO basis, the second is the CCSD density also in the SO basis.