function [ X ] = CUE( N )
%GUE(N) Generate GUE matrix of size NxN

A = randn(N) + 1i*randn(N);

[Q,R] = qr(A);

%d = diag( R );
%C = diag( d ./ abs(d) );

C = diag( exp(2i*pi*rand(1,N)) );

X = Q*C;
end

