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

Qutrits: Gell-Mann Observable #3035

Merged
merged 381 commits into from Sep 21, 2022
Merged

Conversation

mudit2812
Copy link
Contributor

@mudit2812 mudit2812 commented Sep 8, 2022

Context:
There are very few simulators available today that offer qudit simulation. One notable example is Google's Cirq, which includes support for qudit operations. However, the simulator is far from complete, and a key drawback is the lack of operations available, which creates a need for users to define operations themselves. Popular libraries such as Qiskit and QuTiP also include some qudit manipulation capabilities, but with few use cases. Beyond these libraries, qudit simulation solutions are quite limited. Moreover, qudit simulation is a feature that is already in demand, as seen in this issue on the PennyLane repository.

This PR builds upon the previous PR's that added qutrit functionality by adding the Gell-Mann matrices as qutrit observables.

Description of the Change:

  • Added GellMannObs observable(s), which are the qutrit analog of the Pauli observables.

Benefits:

Possible Drawbacks:

Related GitHub Issues:
#2190

mudit2812 and others added 30 commits June 24, 2022 01:52
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
@mudit2812 mudit2812 requested review from Jaybsoni and glassnotes and removed request for Jaybsoni September 13, 2022 08:02
@glassnotes glassnotes added the review-ready 👌 PRs which are ready for review by someone from the core team. label Sep 14, 2022
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.

Thanks @mudit2812 for the updates and clarifications! Just a few remaining comments.

pennylane/ops/qutrit/observables.py Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Show resolved Hide resolved
tests/devices/test_default_qutrit.py Show resolved Hide resolved
tests/devices/test_default_qutrit.py Outdated Show resolved Hide resolved
tests/devices/test_default_qutrit.py Outdated Show resolved Hide resolved
mudit2812 and others added 4 commits September 14, 2022 19:47
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
@mudit2812 mudit2812 requested review from Jaybsoni and glassnotes and removed request for Jaybsoni September 15, 2022 06:47
@mudit2812 mudit2812 requested review from Jaybsoni and removed request for glassnotes September 16, 2022 19:04
@Jaybsoni
Copy link
Contributor

Hi @mudit2812, I apologize for the delay! I will leave a review for you later tonight. Thanks,

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 great to me 💯! just a few minor comments, nothing blocking.

One question I had, the Pauli ops are both observables and operations. It seems that some of the GM matrices are also unitary, would it make sense to make them operations as well?

tests/ops/qutrit/test_qutrit_non_parametric_ops.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Outdated Show resolved Hide resolved
pennylane/ops/qutrit/observables.py Outdated Show resolved Hide resolved
@mudit2812
Copy link
Contributor Author

mudit2812 commented Sep 21, 2022

One question I had, the Pauli ops are both observables and operations. It seems that some of the GM matrices are also unitary, would it make sense to make them operations as well?

I don't think any of the GM matrices are unitary. I'll double check and get back. However, in a future PR, operations that mimic the behavior of Pauli X, Y and Z will be added.

Edit: just confirmed they're not unitary.

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.

Thanks @mudit2812 for incorporating all the changes! I added GellMann to the docs, and once the build finishes I will merge.

@glassnotes glassnotes merged commit ea036d0 into PennyLaneAI:master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-ready 👌 PRs which are ready for review by someone from the core team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants