-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
Ansatz
to be a concrete type with lattice information (#223)
* Introduce Canonical `Form` trait * Refactor `Ansatz` into a concrete type * Fix typos in `Ansatz` * Use `Graphs.neighbors` * Implement `copy`, `similar`, `zero` for `Ansatz` * Relax `sites` condition on `Ansatz` construction for `lanes` * Remove some exports * Move `Chain` code to `AbstractAnsatz` and `MPS` * Force Graphs to be a strong dependency * Implement `Graphs.neighbors`, `isneighbor` methods * Refactor `adapt_structure` method to support additional types * Refactor `Reactant.make_tracer`, `Reactant.create_result` methods on top of recent changes * Refactor `ChainRules` methods on top of new types * Refactor `ProjectTo` for `Ansatz` * Export `canonize_site`, `canonize_site!` methods * Add `Graphs`, `MetaGraphsNext` as test dependencies * Fix `tensors(; bond)` * Fix `truncate!` * Fix `truncate!` extension when using `threshold` * Format code * Comment `renormalize` kwarg of `evolve!` * Fix `simple_update!` on single site gates * Fix indexing problems in `simple_update_1site!` * Some fixes on `simple_update!` * Prototype tests for `Ansatz` * Fix reference to lattice in `adapt_structure` for `Ansatz` * Stop using `IdDict` on Reactant extension * Set temporarily a more concrete type of `lattice` in graph to circunvent a Julia bug * Delete `Chain`, `Dense`, `Grid`, `Product` types * Revert "Set temporarily a more concrete type of `lattice` in graph to circunvent a Julia bug" This reverts commit 7c67f58. * Partially revert 0bef4a9 * Fix `expect` for single and multiple observables * Replace `MetaGraph` for new `Lattice` graph type * fix ambiguous definition of `expect` methods * test `Ansatz` * fix typo * format code * fix `@testset` with `let` * fix `Ansatz` constructor * fix calls to `neighbors` on `Ansatz` tests * fix typo * Implement `Base.copy` for `Lattice` * fix tests * Reenable `ChainRules` tests on `Ansatz` * format code * implement default method for `form` * finish `Ansatz` tests * refactor `expect` to avoid calling `evolve!` * import `Graphs.contract` to avoid namespace conflicts * delete "Ansatz" folder * document stuff * fix `include` * fix tests * fix `simple_update!` for 2-local operators * reenable tests for `simple_update!`, `evolve!` on 2-local operators * fix tests * fix `ChainRulesTestUtils.rand_tangent` for `Lattice` * fix typo * Implement `ChainRulesTestUtils.test_approx` for `Lattice` * clean comment * fix typo again * Stop installing `ITensorNetworks` on test * Reinclude skipped test sets of `Product` and `Chain` Co-authored-by: Jofre Vallès Muns <61060572+jofrevalles@users.noreply.github.com> * Refactor `truncate!` to account for different methods based on canonical forms --------- Co-authored-by: Sergio Sánchez Ramírez <sergio.sancnchez.ramirez+git@bsc.es> Co-authored-by: Jofre Vallès Muns <61060572+jofrevalles@users.noreply.github.com>
- Loading branch information
1 parent
a241967
commit a432fa3
Showing
29 changed files
with
936 additions
and
1,264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.