Implementation of LU and Cholesky solvers for linear systems#167
Implementation of LU and Cholesky solvers for linear systems#167jurajHasik wants to merge 2 commits intoITensor:masterfrom
Conversation
|
Hi, thanks for the pull request. You may have noticed that I recently added an implementation of gmres, which is an iterative solver for linear systems. In general in tensor network calculations, I think it is better to use something like gmres/bicgstab, since you can take advantage of the sparse nature of the tensor network (i.e. for solving A*x = b for x, one does not need to form the matrix A, but instead just needs the result of acting A on a vector, which in tensor network calculations is usually much more efficient since the linear map A is usually made up of the contraction of multiple tensors). Having an alternative based on an LU/Cholesky decomposition may be useful as well. Did you have a particular use case where something like gmres() would not be sufficient? Also, do you have an implementation for the case with IQTensors? |
|
The use case which led me to include Cholesky & LU comes from the full update algorithm for iPEPS minimize wrt. A: A^\dag * M * A - A^\dag K, where M and K are matrix and vector obtained from the remaining part of the network. Then move to another tensor and repeat until the desired accuracy is reached. The quadratic problems obtained through the course of ALS are not necessarily sparse (no symmetries imposed on tensors). Supplying just matrix-vector product: LU/Cholesky vs GMRES: Unfortunately, I do not have an implementation for IQTensors at hand. |
An initial implementation for LU and Cholesky solvers for linear systems. The linsystem function
takes Tensor A, interprets it as a matrix of coefficients and solves for the right hand side passed as tensor B.
A choice for the solver, method="LU" or "Cholesky", is passed in through Args system with default being LU.