def test_pure(self): rho = qu.up(qtype='dop') psi = qu.purify(rho) assert abs(qu.concurrence(psi)) < 1e-14
def test_bell_states(self, qtype, bs): p = qu.bell_state(bs, qtype=qtype) assert qu.concurrence(p) > 1.0 - 1e-14
def test_subsystem(self): p = qu.rand_rho(2**4) e = qu.concurrence(p, [2, 2, 2, 2], 1, 2) assert 0 <= e <= 1
def test_entanglement(self, p): rho = werner_state(p) assert concurrence(rho) > 1e-14