一般设计两种算法:
- SVD得到初值
- ALS进行进一步的优化
在实际使用过程中发现,
- 当D不够大时,ALS对精度的改进有限
=== D=10 iMPS Variation Compression =====
distance for SVD: 9.0873e-06
final distance for two-site reduced svd- density matrix: 7.4879e-06
distance for ALS: 7.263e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
distance for ALS: 7.2607e-06
final distance for two-site reduced als- density matrix: 5.437e-06
- 当D大时,ALS对精度有几个量级的改进
=== D=40 iMPS Variation Compression =====
distance for SVD: 1.0968e-08
final distance for two-site reduced svd- density matrix: 1.0886e-08
distance for ALS: 1.6257e-11
distance for ALS: 1.6257e-11
distance for ALS: 1.6256e-11
distance for ALS: 1.6257e-11
distance for ALS: 1.6258e-11
distance for ALS: 1.6257e-11
distance for ALS: 1.6256e-11
distance for ALS: 1.6257e-11
distance for ALS: 1.6256e-11
distance for ALS: 1.6257e-11
final distance for two-site reduced als- density matrix: -8.3045e-14
关于 3legladder 的处理
3legladder由于各处维度较大,原本不耗费时间的步骤,一个个均成为效率瓶颈。今晚跟波哥喝酒,回家趁着酒兴,对代码进行了优化,取得了满意的结果。
代码优化方法
原算法先构造UAB,再整个进行SVD来得到新的A和B。我现在先对U进行SVD,然后缩并得到A,B。此过程避免了大矩阵的SVD分解。
原算法借助SVD求解新张量的初值,再进行ALS优化。我现在取随机初值,再ALS。
原算法用eigs配搭函数句柄求环境张量。我现在先显式地求出转移矩阵T,再eigs。
测试
在Mac上粗测,原版本处理3legladder耗费时间为天文数字。
现在的版本,完成一次演化只需7秒。#