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

fix MPS sample handling of RNG seed #248

Merged
merged 3 commits into from
Jul 20, 2024
Merged

Conversation

kevinsung
Copy link
Contributor

Fixes #247

Copy link
Owner

@jcmgray jcmgray left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! The problem is actually for the general MPS method, could you move the rng retrieval into MatrixProductState.sample ? That should fix the problem for the both circuit methods as well as MPSs.

@kevinsung
Copy link
Contributor Author

Thanks for the PR! The problem is actually for the general MPS method, could you move the rng retrieval into MatrixProductState.sample ? That should fix the problem for the both circuit methods as well as MPSs.

Done

@jcmgray
Copy link
Owner

jcmgray commented Jul 20, 2024

Looks good, thanks the change, and especially for adding tests!

@jcmgray jcmgray merged commit 2f41cf9 into jcmgray:main Jul 20, 2024
18 checks passed
@kevinsung kevinsung deleted the sample-seed branch July 21, 2024 04:57
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

Successfully merging this pull request may close these issues.

CircuitMPS.sample with seed returns the same bitstring for every shot
2 participants