  We propose and implement an algorithm to calculate the norm and reduced
density matrices of the antisymmetrized geminal power (AGP) of any rank with
polynomial cost. Our method scales quadratically per element of the reduced
density matrices. Numerical tests indicate that our method is very fast and
capable of treating systems with a few thousand orbitals and hundreds of
electrons reliably in double-precision. In addition, we present reconstruction
formulae that allows one to decompose higher order reduced density matrices in
terms of linear combinations of lower order ones, thereby reducing the
computational cost significantly.
