+
    
þÎjÐ  ã                   óÎ   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHtHt R	.t ! R
 R	]4      t]P(                  P+                  ]]4      R 4       tR# )z+The anti-commutator: ``{A,B} = A*B + B*A``.)ÚExpr)ÚKindDispatcher)ÚMul)ÚInteger)ÚS)Ú
prettyForm)ÚDagger)Ú_OperatorKindÚOperatorKindÚAntiCommutatorc                   ó†   a € ] tR t^t o RtRt]! RRR7      t]R 4       t	R t
]R 4       tR	 tR
 tR tR tR tR tRtV tR# )r   ar  The standard anticommutator, in an unevaluated state.

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

Evaluating an anticommutator is defined [1]_ as: ``{A, B} = A*B + B*A``.
This class returns the anticommutator in an unevaluated form.  To evaluate
the anticommutator, use the ``.doit()`` method.

Canonical ordering of an anticommutator is ``{A, B}`` for ``A < B``. The
arguments of the anticommutator are put into canonical order using
``__cmp__``. If ``B < A``, then ``{A, B}`` is returned as ``{B, A}``.

Parameters
==========

A : Expr
    The first argument of the anticommutator {A,B}.
B : Expr
    The second argument of the anticommutator {A,B}.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.quantum import AntiCommutator
>>> from sympy.physics.quantum import Operator, Dagger
>>> x, y = symbols('x,y')
>>> A = Operator('A')
>>> B = Operator('B')

Create an anticommutator and use ``doit()`` to multiply them out.

>>> ac = AntiCommutator(A,B); ac
{A,B}
>>> ac.doit()
A*B + B*A

The commutator orders it arguments in canonical order:

>>> ac = AntiCommutator(B,A); ac
{A,B}

Commutative constants are factored out:

>>> AntiCommutator(3*x*A,x*y*B)
3*x**2*y*{A,B}

Adjoint operations applied to the anticommutator are properly applied to
the arguments:

>>> Dagger(AntiCommutator(A,B))
{Dagger(A),Dagger(B)}

References
==========

.. [1] https://en.wikipedia.org/wiki/Commutator
FÚAntiCommutator_kind_dispatcherT)Úcommutativec                óH   € R  V P                    4       pV P                  ! V!  # )c              3   ó8   "  € T F  qP                   x € K  	  R # 5i©N)Úkind)Ú.0Úas   & ÚZ/opt/data/home/.local/lib/python3.14/site-packages/sympy/physics/quantum/anticommutator.pyÚ	<genexpr>Ú&AntiCommutator.kind.<locals>.<genexpr>X   s   é € Ð/¡Y —V–V£Yùs   ‚)ÚargsÚ_kind_dispatcher)ÚselfÚ	arg_kindss   & r   r   ÚAntiCommutator.kindV   s!   € á/ T§Y¢YÓ/ˆ	Ø×$Ò$ iÑ0Ð0ó    c                ób   € V P                  W4      pVe   V# \        P                  ! WV4      pV# r   )Úevalr   Ú__new__)ÚclsÚAÚBÚrÚobjs   &&&  r   r    ÚAntiCommutator.__new__[   s.   € Ø�H‰H�Q‹NˆØŠ=ØˆHÜ�lŠl˜3 1Ó%ˆØˆ
r   c           	     ó&  € V'       d	   V'       g   \         P                  # W8X  d   \        ^4      V^,          ,          # VP                  '       g   VP                  '       d   \        ^4      V,          V,          # VP	                  4       w  r4VP	                  4       w  rVW5,           pV'       dC   \        \        V!  V ! \
        P                  ! V4      \
        P                  ! V4      4      4      # VP                  V4      ^8X  d	   V ! W!4      # R# )é   N)r   ÚZeror   Úis_commutativeÚargs_cncr   Ú
_from_argsÚcompare)r!   r   ÚbÚcaÚncaÚcbÚncbÚc_parts   &&&     r   r   ÚAntiCommutator.evalb   sÁ   € ç—aÜ—6‘6ˆMØŒ6Ü˜1“:˜a �d•?Ð"Ø××Ð˜q×/×/Ð/Ü˜1“:˜a•< •>Ð!ð —*‘*“,‰ˆØ—*‘*“,‰ˆØ•ˆßÜ”s˜F‘|¡S¬¯ª¸Ó)<¼c¿nºnÈSÓ>QÓ%RÓSÐSð �9‰9�Q‹<˜1ÔÙ�q“9Ðñ r   c                ó®  € ^ RI Hp V P                  ^ ,          pV P                  ^,          p\        W24      '       d<   \        WB4      '       d+    VP                  ! V3/ VB pTe   TP                  ! R/ TB # W4,          WC,          ,           P                  ! R/ VB #   \
         d,     TP                  ! T3/ TB p L\  \
         d    Rp  Lli ; ii ; i)zEvaluate anticommutator )ÚOperatorN© )Úsympy.physics.quantum.operatorr6   r   Ú
