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

Add CI Workflow + Entanglement utilities #8

Merged
merged 9 commits into from
Dec 23, 2024
Merged

Conversation

joshuabmoore
Copy link
Owner

Changes Overview

  • Added two new functions for post-training MPS analysis: bipartite_spectrum and single_site_spectrum contained within new module called Analysis for all MPS analysis related functions.
  • Added basic unit tests for bipartite_spectrum and single_site_spectrum
  • Added Git Actions CI workflow.
  • Updated Git Pages documentation
  • Added normalize to expand_label_index function to fix issue of normalising MPS after extracting the label index when number of classes > 1 (wasn't normalized before).

Details

bipartite_spectrum takes in a trainedMPS type, slices classes if necessary and compute the bipartite entanglement entropy spectrum (BEE vs bond location) on each class MPS.
bipartite_spectrum takes in a trainedMPS type, slices classes if necessary and compute the single-site entanglement entropy spectrum (SEE vs site location) on each class MPS.
Added some helper functions for bipartite_spectrum and single_site_spectrum:

  1. rho_correct which clamps small negative eigenvalues in the reduced density matrix eigendecomposition (which can occur due to numerical precision issues).
  2. von_neumann_entropy which computes the Von Neumann entropy on the Schmidt decomposition of the MPS at a given cut location for the BEE.
  3. one_site_rdm which computes the single site reduced density matrix (rdm) at a given site by first placing the MPS into canonical form with the orthogonality centre at the site of interest, then tracing over all other sites.
  4. single_site_entropy: computes the entropy of the reduced density matrix as -tr($\rho$ $\log$ $\rho$) where $\rho$ is the rdm.

@joshuabmoore joshuabmoore added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 23, 2024
@joshuabmoore joshuabmoore merged commit b5b6ae1 into main Dec 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant