  We study static correlation and delocalisation errors and show that even
methods with good energies can yield significant delocalization errors that
affect the density, leading to large errors in predicting {\em e.g.} dipole
moments. We illustrate this point by comparing existing state-of-art approaches
with an accurate exchange correlation functional based on a generalised
valence-bond ansatz, in which orbitals and fractional occupations are treated
as variational parameters via an optimized effective potential (OEP). We show
that the OEP exhibits step and peak features which, similar to the exact
Kohn-Sham (KS) potential of DFT, are crucial to prevent charge delocalization.
We further show that the step is missing in common approximations within
reduced density matrix functional theory resulting in delocalization errors
comparable to those found in DFT approximations. Finally, we explain the
delocalization error as coming from an artificial mixing of the ground state
with a charge-transfer excited state which is avoided if occupation numbers
exhibit discontinuities.
