o
    GZh  ใ                   @   sฒ   d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 ed\ZZZeddd	\ZZZZd
d Zdd Zdd ZG dd de
ZG dd de
ZG dd de
Zdd ZdS )้    ฉฺInteger)ฺsymbols)ฺDagger)ฺAntiCommutator)ฺOperatorza,b,czA,B,C,DF)Zcommutativec                  C   sD   t tt} t| t sJ | jdu sJ |  ttกt ttks J d S )NF)ฺACommฺAฺBฺ
isinstanceZis_commutativeฺsubsฺC)ฺacฉ r   ๚^/var/www/auris/lib/python3.10/site-packages/sympy/physics/quantum/tests/test_anticommutator.pyฺtest_anticommutator   s   
r   c                   C   s   t tt tt tt t tt ksJ t ttdtd  ks!J t ttt ttks-J t ttdt t ks:J t tt ก tt tt  ksKJ d S )N้   )r   ฺar	   ฺbr
   ฺdoitr   r   r   r   ฺtest_commutator_identities   s
   (&r   c                   C   s(   t ttttt tt tksJ d S )N)r   r   r	   r
   r   r   r   r   ฺtest_anticommutator_dagger   s   (r   c                   @   ๓   e Zd Zdd ZdS )ฺFooc                 C   ๓   t dS )Nr   r   )ฺselfฺbarr   r   r   ฺ_eval_anticommutator_Bar"   ๓   zFoo._eval_anticommutator_BarN)ฺ__name__ฺ
__module__ฺ__qualname__r   r   r   r   r   r       ๓    r   c                   @   s   e Zd ZdS )ฺBarN)r   r    r!   r   r   r   r   r#   &   s    r#   c                   @   r   )ฺTamc                 C   r   )N้   r   )r   Zfoor   r   r   ฺ_eval_anticommutator_Foo,   r   zTam._eval_anticommutator_FooN)r   r    r!   r&   r   r   r   r   r$   *   r"   r$   c                  C   s   t d} td}td}t| | ก dksJ t||  ก dks"J t| | ก dks-J t||  ก dks8J t|| ก || ||  ksIJ d S )NฺFr
   ฺTr   r%   )r   r#   r$   r   r   )r'   r
   r(   r   r   r   ฺtest_eval_commutator0   s   &r)   N)Zsympy.core.numbersr   Zsympy.core.symbolr   Zsympy.physics.quantum.daggerr   Z$sympy.physics.quantum.anticommutatorr   r   Zsympy.physics.quantum.operatorr   r   r   ฺcr	   r
   r   ฺDr   r   r   r   r#   r$   r)   r   r   r   r   ฺ<module>   s    