Example #1
0
 def test_d2(self):
     rho = qu.eye(2) / 2
     psi = qu.purify(rho)
     assert qu.expec(psi, qu.bell_state('phi+')) > 1 - 1e-14
Example #2
0
 def test_pure(self):
     rho = qu.up(qtype='dop')
     psi = qu.purify(rho)
     assert abs(qu.concurrence(psi)) < 1e-14
Example #3
0
 def test_d2(self):
     rho = eye(2) / 2
     psi = purify(rho)
     assert expec(psi, bell_state('phi+')) > 1 - 1e-14