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

Adding qml.Superposition #6670

Merged
merged 34 commits into from
Dec 16, 2024
Merged

Adding qml.Superposition #6670

merged 34 commits into from
Dec 16, 2024

Conversation

KetpuntoG
Copy link
Contributor

@KetpuntoG KetpuntoG commented Dec 4, 2024

Context:

This PR implements qml.Superposition, a new operator that prepares states given as superposition of basic states

[sc-72648]

Benefits:

Allow user to prepare states in a new format
In addition, the decomposition is efficient for this type of states

Possible Drawbacks:

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@ff3c1f9). Learn more about missing BASE report.
Report is 281 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6670   +/-   ##
=========================================
  Coverage          ?   99.62%           
=========================================
  Files             ?      475           
  Lines             ?    44715           
  Branches          ?        0           
=========================================
  Hits              ?    44546           
  Misses            ?      169           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

@KetpuntoG KetpuntoG requested a review from willjmax December 4, 2024 20:01
Copy link
Contributor

@willjmax willjmax 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. Just some minor comments.

Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @KetpuntoG, left some comments but looks good overall.

KetpuntoG and others added 3 commits December 6, 2024 16:52
[skip-ci]

Co-authored-by: Soran Jahangiri <40344468+soranjh@users.noreply.github.com>
@KetpuntoG KetpuntoG requested a review from soranjh December 6, 2024 22:41
Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @KetpuntoG, left my final set of comments, will approve when they are addressed.

@KetpuntoG
Copy link
Contributor Author

Thanks @KetpuntoG, left my final set of comments, will approve when they are addressed.

Thanks for the review @soranjh , I worked on the changes and added the checks. Note that the normalization check, verify that we are not with an abstract input, otherwise it doesn't work with jit (same as other templates)

@KetpuntoG KetpuntoG requested a review from soranjh December 13, 2024 14:53
Copy link
Contributor

@soranjh soranjh 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, thanks @KetpuntoG.

@KetpuntoG KetpuntoG enabled auto-merge (squash) December 13, 2024 19:01
@soranjh soranjh disabled auto-merge December 13, 2024 19:04
@KetpuntoG KetpuntoG enabled auto-merge (squash) December 14, 2024 00:13
@KetpuntoG KetpuntoG merged commit 20dbc8f into master Dec 16, 2024
46 checks passed
@KetpuntoG KetpuntoG deleted the superposition branch December 16, 2024 03:22
willjmax pushed a commit that referenced this pull request Feb 4, 2025
**Context:**

This PR implements `qml.Superposition,` a new operator that prepares
states given as superposition of basic states

[sc-72648]

**Benefits:**

Allow user to prepare states in a new format
In addition, the decomposition is efficient for this type of states

**Possible Drawbacks:**

---------

Co-authored-by: Soran Jahangiri <40344468+soranjh@users.noreply.github.com>
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.

4 participants