updated f to take advantage of symmetry and not calculate imaginary parts of the diagonal
taking further advantage of symmetry, got a ~20% speedup by getting complex conjugate for free