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

Qutrit channel depolarizing #5502

Merged
merged 44 commits into from
May 15, 2024

Conversation

Gabriel-Bottrill
Copy link
Contributor

@Gabriel-Bottrill Gabriel-Bottrill commented Apr 11, 2024

Context:
default.qutrit.mixed device has been added, but no channels have been added so far, this adds the first channel to the device so that it may be used for it's intended purpose of simulating noise.

Description of the Change:
Adds new channel module to qml.ops.qutrit package. Adding the first qutrit channel QutritDepolarizingChannel.

Benefits:
Allows for defualt.qutrit.mixed to simulate depolarizing noise. Makes default.qutrit.mixed, much more useful.

Possible Drawbacks:
N/A

Related GitHub Issues:
N/A

@Gabriel-Bottrill
Copy link
Contributor Author

Hi @albi3ro, @glassnotes, @mudit2812, @trbromley. This PR is not finished, but I wanted to put it up as a draft to let you know it's here. I realized I probably should have been @ing you all in previous drafts, but I thought I would now. Also after this PR ther will be another Channel which I have drafted in this PR.

Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.67%. Comparing base (4ee09b8) to head (8245d6b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5502      +/-   ##
==========================================
- Coverage   99.68%   99.67%   -0.01%     
==========================================
  Files         414      415       +1     
  Lines       38844    38586     -258     
==========================================
- Hits        38720    38461     -259     
- Misses        124      125       +1     

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

@Gabriel-Bottrill
Copy link
Contributor Author

Hi @albi3ro, @glassnotes, @mudit2812, @trbromley I have finished this PR, except for the failing test, I am a bit confused why that error is occurring, so I thought I would ask you all. I will add some comments to specific parts of the code now too.

@Gabriel-Bottrill Gabriel-Bottrill marked this pull request as ready for review May 9, 2024 02:14
@trbromley trbromley requested a review from mudit2812 May 10, 2024 15:09
Copy link
Contributor Author

@Gabriel-Bottrill Gabriel-Bottrill left a comment

Choose a reason for hiding this comment

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

Fixed comments.

pennylane/ops/qutrit/channel.py Outdated Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Outdated Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Show resolved Hide resolved
pennylane/ops/qutrit/channel.py Show resolved Hide resolved
pennylane/ops/qutrit/channel.py Outdated Show resolved Hide resolved
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.

doc/introduction/operations.rst Outdated Show resolved Hide resolved
pennylane/ops/qutrit/channel.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

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

Looks great @Gabriel-Bottrill !

Copy link
Contributor

@glassnotes glassnotes left a comment

Choose a reason for hiding this comment

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

@Gabriel-Bottrill looks great - thanks for addressing everything! Just a few tiny suggestions, once incorporated I don't need to review again.

pennylane/ops/qutrit/channel.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/channel.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/channel.py Show resolved Hide resolved
tests/ops/qutrit/test_qutrit_channel_ops.py Show resolved Hide resolved
@glassnotes glassnotes merged commit 332d090 into PennyLaneAI:master May 15, 2024
38 checks passed
mudit2812 added a commit that referenced this pull request May 23, 2024
**Context:**
`default.qutrit.mixed` device has been added, but only one channel has
been added,
[qml.QutritDepolarizingChannel](#5502),
this adds the second channel to the device so the device can simulate
the qutrit equivalent of amplitude damping noise.

**Description of the Change:**
Adds new channel module to `qml.ops.qutrit` package. Adding the second
qutrit channel `QutritAmplitudeDamping`.

**Benefits:**
Allows for `defualt.qutrit.mixed` to simulate amplitude damping noise.
Making `default.qutrit.mixed`, much more useful.

**Possible Drawbacks:**
N/A

**Related GitHub Issues:**
N/A

---------

Co-authored-by: Gabriel Bottrill <bottrill@student.ubc.ca>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
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.

None yet

4 participants