rigetti / pyquil

A Python library for quantum programming using Quil.
http://docs.rigetti.com
Apache License 2.0
1.4k stars 342 forks source link

Wavefunction simulator should support seeding of bit string sampling #1272

Open mhodson-rigetti opened 3 years ago

mhodson-rigetti commented 3 years ago

Pre-Request Checklist

Issue Description

When aiming for repeatable simulation results, the wavefunction simulator itself supports a random seed. However, this is not carried through to the sample_bitstrings method of the Wavefunction class, and so sampled measurements of the wavefunction to not provide seeded repeatability.

Proposed Solution

Recommend the Wavefunction class be updated to accept a random seed, and it to be seeded on creation with something derived from the seed given to the wavefunction simulator.

Additional References

None.

mhodson-rigetti commented 3 years ago

See linked issue #1258 for recommended fix for both these issues.