-
Notifications
You must be signed in to change notification settings - Fork 3
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 get_tensor_network_state method #5
Add get_tensor_network_state method #5
Conversation
At the moment, this changes nothing. It will, in the future, to remember that those attributes actually belong to TensorNetwork and not to SimpleUpdate. If someone changes them from the TensorNetwork attribute, these will also change. The current structure reflects this fact.
Moved methods that absorb weights into TensorNetwork class. Created `TensorNetwork .get_tensor_network_state()` method
Thank you very much for putting this together, it looks very good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good, thank you. I have left a few comments.
I've responded to the comments above. Tell me if you wish to change something. |
It all looks very good. Just a final question, did you had the chance executing the test module, just to check that everything still runs properly? If not, could you do that? just run |
+ run all tests in `test_main`
I pass all tests besides |
Good enough! |
In response to issue #4:
Main changes:
SimpleUpdate
class are now properties, using the@property
decorator.TensorNetwork
class. This supports the following point.get_tensor_network_state()
which returns a copy of theTensorNetwork
object, with weights absorbed into neighboring tensors, to reflect the actual state of the systemafh_peps_ground_state_experiment()
instead of saving the original TensorNetwork, now the return value ofget_tensor_network_state()
is usedTensorNetwork
andSimpleUpdate
classes. Mostly to annotate return values to allow linters to provide coding-hints for users, according to PEP 484.Possible disagreements or issues:
The return type of
get_tensor_network_state()
is currently aTensorNetwork
object.It might make more sense to return a simpler list of tensors (i.e., type
list[np.ndarray]
), where the list is simplyself.tensors
.