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

CosineWindow StatePrep #4683

Merged
merged 48 commits into from
Oct 20, 2023
Merged

CosineWindow StatePrep #4683

merged 48 commits into from
Oct 20, 2023

Conversation

KetpuntoG
Copy link
Contributor

@KetpuntoG KetpuntoG commented Oct 16, 2023

Creation of the cosine window, a state whose vector is equivalent to the cosine function:

Captura de pantalla 2023-10-16 a las 16 49 17

notes to the reviewer

Instead of the template mentioned in the PRD:

Captura de pantalla 2023-10-18 a las 9 11 09

This other one has been used:
Captura de pantalla 2023-10-18 a las 9 13 06

This is because in the paper from which it was extracted, it worked with basic states from $-|N/2\rangle$ to $|N/2-1\rangle$ and we work with states from $|0\rangle$ to $|N-1\rangle$. so I have made some adjustments to the rotations to adapt it.

@github-actions
Copy link
Contributor

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.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@c899d6d). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4683   +/-   ##
=========================================
  Coverage          ?   99.64%           
=========================================
  Files             ?      381           
  Lines             ?    34052           
  Branches          ?        0           
=========================================
  Hits              ?    33930           
  Misses            ?      122           
  Partials          ?        0           
Files Coverage Δ
pennylane/templates/state_preparations/__init__.py 100.00% <100.00%> (ø)
...lane/templates/state_preparations/cosine_window.py 100.00% <100.00%> (ø)

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

@KetpuntoG KetpuntoG changed the title [WIP] CosineWindow StatePrep CosineWindow StatePrep Oct 17, 2023
@KetpuntoG KetpuntoG added the review-ready 👌 PRs which are ready for review by someone from the core team. label Oct 17, 2023
@trbromley trbromley added this to the v0.33 milestone Oct 18, 2023
@KetpuntoG
Copy link
Contributor Author

[sc-45845]

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.

Great work @KetpuntoG! left some comments and suggestions.

pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
pennylane/templates/state_preparations/cosine_window.py Outdated Show resolved Hide resolved
doc/_static/templates/state_preparations/cosine_window.png Outdated Show resolved Hide resolved
KetpuntoG and others added 2 commits October 18, 2023 11:53
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
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, will approve when my minor comments are addressed.

KetpuntoG and others added 4 commits October 19, 2023 22:18
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
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 💯! I added a few small comments to improve the look of the docs, but otherwise good work!

@KetpuntoG
Copy link
Contributor Author

@mudit2812 ready to merge 🚀

@KetpuntoG KetpuntoG added the merge-ready ✔️ All tests pass and the PR is ready to be merged. label Oct 20, 2023
@mudit2812 mudit2812 enabled auto-merge (squash) October 20, 2023 16:52
@KetpuntoG KetpuntoG removed the review-ready 👌 PRs which are ready for review by someone from the core team. label Oct 20, 2023
@mudit2812 mudit2812 merged commit b300e91 into master Oct 20, 2023
33 checks passed
@mudit2812 mudit2812 deleted the cosine_window branch October 20, 2023 17:48
@mlxd mlxd restored the cosine_window branch October 20, 2023 21:15
@mlxd mlxd deleted the cosine_window branch October 20, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-ready ✔️ All tests pass and the PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants