-
Notifications
You must be signed in to change notification settings - Fork 1
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
Concretize Ansatz
type with "lattice"/connectivity information and refactor subtypes on top of it
#204
base: master
Are you sure you want to change the base?
Conversation
678c3af
to
9b22b13
Compare
@jofrevalles Seems like the problem is (again) related to the way indices are replaced when doing |
In my opinion, it would be much better to revert the code to what we had previously (so indices are not repeated, and just have an |
I wouldn't change the indices for plotting because it will lie to the users. |
I mean, you can take any |
…PS`, `MPO`, `PEPS`
…nsors) (#218) * Format code * Implement MPS identity initialization * Add tests for all dispatches of MPS identity init * Format julia code * Rename function header & add docstring * Fix test set for identity MPS * Format code * Rewrite MPS identity init function to nsites instead of arrays' dimensions * Format julia code * Update docstring of identity * Clean code in test (suggested by Jofre) Co-authored-by: Jofre Vallès Muns <[email protected]> * Format julia code * Refactor virtualdims in identity (suggested by Sergio) * Update src/Ansatz/MPS.jl * Restrict to default order in identity MPS * Update src/Ansatz/MPS.jl * Remove order parameter in identity --------- Co-authored-by: Jofre Vallès Muns <[email protected]> Co-authored-by: Sergio Sánchez Ramírez <[email protected]>
Fixes some problems when calling `make_tracer` on an object that wraps an `Ansatz`, like `Tuple{MPS}` for example.
Inspired by ITensorNetworks.jl (but not equal), I experimented with using a graph for representing the connectivity between different sites.
In "ITensorNetworks.jl", they use the graph for representing the structure of the TensorNetwork and the connectivity graph of the different sites, which is useful when dealing with lattices or hamiltonians. Unlike them, the hypergraph structure is already implicit in
TensorNetwork
, but it doesn't comfortably accommodate for fixed structured Tensor Networks like MPS, PEPS, TTN, ...By adding a graph field in
Ansatz
that accounts for the connectivity pattern between sites, a lot of the software design problems can be mitigated.I've also refactored
Chain
intoMPS
andMPO
andGrid
intoPEPS
and(actually, I've never seen a PEPO in real life).PEPO
@jofrevalles @starsfordummies you might want to reconsider refactoring your PR on top of this.