ITensorNetworks.jl
ITensorNetworks.jl copied to clipboard
MaximiseBilinearForm
This PR adds a solver which, given a bilinearformnetwork <x|A|y> and some partitioning of the network, optimises |y> to maximize <x|A|y> * conj(<x|A|y>) / <y|y>) and then returns <x|A|y> and <y|.
One-site and two-site sweeping is available. Currently, an "orthogonal" algorithm is supported where y is kept in the orthogonal gauge to do the optimization. A "biorthogonal" version of the algorithm will be supported once biorthogonal gauging routines like gauge_walk are added to the library.
The assertions that <x|A|y> forms a tree under partitioning and that |y> is a tree are made - although these can can be lifted in the future and the fitting done for general networks under the BP approximation with appropriate definitions of the updater and sequence functions.
With this PR, the ability to fit ITensorNetworks of fairly general structure down to some desired tensor network y which forms a tree is doable in a cost efficient manner. This will be the workhorse for the incoming BoundaryMPSCache type but the code here also generalizes the truncate(tn::AbstractTTN) function and offers a cost effective alternative to the code in src/contract_approx/.
@mtfishman and @emstoudenmire The solver here (in src/formnetworks/maximise_bilinearformnetwork.jl) is based on the idea of doing some sort of alternating update style procedure so it would be good to discuss how that can fit within the re-write of alternating_update
Tests are added.