JuliaMath / JuliaMath/RandomMatrices.jl

The function ` rand(d::Wigner{2}, n::Int)` returns incorrect matrix???

Đang mở
#82 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
94
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I think that the following code is missing a factor of 2 dividing when the function returns.
```
function rand(d::Wigner{2}, n::Int)
A = randn(n, n) + im*randn(n, n)
normalization = √(4*n)
return Hermitian((A + A') / normalization)
end
```
That is, replace this line `return Hermitian((A + A') / normalization)` with this other one `return Hermitian( (A + A') / 2 / normalization )`.

Thanks and regards

Pablo

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.