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

How to build spin hamiltonians #1230

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open

How to build spin hamiltonians #1230

wants to merge 65 commits into from

Conversation

soranjh
Copy link
Contributor

@soranjh soranjh commented Oct 4, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • Ensure that your tutorial executes correctly, and conforms to the
    guidelines specified in the README.

  • Remember to do a grammar check of the content you include.

  • All tutorials conform to
    PEP8 standards.
    To auto format files, simply pip install black, and then
    run black -l 100 path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Title:
How to build spin hamiltonians [sc-74419]

Summary:
This how-to explains the features added to the qml.spin module for constructing spin Hamiltonians.

Relevant references:

Possible Drawbacks:

Related GitHub Issues:


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?

    Eg. Promote a new PL feature or show a PL implementation of a recent paper.

  • AUDIENCE — Who is this for?

    Eg. Chemistry researchers, PL educators, beginners in quantum computing.

  • KEYWORDS — What words should be included in the marketing post?

  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

Copy link

github-actions bot commented Oct 4, 2024

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

Copy link

github-actions bot commented Oct 7, 2024

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1230
  • Deployment SHA: 19dd7c64ca9b8b4bf566d5bdc7d95869c8893b8f
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

Mandrenkov and others added 3 commits October 9, 2024 17:40
**Summary:**
Fixes a merge conflict between `master` and `dev` introduced by #1232
(due to divergent `dateOfLastModification`).

To reproduce this PR:
1. Run `git checkout dev`.
2. Run `git checkout -b merge-master-into-dev`.
3. Run `git merge master`.
4. Accept all incoming changes for merge conflicts on
`dateOfLastModification`.

**Relevant GHA Workflow Runs:**
* https://github.com/PennyLaneAI/qml/actions/runs/11241666164
* https://github.com/PennyLaneAI/qml/actions/runs/11253088983

---------

Co-authored-by: David Wierichs <[email protected]>
Co-authored-by: Korbinian Kottmann <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
@soranjh soranjh requested a review from ddhawan11 October 9, 2024 21:31
Copy link
Collaborator

@alvaro-at-xanadu alvaro-at-xanadu left a comment

Choose a reason for hiding this comment

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

Thanks! It's looking good :)

Copy link
Contributor

@ikurecic ikurecic left a comment

Choose a reason for hiding this comment

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

Thanks for sharing, @soranjh and @ddhawan11 !
I have left some comments, corrections, and suggestions. Please let me know (via Slack?) if you have any questions or concerns about these and I'm sure we can sort through them quickly.

Other than that, great work! This is going to be an amazing resource.

demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
demonstrations/tutorial_how_to_spin_hamiltonian.py Outdated Show resolved Hide resolved
######################################################################
# Now, we construct a lattice manually by explicitly defining the positions of the sites in a
# unit cell, the primitive translation vectors defining the lattice and the number of cells in each
# direction [#ashcroft]_. Recall that a unit cell is the smallest repeating unit of a lattice.
Copy link
Contributor

Choose a reason for hiding this comment

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

not so useful to link to a textbook. IS there an internet link we can use instead?

Copy link
Contributor Author

@soranjh soranjh Nov 6, 2024

Choose a reason for hiding this comment

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

There are some other resources but I think the book, Chapter 4, is very comprehensive, which is now explicitly mentioned in the references. There is also this link, but not sure if it is stable enough to cite here. I can add it if seems useful.

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.