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

Hilbert Schmidt templates #2364

Merged
merged 56 commits into from
Apr 14, 2022
Merged

Hilbert Schmidt templates #2364

merged 56 commits into from
Apr 14, 2022

Conversation

rmoyard
Copy link
Contributor

@rmoyard rmoyard commented Mar 22, 2022

Context:
From this paper about compilation of quantum circuits with quantum computers, it appears that some templates are useful for PennyLane, Hilbert Schmidt test and local Hilbert Schmidt test.

Description of the Change:

Add two templates HilbertSchmidt and HilbertSchmidtLocal that can be used to implement the information quantities from the paper.

@rmoyard rmoyard added the WIP 🚧 Work-in-progress label Mar 22, 2022
@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 Mar 22, 2022

Codecov Report

Merging #2364 (5933ccd) into master (f385f5b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2364   +/-   ##
=======================================
  Coverage   99.46%   99.47%           
=======================================
  Files         242      243    +1     
  Lines       19170    19247   +77     
=======================================
+ Hits        19068    19145   +77     
  Misses        102      102           
Impacted Files Coverage Δ
pennylane/optimize/nesterov_momentum.py 100.00% <100.00%> (ø)
pennylane/templates/subroutines/__init__.py 100.00% <100.00%> (ø)
pennylane/templates/subroutines/hilbert_schmidt.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f385f5b...5933ccd. Read the comment docs.

@rmoyard rmoyard changed the title [WIP] Hilbert Schmidt templates Hilbert Schmidt templates Apr 7, 2022
@rmoyard rmoyard added review-ready 👌 PRs which are ready for review by someone from the core team. and removed WIP 🚧 Work-in-progress labels Apr 7, 2022
@antalszava antalszava self-requested a review April 12, 2022 15:42
Copy link
Contributor

@antalszava antalszava left a comment

Choose a reason for hiding this comment

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

This is very thoroughly written, looks very nice! @rmoyard 🎉

Had a few formatting/refactoring/wording suggestions, though no real blockers so would be happy to approve on a second quick pass.

Noticed two additional things in general:

  • The changelog entry is missing;
  • It seems that 8 linting issues are being uncovered by Codefactor.

pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
tests/templates/test_subroutines/test_hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
tests/templates/test_subroutines/test_hilbert_schmidt.py Outdated Show resolved Hide resolved
tests/templates/test_subroutines/test_hilbert_schmidt.py Outdated Show resolved Hide resolved
rmoyard and others added 4 commits April 14, 2022 18:59
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
rmoyard and others added 13 commits April 14, 2022 19:03
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
@antalszava antalszava self-requested a review April 14, 2022 18:04
Copy link
Contributor

@antalszava antalszava left a comment

Choose a reason for hiding this comment

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

@rmoyard great push with polishing 🚀 💯 Very near the finish.

A couple of final comments, some from before.

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/hilbert_schmidt.py Outdated Show resolved Hide resolved
Copy link
Contributor

@antalszava antalszava 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 🎉 🥇

@antalszava antalszava merged commit a097bb7 into master Apr 14, 2022
@antalszava antalszava deleted the hilbert_schmidt_test branch April 14, 2022 20:45
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.

2 participants