Main optimizations complete, and happy that it is working
correctly. Some loop orderings can still be improved, but
it seems as though the main bottleneck is diagonalization
of the hamiltonian for large impurity sizes, though this
will be independent of lattice size.