quadratic form of square lattice