Exemplo n.º 1
0
 def test_logneg_approx_many_body(self, psi_mb_abc, bsz):
     sysa = [0, 1, 7, 8]
     sysb = [2, 3, 9]
     rho_ab = psi_mb_abc.ptr(DIMS_MB, sysa + sysb)
     actual_ln = logneg(rho_ab, [2] * 7, sysa=(0, 1, 4, 5))
     approx_ln = logneg_subsys_approx(psi_mb_abc, DIMS_MB,
                                      sysa=sysa, sysb=sysb, bsz=bsz)
     assert_allclose(actual_ln, approx_ln, rtol=1e-1)
Exemplo n.º 2
0
 def test_logneg_approx_simple(self, psi_abc, bsz):
     rho_ab = psi_abc.ptr(DIMS, [0, 1])
     actual_ln = logneg(rho_ab, DIMS[:-1], 0)
     approx_ln = logneg_subsys_approx(psi_abc, DIMS, 0, 1, bsz=bsz)
     assert_allclose(actual_ln, approx_ln, rtol=2e-1)