feat: qudit noise model (2/5) (#1854)#1859
Draft
bramathon wants to merge 1 commit into
Draft
Conversation
Introduce the new noise model under pyquil/noise/ (Channel, MeasurementChannel, ResetChannel, CycleChannel and the quax-based NoiseModel), preserving the legacy pyquil.noise API via _legacy_noise.py. Add qudit DefGate support in quilbase and enable float64 for tests. Part of splitting PR #1848 into a reviewable stack. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
| Branch | 1854-qudit-noise-model |
| 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 | 9.77 s |
| test/benchmarks/test_program.py::test_instructions | 📈 view plot | 3.22 s |
| test/benchmarks/test_program.py::test_iteration | 📈 view plot | 3.28 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 2 of 5, stacked on #1858 — review/merge in order. Closes #1854.This PR introduces the new quax-backed qudit noise model under
pyquil/noise/:Channel,MeasurementChannel,ResetChannel, andCycleChannel(_channels.py), and the newNoiseModelcontainer plusDepolarizingNoiseModel/CompositeNoiseModeland fidelity estimators (_noise_model.py).pyquil.noisepublic API is preserved:pyquil/noise.pyis moved topyquil/noise/_legacy_noise.pyand re-exported frompyquil/noise/__init__.py, with the legacyNoiseModel/KrausModelnow marked deprecated in favor of the quax-based model.It also adds qudit
DefGatesupport inquilbase.py(matrix dimensions may now be any perfect power, e.g. 3, 9, …, not just powers of two), which the qutrit noise channels and later simulators rely on, and enables float64 (jax_enable_x64) for the test suite.A handful of
ResetChanneltests verify behavior end-to-end through the density-matrix simulator; since that simulator lands in the next PR, those specific assertions are deferred to #1855 (they are restored there). Everything else in the noise module is fully tested here (test_noise_model.py).Stack
Tracked in #1863.