-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Lazily create TrialResult.final_simulator_state #4317
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
Conversation
@95-martin-orion Start this review at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
@95-martin-orion The requested changes are complete. |
* Lazily create TrialResult.final_simulator_state * Change TrialResult only to accept StepResult in constructor * Backwards compatibility for TrialResult initializer * lint * Platform independent test * Update density_matrix_simulator_test.py Co-authored-by: Orion Martin <[email protected]>
* Lazily create TrialResult.final_simulator_state * Change TrialResult only to accept StepResult in constructor * Backwards compatibility for TrialResult initializer * lint * Platform independent test * Update density_matrix_simulator_test.py Co-authored-by: Orion Martin <[email protected]>
Final step of #4100, creates the
TrialResult.final_simulator_state
lazily so that it's possible to run an entire simulation on a sparsely entangled circuit and sample measurements without running out of memory. Unit test added with 59 qubits on density matrix simulator running 1000 repetitions (9 cirq.X's, 1 cirq.measure, on all qubits) in under 100 ms.Supercedes #4198, which had diverged from master too much to merge.