How do Quantum Software Packages Work?
There are many tricks. Since I'm not a developer, I'm not privy to all of them, but there are some simple things to start.


Some integrals are predictably close to zero: Even in fully first-principals calculations, there are parts of the code that prune out integrals that will clearly be negligible. This cuts out a lot of work. Consider, for example, overlap or Coulomb integrals between atoms that are very far apart.
Gaussian Orbitals: Using Gaussian-type orbitals are incredibly fast, because most quantum integrals can be derived as simple recurrence relationships. That is, you almost never need to do the integration. See, for example, Obara and Saika and the recent PRISM algorithm from Gill and Pople.


I believe there are some actual quantum developers on here and perhaps they'd be willing to share other tricks. But these are big - eliminate any integral you don't need, and don't actually take the integrals in the first place. ;-)

Yes, there are numeric tricks (using BLAS, LAPACK, etc.) and use of multi-core processing. But these are actually minor optimizations.

UPDATE

I realized that I forgot to talk about convergence of the self-consistent field which is also optimized. There are various convergence strategies, most notably DIIS, which helps to extrapolate the final orbital coefficients and electron density.