JuliaMath / JuliaMath/RandomMatrices.jl

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

Ouverte
#82 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Julia
Étoiles
94
Forks
41
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.