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

Added Kitaev model Hamiltonian #6174

Merged
merged 44 commits into from
Sep 20, 2024
Merged

Added Kitaev model Hamiltonian #6174

merged 44 commits into from
Sep 20, 2024

Conversation

ddhawan11
Copy link
Contributor

Context:
Added Kitaev Model

Description of the Change:
Added functionality to create Kitaev model Hamiltonian.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-71957]

@ddhawan11 ddhawan11 requested a review from soranjh August 28, 2024 19:07
@ddhawan11 ddhawan11 marked this pull request as ready for review September 3, 2024 15:32
Copy link
Contributor

github-actions bot commented Sep 3, 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 Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.70%. Comparing base (de54c54) to head (631307f).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6174   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files         444      444           
  Lines       42133    42198   +65     
=======================================
+ Hits        42008    42075   +67     
+ Misses        125      123    -2     

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

pennylane/spin/spin_hamiltonian.py Outdated Show resolved Hide resolved
pennylane/spin/spin_hamiltonian.py Outdated Show resolved Hide resolved
tests/spin/test_lattice.py Show resolved Hide resolved
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Copy link
Contributor

@austingmhuang austingmhuang left a comment

Choose a reason for hiding this comment

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

Thanks @ddhawan11 . Looks good. Left some initial comments.

pennylane/spin/lattice.py Show resolved Hide resolved
pennylane/spin/lattice.py Outdated Show resolved Hide resolved
pennylane/spin/lattice.py Outdated Show resolved Hide resolved
Copy link
Contributor

@austingmhuang austingmhuang left a comment

Choose a reason for hiding this comment

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

Some more small comments about the docstrings...

pennylane/spin/lattice.py Outdated Show resolved Hide resolved
pennylane/spin/lattice.py Show resolved Hide resolved
pennylane/spin/lattice.py Outdated Show resolved Hide resolved
pennylane/spin/spin_hamiltonian.py Outdated Show resolved Hide resolved
ddhawan11 and others added 5 commits September 6, 2024 05:10
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
ddhawan11 and others added 5 commits September 16, 2024 11:17
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>
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 @ddhawan11 looks good overall, but the the _get_custom_edges function still needs 1) an example, 2) proper comments indicating, clearly, what each block is doing.

Also not sure using | instead of or looks nice in the built docs. I will approve when these points are addressed.

pennylane/spin/lattice.py Show resolved Hide resolved
pennylane/spin/spin_hamiltonian.py Outdated Show resolved Hide resolved
pennylane/spin/spin_hamiltonian.py Show resolved Hide resolved
tests/spin/test_lattice.py Show resolved Hide resolved
pennylane/spin/lattice.py Show resolved Hide resolved
pennylane/spin/lattice.py Outdated Show resolved Hide resolved
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 @ddhawan11, looks good!

Copy link
Contributor

@austingmhuang austingmhuang 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 @ddhawan11. Just a small comment about the error raising, but it is not blocking, fine as it is as well.

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
pennylane/spin/lattice.py Outdated Show resolved Hide resolved
@ddhawan11 ddhawan11 enabled auto-merge (squash) September 20, 2024 17:36
tests/spin/test_lattice.py Outdated Show resolved Hide resolved
@ddhawan11 ddhawan11 merged commit 79cb2eb into master Sep 20, 2024
37 checks passed
@ddhawan11 ddhawan11 deleted the kitaev_model branch September 20, 2024 18:27
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