| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/sympy/physics/__pycache__/ |
Upload File : |
�
M�Zdr � �~ � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ dgZ
d � Zd
� Z G d� de
� Zd
� Zy)a
This module implements Pauli algebra by subclassing Symbol. Only algebraic
properties of Pauli matrices are used (we do not use the Matrix class).
See the documentation to the class Pauli for examples.
References
==========
.. [1] https://en.wikipedia.org/wiki/Pauli_matrices
� )�Add)�Mul)�I)�Pow)�Symbol)�
TensorProduct�evaluate_pauli_productc � � | |k( ryy)z�
Returns 1 if ``i == j``, else 0.
This is used in the multiplication of Pauli matrices.
Examples
========
>>> from sympy.physics.paulialgebra import delta
>>> delta(1, 1)
1
>>> delta(2, 3)
0
� r � )�i�js �</usr/lib/python3/dist-packages/sympy/physics/paulialgebra.py�deltar s � � �A�v��� c �$ � | ||fdv ry| ||fdv ryy)ak
Return 1 if i,j,k is equal to (1,2,3), (2,3,1), or (3,1,2);
-1 if ``i``,``j``,``k`` is equal to (1,3,2), (3,2,1), or (2,1,3);
else return 0.
This is used in the multiplication of Pauli matrices.
Examples
========
>>> from sympy.physics.paulialgebra import epsilon
>>> epsilon(1, 2, 3)
1
>>> epsilon(1, 3, 2)
-1
)�r � � )r r r )r r r r ))r r r )r r r )r r r ���r r )r
r �ks r �epsilonr , s+ � �"