feat: experimental exact simulators (3/5) (#1855)#1860
Draft
bramathon wants to merge 1 commit into
Draft
Conversation
#1855) Add the pyquil.simulation core (_resolver pipeline + vectorized gate constructor) and the grad-able PureStateVectorSimulator and DensityMatrixSimulator, with qutrit support and noise-model integration. Restore the density-matrix ResetChannel tests deferred from #1854. Part of splitting PR #1848 into a reviewable stack. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
| Branch | 1855-experimental-exact-simulators |
| Testbed | ci-runner-linux |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | seconds (s) |
|---|---|---|
| test/benchmarks/test_program.py::test_copy_everything_except_instructions | 📈 view plot | 10.53 s |
| test/benchmarks/test_program.py::test_instructions | 📈 view plot | 3.34 s |
| test/benchmarks/test_program.py::test_iteration | 📈 view plot | 3.30 s |
This was referenced Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the effort to land the experimental noise model and simulation module (originally PR #1848, branch
nonbreaking-noise-model) as a reviewable stack. This is PR 3 of 5, stacked on #1859 — review/merge in order. Closes #1855.This PR adds the new
pyquil.simulationcore and the two exact simulators:PureStateVectorSimulator— jit/grad-friendly evolution for gate-only programs.DensityMatrixSimulator— jit/grad-friendly density-matrix evolution for any program, optionally with aNoiseModel.Both are backed by quax, support qutrit/qudit registers, and share the new
_resolver.pypipeline (program expansion, qubit remapping, DAG construction, and greedy operator compression) plus a vectorized gate constructor that keeps compile time proportional to the number of distinct gate kinds rather than gate count. The architecture is documented in the newsimulation_architecture.rst.The trajectory simulators that build on this same base (
TrajectorySimulator,DynamicTrajectorySimulator) land in the following PRs, so_simulator.pyhere contains only the grad-able family. This PR also restores the density-matrix-basedResetChannelverification tests that were deferred from #1854.Stack
Tracked in #1863.