Skip to content

Add amplitude damping noise model#529

Open
automatedsoftwaresystemsllc-eng wants to merge 2 commits into
TeamGraphix:masterfrom
automatedsoftwaresystemsllc-eng:codex/unitaryhack-graphix-497-amplitude-damping
Open

Add amplitude damping noise model#529
automatedsoftwaresystemsllc-eng wants to merge 2 commits into
TeamGraphix:masterfrom
automatedsoftwaresystemsllc-eng:codex/unitaryhack-graphix-497-amplitude-damping

Conversation

@automatedsoftwaresystemsllc-eng

Copy link
Copy Markdown

Summary

  • Add single- and two-qubit amplitude damping Kraus channels.
  • Add AmplitudeDampingNoiseModel matching the existing depolarising model hooks for preparation, entanglement, measurement-channel, conditional X/Z correction noise, and measurement-result flips.
  • Export the new model and add focused channel/noise-model/density-matrix tests.

Verification

  • python -m py_compile graphix\channels.py graphix\noise_models\amplitude_damping.py graphix\noise_models\init.py graphix\init.py tests\test_kraus.py tests\test_noise_model.py tests\test_noisy_density_matrix.py passed locally.

uff check graphix\channels.py graphix\noise_models\amplitude_damping.py graphix\noise_models\init.py graphix\init.py tests\test_kraus.py tests\test_noise_model.py tests\test_noisy_density_matrix.py passed locally.

uff format --check graphix\channels.py graphix\noise_models\amplitude_damping.py graphix\noise_models\init.py graphix\init.py tests\test_kraus.py tests\test_noise_model.py tests\test_noisy_density_matrix.py passed locally.

  • Full focused pytest could not complete in my local Codex runtime because importing quimb hangs before test collection. I aligned quimb to the repo lockfile version (1.13.0 for Python >=3.11), but import quimb still timed out locally. I am leaving this explicit for CI/maintainer visibility rather than claiming a pytest pass I did not get.

Assisted by OpenAI Codex.

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.04110% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.85%. Comparing base (8bf1ebe) to head (f96d23e).

Files with missing lines Patch % Lines
graphix/noise_models/amplitude_damping.py 87.87% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #529   +/-   ##
=======================================
  Coverage   88.85%   88.85%           
=======================================
  Files          49       50    +1     
  Lines        7135     7207   +72     
=======================================
+ Hits         6340     6404   +64     
- Misses        795      803    +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pranav97nair pranav97nair left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for your contribution!

After taking a look through the code, we would like to ask you to please implement the following changes:

  • Add tests for verifying the action of amplitude damping noise at the entanglement and measurement steps of the Hadamard pattern . In both cases, we would like to check the simulated output density matrix against the expected analytical one as a function of a randomized error probability.
  • For any tests in test_noise_model.py and test_noisy_density_matrix.py that should behave identically regardless of noise model, parametrize them to run for both DepolarisingNoiseModel and AmplitudeDampingNoiseModel. For example, tests that check the action of the confuse_result() method.

Feel free to let us know any comments or questions!

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.

2 participants