Ejemplo n.º 1
0
 def test_random_unitary(self, N):
     a = random_unitary(N)
     distance = abs(np.sum(a.dot(a.T.conj()) - np.eye(N)))
     self.assertAlmostEqual(distance, 0, places=10)
Ejemplo n.º 2
0
 def test_random_unitary(self, m_v):
     """ random unitary test """
     r_a = random_unitary(m_v)
     distance = abs(np.sum(r_a.dot(r_a.T.conj()) - np.eye(m_v)))
     self.assertAlmostEqual(distance, 0, places=10)