randomUnitary {BosonSampling} | R Documentation |
Returns a square complex matrix sampled from the Haar random unitary distribution.
randomUnitary(size)
size |
dimension of matrix |
A square complex matrix.
m <- 25 # size of matrix (m x m)
set.seed(7)
U <- randomUnitary(m)
#
n <- 5 # First n columns
A <- U[,1:n]