Example #1
0
def test_QobjConjugate():
    "Qobj conjugate"
    data = _random_not_singular(5)
    A = Qobj(data)
    B = A.conj()
    assert np.all(B.data.todense() - np.matrix(data.conj()) == 0)
    assert A.isherm == B.isherm
    assert A.type == B.type
    assert A.superrep == B.superrep
Example #2
0
def test_QobjConjugate():
    "Qobj conjugate"
    data = np.random.random((5, 5)) + 1j * np.random.random((5, 5)) - (0.5 + 0.5j)
    A = Qobj(data)
    B = A.conj()
    assert_(np.all(B.data.todense() - np.matrix(data.conj()) == 0))
    assert_equal(A.isherm, B.isherm)
    assert_equal(A.type, B.type)
    assert_equal(A.superrep, B.superrep)
Example #3
0
def test_QobjConjugate():
    "Qobj conjugate"
    data = _random_not_singular(5)
    A = Qobj(data)
    B = A.conj()
    assert_(np.all(B.data.todense() - np.matrix(data.conj()) == 0))
    assert_equal(A.isherm, B.isherm)
    assert_equal(A.type, B.type)
    assert_equal(A.superrep, B.superrep)
Example #4
0
def test_QobjConjugate():
    "Qobj conjugate"
    data = _random_not_singular(5)
    A = Qobj(data)
    B = A.conj()
    assert np.all(B.full() == data.conj())
    assert A.isherm == B.isherm
    assert A.type == B.type
    assert A.superrep == B.superrep
Example #5
0
def test_QobjConjugate():
    "Qobj conjugate"
    data = np.random.random(
        (5, 5)) + 1j * np.random.random((5, 5)) - (0.5 + 0.5j)
    A = Qobj(data)
    B = A.conj()
    assert_(np.all(B.data.todense() - np.matrix(data.conj()) == 0))
    assert_equal(A.isherm, B.isherm)
    assert_equal(A.type, B.type)
    assert_equal(A.superrep, B.superrep)