Fast small random density matrices

By: Julia on EPH

Re-posted from: https://ericphanson.com/blog/2018/fast-small-random-density-matrices/

Update (19 January 2019): I looked at this code again, and realized I had made a few basic mistakes, such as constructing a statically sized normally-distributed random matrix via SMatrix{d,d,Float64, d*d}(randn(Float64, d,d)) which constructs a random matrix (allocating memory dynamically) and then converts it to a static SMatrix, instead of randn(SMatrix{d,d,Float64}) which directly constructs an SMatrix without dynamic memory allocation. I also hadn’t written the function randsimplexpt in a very good way.