Пример #1
0
 def test_pauli_correlations_no_sum_abs(self, pre_c):
     p = qu.bell_state('psi-')
     ct = qu.pauli_correlations(p, sum_abs=False, precomp_func=pre_c)
     assert_allclose(list(c(p) for c in ct) if pre_c else ct, (-1, -1, -1))
Пример #2
0
 def test_pauli_correlations_sum_abs(self, pre_c):
     p = qu.bell_state('psi-')
     ct = qu.pauli_correlations(p, sum_abs=True, precomp_func=pre_c)
     ct = ct(p) if pre_c else ct
     assert_allclose(ct, 3.0)