U
    ZÊ¹jü  ã                   @   sd   d Z ddlmZ ddlmZ ddlmZ dd„ Zdd„ Z	dd
d„Z
edƒZedddd�dd„ ƒZdS )z!Known matrices related to physicsé    )ÚI)ÚMutableDenseMatrix)Ú
deprecatedc                 C   sH   | dkrd}n2| dkr*dt  ft dff}n| dkr8d}ntdƒ‚t|ƒS )a  Returns a Pauli matrix `\sigma_i` with `i=1,2,3`.

    References
    ==========

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

    Examples
    ========

    >>> from sympy.physics.matrices import msigma
    >>> msigma(1)
    Matrix([
    [0, 1],
    [1, 0]])
    é   ))r   r   ©r   r   é   r   é   )r   )r   éÿÿÿÿzInvalid Pauli index)r   Ú
IndexErrorÚMatrix)ÚiÚmat© r   úU/var/www/html/bwave/python/venv/lib/python3.8/site-packages/sympy/physics/matrices.pyÚmsigma   s    þr   c                 C   sj   | | }| | }| | }|d }|d }|d }	||	 ||f|||	 |f|||| ff}
| t |
ƒ S )a—  Returns the Parallel Axis Theorem matrix to translate the inertia
    matrix a distance of `(dx, dy, dz)` for a body of mass m.

    Examples
    ========

    To translate a body having a mass of 2 units a distance of 1 unit along
    the `x`-axis we get:

    >>> from sympy.physics.matrices import pat_matrix
    >>> pat_matrix(2, 1, 0, 0)
    Matrix([
    [0, 0, 0],
    [0, 2, 0],
    [0, 0, 2]])

    r   )r   )ÚmZdxZdyZdzZdxdyZdydzZdzdxZdxdxZdydyZdzdzr   r   r   r   Ú
pat_matrix-   s    


þr   Fc                 C   sž   | dkrt dƒ‚| dkrd}nb| dkr,d}nT| dkrfdddt fddtdfdtddft dddff}n| dkrtd	}n| d
kr€d}t|ƒ}|rš| dkrš| }|S )a�  Returns a Dirac gamma matrix `\gamma^\mu` in the standard
    (Dirac) representation.

    Explanation
    ===========

    If you want `\gamma_\mu`, use ``gamma(mu, True)``.

    We use a convention:

    `\gamma^5 = i \cdot \gamma^0 \cdot \gamma^1 \cdot \gamma^2 \cdot \gamma^3`

    `\gamma_5 = i \cdot \gamma_0 \cdot \gamma_1 \cdot \gamma_2 \cdot \gamma_3 = - \gamma^5`

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gamma_matrices

    Examples
    ========

    >>> from sympy.physics.matrices import mgamma
    >>> mgamma(1)
    Matrix([
    [ 0,  0, 0, 1],
    [ 0,  0, 1, 0],
    [ 0, -1, 0, 0],
    [-1,  0, 0, 0]])
    )r   r   r   r   é   zInvalid Dirac indexr   )©r   r   r   r   ©r   r   r   r   ©r   r   r	   r   ©r   r   r   r	   r   )©r   r   r   r   ©r   r   r   r   ©r   r	   r   r   ©r	   r   r   r   r   r   )r   r   r   r   r   )r   r   r   r   )r   r   r   r   )r
   r   r   )ÚmuÚlowerr   r   r   r   r   ÚmgammaK   s*    

ür   )r   r   r   r   zk
    The sympy.physics.matrices.mdft method is deprecated. Use
    sympy.DFT(n).as_explicit() instead.
    z1.9zdeprecated-physics-mdft)Zdeprecated_since_versionZactive_deprecations_targetc                 C   s   ddl m} || ƒ ¡ S )z®
    .. deprecated:: 1.9

       Use DFT from sympy.matrices.expressions.fourier instead.

       To get identical behavior to ``mdft(n)``, use ``DFT(n).as_explicit()``.
    r   )ÚDFT)Z"sympy.matrices.expressions.fourierr   Z
as_mutable)Únr   r   r   r   ÚmdftŸ   s    r!   N)F)Ú__doc__Zsympy.core.numbersr   Zsympy.matrices.denser   r   Zsympy.utilities.decoratorr   r   r   r   Zminkowski_tensorr!   r   r   r   r   Ú<module>   s   %
Lú