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

Add stim.FlipSimulator.{to_numpy,generate_bernoulli_samples} #876

Merged
merged 10 commits into from
Jan 31, 2025

Conversation

Strilanc
Copy link
Collaborator

@Strilanc Strilanc commented Jan 30, 2025

  • Add stim.FlipSimulator.generate_bernoulli_samples
  • Add stim.FlipSimulator.to_numpy
  • Fix bit packed numpy outputs not masking off bits beyond a non-multiple-of-8 result count
  • Fix remaining "doc doesn't include example" warnings from regen_docs script

Fixes #875

Fixes #877

- Fix bit packed numpy outputs not masking off non-multiple-of-8 bits

Fixes #875
Copy link
Contributor

@m-mcewen m-mcewen left a comment

Choose a reason for hiding this comment

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

This looks amazing - killing about 5 birds with one new method - thanks!

doc/python_api_reference_vDev.md Outdated Show resolved Hide resolved
@Strilanc Strilanc changed the title Add stim.FlipSimulator.to_numpy Add stim.FlipSimulator.{to_numpy,generate_bernoulli_samples} Jan 31, 2025
@Strilanc Strilanc enabled auto-merge (squash) January 31, 2025 05:39
@Strilanc Strilanc merged commit 6afad14 into main Jan 31, 2025
57 checks passed
@Strilanc Strilanc deleted the fliptonumpy branch January 31, 2025 05:56
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.

Stim's simulators can't give me random numbers on request peek_pauli_flips has an inconvenient return type
2 participants