+
     ‡i´	  ã                   ó`   € R t ^ RIHtHt ^ RIHt R.t ! R R]4      tR]n        R ]n	        R# )zHermitian conjugation.)ÚExprÚsympify)ÚadjointÚDaggerc                   ó>   a € ] tR t^t o Rt]R 4       tRR ltRtV t	R# )r   aù  General Hermitian conjugate operation.

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

Take the Hermetian conjugate of an argument [1]_. For matrices this
operation is equivalent to transpose and complex conjugate [2]_.

Parameters
==========

arg : Expr
    The SymPy expression that we want to take the dagger of.
evaluate : bool
    Whether the resulting expression should be directly evaluated.

Examples
========

Daggering various quantum objects:

    >>> from sympy.physics.quantum.dagger import Dagger
    >>> from sympy.physics.quantum.state import Ket, Bra
    >>> from sympy.physics.quantum.operator import Operator
    >>> Dagger(Ket('psi'))
    <psi|
    >>> Dagger(Bra('phi'))
    |phi>
    >>> Dagger(Operator('A'))
    Dagger(A)

Inner and outer products::

    >>> from sympy.physics.quantum import InnerProduct, OuterProduct
    >>> Dagger(InnerProduct(Bra('a'), Ket('b')))
    <b|a>
    >>> Dagger(OuterProduct(Ket('a'), Bra('b')))
    |b><a|

Powers, sums and products::

    >>> A = Operator('A')
    >>> B = Operator('B')
    >>> Dagger(A*B)
    Dagger(B)*Dagger(A)
    >>> Dagger(A+B)
    Dagger(A) + Dagger(B)
    >>> Dagger(A**2)
    Dagger(A)**2

Dagger also seamlessly handles complex numbers and matrices::

    >>> from sympy import Matrix, I
    >>> m = Matrix([[1,I],[2,I]])
    >>> m
    Matrix([
    [1, I],
    [2, I]])
    >>> Dagger(m)
    Matrix([
    [ 1,  2],
    [-I, -I]])

References
==========

.. [1] https://en.wikipedia.org/wiki/Hermitian_adjoint
.. [2] https://en.wikipedia.org/wiki/Hermitian_transpose
c                ó<   € V P                   ^ ,          P                  # )zHFind the kind of a dagger of something (just the kind of the something).)ÚargsÚkind)Úselfs   &Ú|/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/physics/quantum/dagger.pyr	   ÚDagger.kindR   s   € ð y‰y˜|× Ñ Ð ó    c                ó*  € \        VR 4      '       d   V'       d   VP                  4       # \        VR4      '       d9   \        VR4      '       d'   V'       d   VP                  4       P                  4       # \        P
                  ! V \        V4      4      # )r   Ú	conjugateÚ	transpose)Úhasattrr   r   r   r   Ú__new__r   )ÚclsÚargÚevaluates   &&&r   r   ÚDagger.__new__W   sb   € Ü3˜	×"Ò"§xØ—;‘;“=Ð ÜS˜+×&Ò&¬7°3¸×+DÒ+DÏØ—=‘=“?×,Ñ,Ó.Ð.Ü|Š|˜C¤¨£Ó.Ð.r   © N)T)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úpropertyr	   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s*   ø‡ € ñDðL ñ!ó ð!÷/ò /r   c                 óT   € R VP                  V P                  ^ ,          4      ,          # )z
Dagger(%s))Ú_printr   )ÚaÚbs   &&r   Ú<lambda>r%   _   s   €  ,°·±¸!¿&¹&À½)Ó1DÖ"Dr   N)
r   Ú
sympy.corer   r   Ú$sympy.functions.elementary.complexesr   Ú__all__r   r   Ú
_sympyreprr   r   r   Ú<module>r*      s;   ðÙ ç $Ý 8ð ð€ô
Q/ˆWô Q/ðf €Ô ÙD€Ö r   