mpsmpo_test.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:mpnum 作者: dseuss 项目源码 文件源码
def test_pmps_reduction_array_slow_noprune(
        nr_sites, local_dim, rank, keep, rgen, benchmark):
    pmps = factory.random_mpa(nr_sites, (local_dim, local_dim), rank,
                              dtype=np.complex_, normalized=True,
                              randstate=rgen)
    # NB: The maximal distance between sites of the reduction is
    # limited by the fact that normal numpy builds support arrays with
    # at most 32 indices.
    benchmark(lambda: mm.pmps_to_mpo(mm.pmps_reduction(pmps, keep)).to_array())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号