(i)
return Matrix(mat)
r"""Returns a Pauli matrix `\sigma_i` with `i=1,2,3`

    References
    ==========

    .. [1] http://en.wikipedia.org/wiki/Pauli_matrices

    Examples
    ========

    >>> from sympy.physics.matrices import msigma
    >>> msigma(1)
    Matrix([
    [0, 1],
    [1, 0]])
r"""Returns a Pauli matrix `\sigma_i` with `i=1,2,3`
r Returns a Pauli matrix \ sigma_i with i = 1 2 3
def msigma(i):
    r"""Returns a Pauli matrix `\sigma_i` with `i=1,2,3`

    References
    ==========

    .. [1] http://en.wikipedia.org/wiki/Pauli_matrices

    Examples
    ========

    >>> from sympy.physics.matrices import msigma
    >>> msigma(1)
    Matrix([
    [0, 1],
    [1, 0]])
    """
    if i == 1:
        mat = ( (
            (0, 1),
            (1, 0)
        ) )
    elif i == 2:
        mat = ( (
            (0, -I),
            (I, 0)
        ) )
    elif i == 3:
        mat = ( (
            (1, 0),
            (0, -1)
        ) )
    else:
        raise IndexError("Invalid Pauli index")
    return Matrix(mat)
def msigma ( i ) : if i == 1 : mat = ( ( ( 0 , 1 ) , ( 1 , 0 ) ) ) elif i == 2 : mat = ( ( ( 0 , - I ) , ( I , 0 ) ) ) elif i == 3 : mat = ( ( ( 1 , 0 ) , ( 0 , - 1 ) ) ) else : raise IndexError ( "Invalid Pauli index" ) return Matrix ( mat )