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

Better random gaussian sampling for Wigner #148

Closed
wants to merge 2 commits into from

Conversation

danielhollas
Copy link
Member

@danielhollas danielhollas commented Mar 2, 2023

NOTE: For performance we might want to use a random number generator from numpy. But we should first verify that it is indeed a bottleneck.

https://numpy.org/doc/stable/reference/random/generated/numpy.random.Generator.normal.html
(look like this particular function was added in Numpy 1.17 https://numpy.org/doc/stable/reference/random/generated/numpy.random.Generator.normal.html)

@danielhollas danielhollas marked this pull request as ready for review March 10, 2023 14:13
@danielhollas danielhollas marked this pull request as draft September 22, 2023 15:34
@danielhollas danielhollas added this to the v0.2.0 milestone Oct 23, 2023
@danielhollas danielhollas added the refactor code refactor, no new features label Oct 23, 2023
@danielhollas
Copy link
Member Author

This is fixed in harmonwig, will be fixed here when we pull harmonwig as a dependency

@danielhollas danielhollas deleted the wigner-less-stupid branch May 1, 2024 00:08
@danielhollas danielhollas restored the wigner-less-stupid branch November 3, 2024 12:15
@danielhollas danielhollas reopened this Nov 3, 2024
random_Q, random_P = self._sample_unit_mode()
# TODO: Pass in the proper sigma directly
sigma = math.sqrt(0.5)
random_Q = random.gauss(mu=0.0, sigma=sigma)

This comment was marked as abuse.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude x Dan: 1:0 🤖

@danielhollas danielhollas deleted the wigner-less-stupid branch November 3, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor code refactor, no new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant