JuliaMath / JuliaMath/RandomMatrices.jl

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

オープン
#82 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
94
フォーク
41
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。