K irdZddlmZddlmZddlmZdZdZ ddZ edZ ed d d d Z y)z!Known matrices related to physics)I)MutableDenseMatrix) deprecatedc|dk(r d}t|S|dk(rdt ftdff}t|S|dk(r d}t|Std)aReturns 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]]) ))rrrrr)r)rzInvalid Pauli index)r IndexErrorMatrix)imats \/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/physics/matrices.pymsigmarst" Av  #; a G F  #; a  #;.//c| |z}| |z}| |z}|dz}|dz}|dz} || z||f||| z|f||||zff} |t| zS)aReturns 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 ) mdxdydzdxdydydzdzdxdxdxdydydzdzrs r pat_matrixr-s$ 3r6D 3r6D 3r6D q5D q5D q5D 4Kt $ $+t $ $t $ &C VC[=rc|dvr td|dk(rd}nE|dk(rd}n=|dk(r)dddt fddtdfdtddft dddff}n|dk(rd }n|d k(rd }t}|r|d vr| }|S) aReturns 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]]) )rrr r zInvalid Dirac indexr)rrrrrrrrrrr rrrrr r)rrrrrrrrrr rrr rrrr r )r&r$r(r"r )r&r%r!r")rr r r )r rr )mulowerrrs rmgammar+Ks>  .// Qw  q  q 1qbM 1aL 1aLRAqM   q  q  s A  A Hr)r!r'r#r$zk The sympy.physics.matrices.mdft method is deprecated. Use sympy.DFT(n).as_explicit() instead. z1.9zdeprecated-physics-mdft)deprecated_since_versionactive_deprecations_targetc:ddlm}||jS)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)"sympy.matrices.expressions.fourierr/ as_mutable)nr/s rmdftr3s 7 q6   rN)F) __doc__sympy.core.numbersrsympy.matrices.denserr sympy.utilities.decoratorrrrr+minkowski_tensorr3rrr:s[' =0"J