Exemplo n.º 1
0
 def test_distinguishable(self, uqtype, dqtype):
     assert qu.trace_distance(qu.up(qtype=uqtype),
                              qu.down(qtype=dqtype)) > 1 - 1e-10
Exemplo n.º 2
0
 def test_types(self, k1, k2):
     td1 = qu.trace_distance(k1, k2)
     td2 = qu.trace_distance(qu.dop(k1), k2)
     td3 = qu.trace_distance(k1, qu.dop(k2))
     td4 = qu.trace_distance(qu.dop(k1), qu.dop(k2))
     assert_allclose([td1] * 3, [td2, td3, td4])
Exemplo n.º 3
0
 def test_same(self, p1):
     assert abs(qu.trace_distance(p1, p1)) < 1e-14
Exemplo n.º 4
0
 def test_types(self, k1, k2):
     td1 = trace_distance(k1, k2)
     td2 = trace_distance(dop(k1), k2)
     td3 = trace_distance(k1, dop(k2))
     td4 = trace_distance(dop(k1), dop(k2))
     assert_allclose([td1] * 3, [td2, td3, td4])