Bear with me as I am not working on all cylinders today.
I am attempting to write a Gaussian random vector generator using the probability distribution function:
$N(x|\mu,\sum) = {1 \over (2\pi)^{D/2}} {1 \over |{\sum}|^{1/2}}exp\{-{1 \over 2}(x - \mu)^{T}\sum^{-1}(x - \mu)\}$
(I should note that I am writing this in python.)
What I do is I create a random vector with $n$ dimensions, then send it into the equation and get a density matrix of $n$ by $n$ (I believe this is what I should get).
This is the point where I am not sure what to do. For the "1 dimensional" it seems simple enough, I get a 1 by 1 matrix that contains the probability that the random vector (value) I created exists in the distribution, and I compare that to another randomly generated probability and if it exceeds that value, then I keep it.
I am not sure however, what to do with the cases of higher dimensions (i.e. when I get a density matrix vs. a single value). Is it just a matter of taking the trace of the matrix? Or is there something else that I am missing?