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

implementation of a finite MPS class #234

Merged
merged 292 commits into from Oct 16, 2019
Merged

Conversation

mganahl
Copy link
Collaborator

@mganahl mganahl commented Sep 5, 2019

No description provided.

@mganahl mganahl mentioned this pull request Oct 5, 2019
Copy link
Contributor

@chaserileyroberts chaserileyroberts left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Small comments. Sorry for putting this off for so long.

"""
An MPS class for finite systems.
`FiniteMPS` keeps track of the nodes of the network by storing them in a list
`FiniteMPS._nodes`. Any external changes to this list will potentially corrupt
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't mention private _node properties in the class description.

Copy link
Contributor

Choose a reason for hiding this comment

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

plz fix

Check orthonormality of tensor at site `site`.
Args:
which: if 'l' or 'left': check left orthogonality
if 'r' or'right': check right orthogonality
Copy link
Contributor

Choose a reason for hiding this comment

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

Add space after "or"

Copy link
Contributor

Choose a reason for hiding this comment

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

plz fix

from __future__ import division
from __future__ import print_function
import numpy as np
import tensornetwork as tn
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't import tensornetwork directly. It can lead to circular import of we decided to make mps easier to access by putting it in tensornetwork/__init__.py file. Prefer to import everything you need directly.

Copy link
Contributor

@chaserileyroberts chaserileyroberts left a comment

Choose a reason for hiding this comment

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

Remove the import tensornetwork as tn from the mps.py file and I'll pull this in.

@mganahl
Copy link
Collaborator Author

mganahl commented Oct 15, 2019

removed the import

Copy link
Contributor

@chaserileyroberts chaserileyroberts left a comment

Choose a reason for hiding this comment

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

Fix the comments and I'll approve

@mganahl
Copy link
Collaborator Author

mganahl commented Oct 15, 2019

sorry, had forgotten about your earlier comments. Fixed this

@chaserileyroberts chaserileyroberts merged commit f71aca0 into google:master Oct 16, 2019
@mganahl mganahl deleted the MPSnew branch October 21, 2019 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants