The stochastic linear quadratic optimal control problem in Hilbert spaces: A polynomial chaos approach