By using the Hudson-Parthasarathy quantum stochastic calculus, we explicitly compute the control process that minimizes the quantum stochastic analogue of the quadratic performance (cost) functional of classical stochastic control theory. The solution to the associated (and for the first time stochastic) Riccati equation is obtained.