Resources: Covariance Matrix

The same way worked (see link above), we now produce a matrix which is defined as

is symmetric, with the elements on the diagonal being the variance of each state.

IMPORTANT: We want the trace to be as low as possible. Aka minimize this.