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())
评论列表
文章目录