randomUnitary: Random unitary

Description Usage Arguments Value Examples

View source: R/randomUnitary.R

Description

Returns a square complex matrix sampled from the Haar random unitary distribution.

Usage

1

Arguments

size

dimension of matrix

Value

A square complex matrix.

Examples

1
2
3
4
5
6
m <- 25 # size of matrix (m x m)
set.seed(7)
U <- randomUnitary(m)
#  
n <- 5 # First n columns
A <- U[,1:n]

BosonSampling documentation built on May 14, 2021, 9:06 a.m.