isinstanceÚ_eval_anticommutatorÚNotImplementedErrorÚdoit)r   Úhintsr6   r"   r#   Úcomms   &,    r   r<   ÚAntiCommutator.doitw   sÅ   € õ 	<Ø�I‰I�a�LˆØ�I‰I�a�LˆÜ�a×"Ò"¤z°!×'>Ò'>ð Ø×-Ò-¨aÑ9°5Ñ9�ð ÒØ—y’yÑ) 5Ñ)Ð)Ø•�a•c•	×ÒÑ( %Ñ(Ð(øô 'ô  ð Ø×1Ò1°!Ñ=°uÑ=’DøÜ*ô  Ø“Dð úð ús*   ÁB ÂCÂ*B?Â?CÃCÃCÃCc                ó‚   € \        \        V P                  ^ ,          4      \        V P                  ^,          4      4      # )é    )r   r   r   )r   s   &r   Ú_eval_adjointÚAntiCommutator._eval_adjointŠ   s)   € Üœf T§Y¡Y¨q¥\Ó2´F¸4¿9¹9ÀQ½<Ó4HÓIÐIr   c                óÆ   € V P                   P                  : R VP                  V P                  ^ ,          4      : RVP                  V P                  ^,          4      : R2# )Ú(Ú,Ú))Ú	__class__Ú__name__Ú_printr   ©r   Úprinterr   s   &&*r   Ú
_sympyreprÚAntiCommutator._sympyrepr�   sC   € à�N‰N×#Ô# W§^¡^Ø—	‘	˜!•ö&Ø&Ÿ~™~¨d¯i©i¸­lÖ;ð
ð 	
r   c                ó˜   € R VP                  V P                  ^ ,          4      : RVP                  V P                  ^,          4      : R2# )Ú{rF   Ú})rJ   r   rK   s   &&*r   Ú	_sympystrÚAntiCommutator._sympystr“   s5   � à�N‰N˜4Ÿ9™9 Q�<Ö(¨'¯.©.¸¿¹À1½Ö*FðHð 	Hr   c                ó<  € VP                   ! V P                  ^ ,          .VO5!  p\        VP                  \        R4      4      !  p\        VP                  VP                   ! V P                  ^,          .VO5!  4      !  p\        VP	                  RRR7      !  pV# )rA   rF   rP   rQ   )ÚleftÚright)rJ   r   r   rV   Úparens)r   rL   r   Úpforms   &&* r   Ú_prettyÚAntiCommutator._pretty—   sy   € Ø—’˜tŸy™y¨�|Ð3¨dÓ3ˆÜ˜EŸK™K¬
°3«Ó8Ñ9ˆÜ˜EŸK™K¨¯ª°t·y±yÀµ|Ð(KÀdÓ(KÓLÑMˆÜ˜EŸL™L¨c¸˜LÓ=Ñ>ˆØˆr   c           
     ó†   € R \        V P                   Uu. uF  q1P                  ! V.VO5!  NK  	  up4      ,          # u upi )z\left\{%s,%s\right\})Útupler   rJ   )r   rL   r   Úargs   &&* r   Ú_latexÚAntiCommutator._latexž   sB   € Ø)¬EØ26·)²)ó3=Ù2;¨3�NŠN˜3Ð& Ö&±)ñ3=ó ->õ >ð 	>ùò 3=s   •>
r7   N)rI   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r*   r   r   Úpropertyr   r    Úclassmethodr   r<   rB   rM   rR   rY   r^   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      sq   ø‡ € ñ:ðv €Ná%Ð&FÐTXÔYÐàñ1ó ð1òð ñó ðò()ò&Jò
òHò÷>ð >r   c                ó   € \         # )z8Find the kind of an anticommutator of two OperatorKinds.)r
   )Úe1Úe2s   &&r   Úfind_op_kindrl   £   s
   € ô Ðr   N)rc   Úsympy.core.exprr   Úsympy.core.kindr   Úsympy.core.mulr   Úsympy.core.numbersr   Úsympy.core.singletonr   Ú sympy.printing.pretty.stringpictr   Úsympy.physics.quantum.daggerr   Úsympy.physics.quantum.kindr	   r
   Ú__all__r   r   Úregisterrl   r7   r   r   Ú<module>rw      sc   ðÙ 1å  Ý *Ý Ý &Ý "Ý 7å /ß Bð ð€ôJ>�Tô J>ðZ × Ñ ×)Ñ)¨-¸ÓGñó Hòr   