| Server IP : 93.86.61.54 / Your IP : 216.73.216.206 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/sympy/physics/__pycache__/ |
Upload File : |
o
�8Va@ � @ sp d Z ddlmZmZmZmZ ddlmZ ddlm Z dd� Z
dd� Zdd
d�Zed�Z
e d
ddd�dd� �ZdS )z!Known matrices related to physics� )�Matrix�I�pi�sqrt)�exp)�
deprecatedc C sR | dkr
d}t|�S | dkrdt ft dff}t|�S | dkr%d}t|�S td��)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 ���zInvalid Pauli index)r �
IndexErrorr )�i�mat� r �8/usr/lib/python3/dist-packages/sympy/physics/matrices.py�msigma s ����r c C sj | | }| | }| | }|d }|d }|d } || ||f||| |f|||| ff}
| 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 )�m�dx�dy�dz�dxdy�dydz�dzdx�dxdx�dydy�dzdzr r r r �
pat_matrix- s
�r Fc C s� | dvrt d��| dkrd}n1| dkrd}n*| dkr3dddt fddtdfdtddft dddff}n
| dkr:d }n| d
kr@d}t|�}|rM| dv rM| }|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 � zInvalid 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"