TestHamiltonian is now functional
Fixed QuadraticForm and added some tests.