Exemplo n.º 1
0
def test_diagonalize_real_symmetric_matrix_fails(matrix):
    with pytest.raises(ValueError):
        _ = cirq.diagonalize_real_symmetric_matrix(matrix)
Exemplo n.º 2
0
def test_diagonalize_real_symmetric_matrix_assertion_error():
    with pytest.raises(AssertionError):
        matrix = np.array([[0.5, 0], [0, 1]])
        m = np.array([[0, 1], [0, 0]])
        p = cirq.diagonalize_real_symmetric_matrix(matrix)
        assert_diagonalized_by(m, p)
Exemplo n.º 3
0
def test_diagonalize_real_symmetric_matrix(matrix):
    p = cirq.diagonalize_real_symmetric_matrix(matrix)
    assert_diagonalized_by(matrix, p)