Variational determination of the two-particle density matrix as a quantum many-body technique