|
1 | | -export rand, Ginibre, NeedPiecewiseCorrection, jpdfGinibre, |
2 | | - CircularOrthogonal, CircularUnitary, CircularSymplectic |
| 1 | +export rand, NeedPiecewiseCorrection |
3 | 2 | import Base.rand |
4 | 3 |
|
5 | 4 | # Computes samplex of real or complex Haar matrices of size nxn |
@@ -66,57 +65,6 @@ function NeedPiecewiseCorrection() |
66 | 65 | end |
67 | 66 |
|
68 | 67 |
|
69 | | -#Samples a matrix from the Ginibre ensemble |
70 | | -#This ensemble lives in GL(N, F), the set of all invertible N x N matrices |
71 | | -#over the field F |
72 | | -#For beta=1,2,4, F=R, C, H respectively |
73 | | -immutable Ginibre <: ContinuousMatrixDistribution |
74 | | - beta::Float64 |
75 | | - N::Integer |
76 | | -end |
77 | | - |
78 | | -function rand(W::Ginibre) |
79 | | - if beta==1 |
80 | | - randn(n,n) |
81 | | - elseif beta==2 |
82 | | - randn(n,n)+im*randn(n,n) |
83 | | - elseif beta==4 |
84 | | - Q0=randn(n,n) |
85 | | - Q1=randn(n,n) |
86 | | - Q2=randn(n,n) |
87 | | - Q3=randn(n,n) |
88 | | - [Q0+im*Q1 Q2+im*Q3;-Q2+im*Q3 Q0-im*Q1] |
89 | | - else |
90 | | - error(string("beta = ", beta, " not implemented")) |
91 | | - end |
92 | | -end |
93 | | - |
94 | | -function jpdfGinibre{z<:Complex}(Z::AbstractMatrix{z}) |
95 | | - pi^(size(Z,1)^2)*exp(-trace(Z'*Z)) |
96 | | -end |
97 | | - |
98 | | -#Dyson Circular orthogonal, unitary and symplectic ensembles |
99 | | -immutable CircularOrthogonal |
100 | | - N :: Int64 |
101 | | -end |
102 | | - |
103 | | -function rand(M::CircularOrthogonal) |
104 | | - U = rand(Ginibre(2, M.N)) |
105 | | - U * U' |
106 | | -end |
107 | | - |
108 | | -immutable CircularUnitary |
109 | | - N :: Int64 |
110 | | -end |
111 | | - |
112 | | -rand(M::CircularUnitary) = rand(Ginibre(2, M.N)) |
113 | | - |
114 | | -immutable CircularSymplectic |
115 | | - N :: Int64 |
116 | | -end |
117 | | - |
118 | | -rand(M::CircularSymplectic) = error("Not implemented") |
119 | | - |
120 | 68 | #TODO maybe, someday |
121 | 69 | #Haar measure on U(N) in terms of local coordinates |
122 | 70 | #Zyczkowski and Kus, Random unitary matrices, J. Phys. A: Math. Gen. 27, |
|
0 commit comments