Skip to content
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

add_noise transform for adding noise models #5718

Merged
merged 140 commits into from
Jun 19, 2024
Merged

Conversation

obliviateandsurrender
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender commented May 21, 2024

Context: Adds a transform for adding NoiseModels.

Description of the Change: Adds add_noise.py under pennylane/transforms that gives the said method for inserting operations according to a provided noise model.

Benefits: We support noise models.

Possible Drawbacks: None.

Related GitHub Issues: [sc-64843]

Copy link
Contributor

@Jaybsoni Jaybsoni left a comment

Choose a reason for hiding this comment

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

Looks good to me! Added a few questions and some nitpicking comments. Happy to approve once it's addressed.

One general suggestion for the tests, It feels abit choppy that some of the tests fall inside the class while others don't. I think you could probably put all of them in the class or remove the class completely. There doesn't seem to be any benefit to either, but having both makes things a little confusing. I leave the final decision to you though, so feel free to ignore.

pennylane/transforms/add_noise.py Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
tests/transforms/test_add_noise.py Outdated Show resolved Hide resolved
tests/transforms/test_add_noise.py Show resolved Hide resolved
Copy link
Contributor

@Jaybsoni Jaybsoni left a comment

Choose a reason for hiding this comment

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

Nice work 💯

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender, just a few comments for now.

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
Base automatically changed from noise-models-2 to master June 12, 2024 16:28
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Outdated Show resolved Hide resolved
pennylane/transforms/add_noise.py Show resolved Hide resolved
tests/transforms/test_add_noise.py Outdated Show resolved Hide resolved
@obliviateandsurrender obliviateandsurrender merged commit 248a808 into master Jun 19, 2024
40 checks passed
@obliviateandsurrender obliviateandsurrender deleted the noise-model-3 branch June 19, 2024 21:27
mudit2812 pushed a commit that referenced this pull request Jul 2, 2024
**Context:** Adds a transform for adding `NoiseModels`.

**Description of the Change:** Adds `add_noise.py` under
`pennylane/transforms` that gives the said method for inserting
operations according to a provided noise model.

**Benefits:** We support noise models. 

**Possible Drawbacks:** None.

**Related GitHub Issues:** [sc-64843]

---------

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
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.

5 participants