コード例 #1
0
ファイル: test_calc.py プロジェクト: zeta1999/quimb
 def test_pure(self):
     rho = qu.up(qtype='dop')
     psi = qu.purify(rho)
     assert abs(qu.concurrence(psi)) < 1e-14
コード例 #2
0
ファイル: test_calc.py プロジェクト: zeta1999/quimb
 def test_bell_states(self, qtype, bs):
     p = qu.bell_state(bs, qtype=qtype)
     assert qu.concurrence(p) > 1.0 - 1e-14
コード例 #3
0
ファイル: test_calc.py プロジェクト: zeta1999/quimb
 def test_subsystem(self):
     p = qu.rand_rho(2**4)
     e = qu.concurrence(p, [2, 2, 2, 2], 1, 2)
     assert 0 <= e <= 1
コード例 #4
0
ファイル: test_states.py プロジェクト: caidish/quimb
 def test_entanglement(self, p):
     rho = werner_state(p)
     assert concurrence(rho) > 1e-14