Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danpablo opened this issue Sep 6, 2024 · 0 comments
Open

Comments

@danpablo
Copy link

danpablo commented Sep 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant