Esempio n. 1
0
def test_Qobj_sqrtm():
    "Qobj sqrtm"
    data = np.random.random(
        (5, 5)) + 1j * np.random.random((5, 5)) - (0.5 + 0.5j)
    A = Qobj(data)
    B = A.sqrtm()
    assert_(A == B * B)
Esempio n. 2
0
def test_Qobj_sqrtm():
    "Qobj sqrtm"
    data = np.random.random(
        (5, 5)) + 1j * np.random.random((5, 5)) - (0.5 + 0.5j)
    A = Qobj(data)
    B = A.sqrtm()
    assert_(A == B * B)
Esempio n. 3
0
def test_Qobj_sqrtm():
    "Qobj sqrtm"
    data = _random_not_singular(5)
    A = Qobj(data)
    B = A.sqrtm()
    assert A == B * B