Пример #1
0
 def test_quantum_discord_pure(self):
     for _ in range(10):
         p = qu.rand_ket(4)
         p = p @ p.H
         iab = qu.mutual_information(p)
         qd = qu.quantum_discord(p)
         assert_allclose(iab / 2, qd)
Пример #2
0
 def test_auto_trace_out(self):
     p = qu.rand_rho(2**3)
     qd = qu.quantum_discord(p, [2, 2, 2], 0, 2)
     assert (0 <= qd and qd <= 1)
Пример #3
0
 def test_quantum_discord_mixed(self):
     for _ in range(10):
         p = qu.rand_mix(4)
         p = p @ p.H
         qd = qu.quantum_discord(p)
         assert (0 <= qd and qd <= 1)
Пример #4
0
 def test_quantum_discord_sep(self):
     for _ in range(10):
         p = qu.rand_product_state(2)
         p = p @ p.H
         qd = qu.quantum_discord(p)
         assert_allclose(0.0, qd, atol=1e-12)