+
    
þÎjÉL  ã                   ó:  € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt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IHt ^ RIHt . ROt ! R R]4      t ! R R]4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]4      t#R# )a  Quantum mechanical operators.

TODO:

* Fix early 0 in apply_operators.
* Debug and test apply_operators.
* Get cse working with classes in this file.
* Doctests and documentation of special methods for InnerProduct, Commutator,
  AntiCommutator, represent, apply_operators.
)ÚOptional)ÚAdd)ÚExpr)Ú
DerivativeÚexpand)ÚMul©Úoo©ÚS©Ú
prettyForm)ÚDagger)ÚOperatorKind)ÚQExprÚdispatch_method)Úeye)Úsympy_deprecation_warningÚOperatorÚHermitianOperatorÚUnitaryOperatorÚIdentityOperatorÚOuterProductÚDifferentialOperatorc                   ó    a € ] tR t^*t o RtRtRt]R 4       t]	t
RtR t]tR tR tR tR	 tR
 tR tR tR tR tR t]tR tV 3R ltRtV tR# )r   aJ  Base class for non-commuting quantum operators.

An operator maps between quantum states [1]_. In quantum mechanics,
observables (including, but not limited to, measured physical values) are
represented as Hermitian operators [2]_.

Parameters
==========

args : tuple
    The list of numbers or parameters that uniquely specify the
    operator. For time-dependent operators, this will include the time.

Examples
========

Create an operator and examine its attributes::

    >>> from sympy.physics.quantum import Operator
    >>> from sympy import I
    >>> A = Operator('A')
    >>> A
    A
    >>> A.hilbert_space
    H
    >>> A.label
    (A,)
    >>> A.is_commutative
    False

Create another operator and do some arithmetic operations::

    >>> B = Operator('B')
    >>> C = 2*A*A + I*B
    >>> C
    2*A**2 + I*B

Operators do not commute::

    >>> A.is_commutative
    False
    >>> B.is_commutative
    False
    >>> A*B == B*A
    False

Polymonials of operators respect the commutation properties::

    >>> e = (A+B)**3
    >>> e.expand()
    A*B*A + A*B**2 + A**2*B + A**3 + B*A*B + B*A**2 + B**2*A + B**3

Operator inverses are handle symbolically::

    >>> A.inv()
    A**(-1)
    >>> A*A.inv()
    1

References
==========

.. [1] https://en.wikipedia.org/wiki/Operator_%28physics%29
.. [2] https://en.wikipedia.org/wiki/Observable
Nc                ó   € R# )ÚO)r   © ©Úselfs   &ÚT/opt/data/home/.local/lib/python3.14/site-packages/sympy/physics/quantum/operator.pyÚdefault_argsÚOperator.default_argsn   s   € àˆó    Ú,c                ó.   € V P                   P                  # ©N)Ú	__class__Ú__name__©r   ÚprinterÚargss   &&*r    Ú_print_operator_nameÚOperator._print_operator_namez   s   € Ø�~‰~×&Ñ&Ð&r#   c                ó@   € \        V P                  P                  4      # r&   )r   r'   r(   r)   s   &&*r    Ú_print_operator_name_prettyÚ$Operator._print_operator_name_pretty   s   € Ü˜$Ÿ.™.×1Ñ1Ó2Ð2r#   c                óº   € \        V P                  4      ^8X  d   V P                  ! V.VO5!  # V P                  ! V.VO5!  : RV P                  ! V.VO5!  : R2# )é   Ú(Ú))ÚlenÚlabelÚ_print_labelr,   r)   s   &&*r    Ú_print_contentsÚOperator._print_contents‚   sZ   € Üˆt�z‰z‹?˜aÔØ×$Ò$ WÐ4¨tÓ4Ð4ð ×)Ò)¨'Ð9°DÖ9Ø×!Ò! 'Ð1¨DÖ1ðð r#   c                ó  € \        V P                  4      ^8X  d   V P                  ! V.VO5!  # V P                  ! V.VO5!  pV P                  ! V.VO5!  p\	        VP                  RRR7      !  p\	        VP                  V4      !  pV# )r2   r3   r4   ©ÚleftÚright)r5   r6   Ú_print_label_prettyr/   r   Úparensr=   ©r   r*   r+   ÚpformÚlabel_pforms   &&*  r    Ú_print_contents_prettyÚOperator._print_contents_pretty‹   s‰   € Üˆt�z‰z‹?˜aÔØ×+Ò+¨GÐ;°dÓ;Ð;à×4Ò4°WÐD¸tÓDˆEØ×2Ò2°7ÐB¸TÓBˆKÜ$Ø×#Ñ#¨°CÐ#Ó8ñˆKô  §¡¨KÓ 8Ñ9ˆEØˆLr#   c                óº   € \        V P                  4      ^8X  d   V P                  ! V.VO5!  # V P                  ! V.VO5!  : RV P                  ! V.VO5!  : R2# )r2   z\left(z\right))r5   r6   Ú_print_label_latexÚ_print_operator_name_latexr)   s   &&*r    Ú_print_contents_latexÚOperator._print_contents_latex—   sZ   € Üˆt�z‰z‹?˜aÔØ×*Ò*¨7Ð:°TÓ:Ð:ð ×/Ò/°Ð?¸$Ö?Ø×'Ò'¨Ð7°$Ö7ðð r#   c                ó   € \        V RV3/ VB # )z:Evaluate [self, other] if known, return None if not known.Ú_eval_commutator©r   ©r   ÚotherÚoptionss   &&,r    rK   ÚOperator._eval_commutator¤   s   € ä˜tÐ%7¸ÑJÀ'ÑJÐJr#   c                ó   € \        V RV3/ VB # )z Evaluate [self, other] if known.Ú_eval_anticommutatorrL   rM   s   &&,r    rR   ÚOperator._eval_anticommutator¨   s   € ä˜tÐ%;¸UÑNÀgÑNÐNr#   c                ó   € \        V R V3/ VB # )Ú_apply_operatorrL   ©r   ÚketrO   s   &&,r    rU   ÚOperator._apply_operator°   s   € Ü˜tÐ%6¸ÑG¸wÑGÐGr#   c                ó   € R # r&   r   ©r   ÚbrarO   s   &&,r    Ú_apply_from_right_toÚOperator._apply_from_right_to³   s   € Ùr#   c                ó   € \        R 4      h)zmatrix_elements is not defined)ÚNotImplementedError)r   r+   s   &*r    Úmatrix_elementÚOperator.matrix_element¶   s   € Ü!Ð"BÓCÐCr#   c                ó"   € V P                  4       # r&   ©Ú_eval_inverser   s   &r    ÚinverseÚOperator.inverse¹   ó   € Ø×!Ñ!Ó#Ð#r#   c                ó   € V R,          # ©r2   éÿÿÿÿr   r   s   &r    rd   ÚOperator._eval_inverse¾   s   € Ø�b�zÐr#   c                óR   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   # )é   Úis_hermitianÚ
is_unitary)r   Úbool)ÚformatÚ__classdict__s   "€r    Ú__annotate__ÚOperator.__annotate__*   s+   ø‡ ‚ ñD ™4•.Ñ'ñE ñF ™•Ñ%òG r#   r   )r(   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rn   ro   Úclassmethodr!   r   ÚkindÚ_label_separatorr,   rG   r/   r8   rC   rH   rK   rR   rU   r\   r`   re   Úinvrd   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©rr   s   @r    r   r   *   s�   ø‡ € ñ@ðB $(€LØ!%€JØñó ðð €Dð Ðò'ð "6Ðò3òò
òòKòOòHòòDò$ð €Cò÷i ƒ r#   c                   ó4   a € ] tR t^Ât o RtRtR tR tRtV t	R# )r   ad  A Hermitian operator that satisfies H == Dagger(H).

Parameters
==========

args : tuple
    The list of numbers or parameters that uniquely specify the
    operator. For time-dependent operators, this will include the time.

Examples
========

>>> from sympy.physics.quantum import Dagger, HermitianOperator
>>> H = HermitianOperator('H')
>>> Dagger(H)
H
Tc                ó\   € \        V \        4      '       d   V # \        P                  V 4      # r&   )Ú
isinstancer   r   rd   r   s   &r    rd   ÚHermitianOperator._eval_inverse×   s%   € Ü�dœO×,Ò,ØˆKä×)Ñ)¨$Ó/Ð/r#   c                óÈ   € \        V \        4      '       d9   VP                  '       d   ^ RIHp VP
                  # VP                  '       d   V # \        P                  W4      # )é    r
   )	rƒ   r   Úis_evenÚsympy.core.singletonr   ÚOneÚis_oddr   Ú_eval_power)r   Úexpr   s   && r    r‹   ÚHermitianOperator._eval_powerÝ   sC   € Ü�dœO×,Ò,à�{�{ˆ{Ý2Ø—u‘u�Ø——�Ø�ä×#Ñ# DÓ.Ð.r#   r   N)
r(   ru   rv   rw   rx   rn   rd   r‹   r~   r   r€   s   @r    r   r   Â   s    ø‡ € ñð$ €Lò0÷	/ð 	/r#   c                   ó.   a € ] tR t^ét o RtRtR tRtV tR# )r   ab  A unitary operator that satisfies U*Dagger(U) == 1.

Parameters
==========

args : tuple
    The list of numbers or parameters that uniquely specify the
    operator. For time-dependent operators, this will include the time.

Examples
========

>>> from sympy.physics.quantum import Dagger, UnitaryOperator
>>> U = UnitaryOperator('U')
>>> U*Dagger(U)
1
Tc                ó"   € V P                  4       # r&   rc   r   s   &r    Ú_eval_adjointÚUnitaryOperator._eval_adjointü   rg   r#   r   N)	r(   ru   rv   rw   rx   ro   r�   r~   r   r€   s   @r    r   r   é   s   ø‡ € ñð" €J÷$ð $r#   c                   ó”   a € ] tR tRt o RtRtRt]R 4       t]	R 4       t
R tR tR tR	 tR
 tR tR tR tR tR tR tR tRtV tR# )r   é   að  An identity operator I that satisfies op * I == I * op == op for any
operator op.

.. deprecated:: 1.14.
    Use the scalar S.One instead as the multiplicative identity for
    operators and states.

Parameters
==========

N : Integer
    Optional parameter that specifies the dimension of the Hilbert space
    of operator. This is used when generating a matrix representation.

Examples
========

>>> from sympy.physics.quantum import IdentityOperator
>>> IdentityOperator() # doctest: +SKIP
I
Tc                ó   € V P                   # r&   ©ÚNr   s   &r    Ú	dimensionÚIdentityOperator.dimension  s   € à�v‰vˆr#   c                ó   € \         3# r&   r   r   s   &r    r!   ÚIdentityOperator.default_args  s	   € äˆuˆr#   c                óÚ   € \        R RRR7       \        V4      R9   g   \        RV,          4      h\        V4      ^8X  d    V^ ,          '       d   V^ ,          V n        R# \        V n        R# )z�
            IdentityOperator has been deprecated. In the future, please use
            S.One as the identity for quantum operators and states.
            z1.14zdeprecated-operator-identity)Údeprecated_since_versionÚactive_deprecations_targetz"0 or 1 parameters expected, got %sN)r†   r2   )r   r5   Ú
ValueErrorr	   r–   )r   r+   Úhintss   &*,r    Ú__init__ÚIdentityOperator.__init__   sY   € Ü!ðð &,Ø'Eõ	
ô �4‹y˜FÔ"ÜÐAÀDÕHÓIÐIä  ›Y¨!œ^°°Q·´��a•ˆŽ¼bˆŽr#   c                ó"   € \         P                  # r&   )r   ÚZero©r   rN   rŸ   s   &&,r    rK   Ú!IdentityOperator._eval_commutator.  s   € Ü�v‰vˆr#   c                ó   € ^V,          # )rm   r   r¤   s   &&,r    rR   Ú%IdentityOperator._eval_anticommutator1  s   € Ø�5�yÐr#   c                ó   € V # r&   r   r   s   &r    rd   ÚIdentityOperator._eval_inverse4  ó   € Øˆr#   c                ó   € V # r&   r   r   s   &r    r�   ÚIdentityOperator._eval_adjoint7  rª   r#   c                ó   € V# r&   r   rV   s   &&,r    rU   Ú IdentityOperator._apply_operator:  ó   € Øˆ
r#   c                ó   € V# r&   r   rZ   s   &&,r    r\   Ú%IdentityOperator._apply_from_right_to=  r¯   r#   c                ó   € V # r&   r   )r   rŒ   s   &&r    r‹   ÚIdentityOperator._eval_power@  rª   r#   c                ó   € R # ©ÚIr   r)   s   &&*r    r8   Ú IdentityOperator._print_contentsC  s   € Ùr#   c                ó   € \        R 4      # rµ   r   r)   s   &&*r    rC   Ú'IdentityOperator._print_contents_prettyF  s   € Ü˜#‹Ðr#   c                ó   € R # )z{\mathcal{I}}r   r)   s   &&*r    rH   Ú&IdentityOperator._print_contents_latexI  s   € Ùr#   c                óô   € V P                   '       d   V P                   \        8X  d   \        R4      hVP                  RR4      pVR8w  d   \        RRV,          ,           4      h\	        V P                   4      # )z%Cannot represent infinite dimensionalrq   ÚsympyzRepresentation in format z%s not implemented.zCCannot represent infinite dimensional identity operator as a matrix)r–   r	   r_   Úgetr   )r   rO   rq   s   &, r    Ú_represent_default_basisÚ)IdentityOperator._represent_default_basisL  st   € Ø�v�vˆv˜Ÿ™¤2œÜ%ð 'Gó Hð Hð —‘˜X wÓ/ˆØ�WÔÜ%Ð&AØ&;¸fÕ&Dõ'Eó Fð Fô �4—6‘6‹{Ðr#   r•   N)r(   ru   rv   rw   rx   rn   ro   Úpropertyr—   ry   r!   r    rK   rR   rd   r�   rU   r\   r‹   r8   rC   rH   r¿   r~   r   r€   s   @r    r   r      s~   ø‡ € ñð* €LØ€JØñó ðð ñó ðòAòòòòòòòòòò ÷
ð 
r#   c                   óx   a € ] tR tRt o RtRtR t]R 4       t]R 4       t	R t
R tR	 tR
 tR tR tR tRtV tR# )r   iY  aG  An unevaluated outer product between a ket and bra.

This constructs an outer product between any subclass of ``KetBase`` and
``BraBase`` as ``|a><b|``. An ``OuterProduct`` inherits from Operator as they act as
operators in quantum expressions.  For reference see [1]_.

Parameters
==========

ket : KetBase
    The ket on the left side of the outer product.
bar : BraBase
    The bra on the right side of the outer product.

Examples
========

Create a simple outer product by hand and take its dagger::

    >>> from sympy.physics.quantum import Ket, Bra, OuterProduct, Dagger

    >>> k = Ket('k')
    >>> b = Bra('b')
    >>> op = OuterProduct(k, b)
    >>> op
    |k><b|
    >>> op.hilbert_space
    H
    >>> op.ket
    |k>
    >>> op.bra
    <b|
    >>> Dagger(op)
    |b><k|

In quantum expressions, outer products will be automatically
identified and created::

    >>> k*b
    |k><b|

However, the creation of inner products always has higher priority than that of
outer products:

    >>> b*k*b
    <b|k>*<b|

References
==========

.. [1] https://en.wikipedia.org/wiki/Outer_product
Fc           	     ó   € ^ RI HpHp \        V4      ^8w  d   \	        R\        V4      ,          4      h\        V^ ,          4      p\        V^,          4      p\        WS\        34      '       Ed{   \        Wd\        34      '       Edc   VP                  4       w  rxVP                  4       w  rš\        V4      ^8w  g   \        V^ ,          V4      '       g   \        R\        V!  ,          4      h\        V
4      ^8w  g   \        V
^ ,          V4      '       g   \        R\        V
!  ,          4      hV^ ,          P                  4       V
^ ,          P                  8X  g6   \        RV^ ,          P                  : RV
^ ,          P                  : 24      h\        P                  ! V .V^ ,          V
^ ,          3O5/ VB pV^ ,          P                  Vn        \        Wy,           !  V,          # . p\        V\        4      '       dY   \        V\        4      '       dC   VP                    F1  pVP                    F  pVP#                  \%        WÞ3/ VB 4       K   	  K3  	  M�\        V\        4      '       d0   VP                    F  pVP#                  \%        WÖ3/ VB 4       K   	  MX\        V\        4      '       d0   VP                    F  pVP#                  \%        W^3/ VB 4       K   	  M\        RV: RV: 24      h\        V!  # )r†   )ÚKetBaseÚBraBasez2 parameters expected, got %dz"KetBase subclass expected, got: %rz"BraBase subclass expected, got: %rz"ket and bra are not dual classes: z, z&Expected ket and bra expression, got: )Úsympy.physics.quantum.staterÄ   rÅ   r5   rž   r   rƒ   r   Úargs_cncÚ	TypeErrorÚ
dual_classr'   r   Ú__new__Úhilbert_spacer   r+   Úappendr   )Úclsr+   Úold_assumptionsrÄ   rÅ   Úket_exprÚbra_exprÚket_cÚketsÚbra_cÚbrasÚobjÚop_termsÚket_termÚbra_terms   &*,            r    rÊ   ÚOuterProduct.__new__�  s�  € ß@äˆt‹9˜Œ>ÜÐ<¼sÀ4»yÕHÓIÐIä˜$˜q�'“?ˆÜ˜$˜q�'“?ˆä�x¬3 ×0Ó0Ü˜8¬s ^×4Ó4Ø"×+Ñ+Ó-‰KˆEØ"×+Ñ+Ó-‰KˆEä�4‹y˜AŒ~¤Z°°Qµ¸×%AÒ%AÜð !,Ü.1°4©jõ!9ó :ð :ô �4‹y˜AŒ~¤Z°°Qµ¸×%AÒ%AÜð !,Ü.1°4©jõ!9ó :ð :ð ˜•7×%Ñ%Ó'¨4°­7×+<Ñ+<Ô<Ýà˜!•W×&Ô&¨¨Q­×(9Ó(9ð;óð ô —,’,˜sÐK d¨1¥g¨t°A­wÐ%7ÒK¸?ÑKˆCØ $ Q¥× 5Ñ 5ˆCÔÜ˜�Ñ(¨3Õ.Ð.àˆÜ�h¤×$Ò$¬°H¼c×)BÒ)BØ$ŸMœM�Ø (§¤�HØ—O‘O¤L°ñ %DØ3Bñ%Dö Eó !.ò *ô ˜¤#×&Ò&Ø$ŸMœM�Ø—‘¤¨Xñ !@Ø/>ñ!@ö Aò *ô ˜¤#×&Ò&Ø$ŸMœM�Ø—‘¤¨Xñ !@Ø/>ñ!@ö Aò *õ ãš8ð%óð ô
 �H‰~Ðr#   c                ó(   € V P                   ^ ,          # )z5Return the ket on the left side of the outer product.©r+   r   s   &r    rW   ÚOuterProduct.ketÈ  ó   € ð �y‰y˜�|Ðr#   c                ó(   € V P                   ^,          # )z6Return the bra on the right side of the outer product.rÛ   r   s   &r    r[   ÚOuterProduct.braÍ  rÝ   r#   c                óf   € \        \        V P                  4      \        V P                  4      4      # r&   )r   r   r[   rW   r   s   &r    r�   ÚOuterProduct._eval_adjointÒ  s!   € ÜœF 4§8¡8Ó,¬f°T·X±XÓ.>Ó?Ð?r#   c                óx   € VP                  V P                  4      VP                  V P                  4      ,           # r&   ©Ú_printrW   r[   r)   s   &&*r    Ú	_sympystrÚOuterProduct._sympystrÕ  s'   € Ø�~‰~˜dŸh™hÓ'¨'¯.©.¸¿¹Ó*BÕBÐBr#   c                ó¶   € V P                   P                  : R VP                  ! V P                  .VO5!  : RVP                  ! V P                  .VO5!  : R2# )r3   r$   r4   )r'   r(   rä   rW   r[   r)   s   &&*r    Ú
_sympyreprÚOuterProduct._sympyreprØ  sD   € Ø"Ÿn™n×5Ô5Ø�NŠN˜4Ÿ8™8Ð+ dÖ+¨W¯^ª^¸D¿H¹HÐ-LÀtÖ-LðNð 	Nr#   c                ó¦   € V P                   P                  ! V.VO5!  p\        VP                  V P                  P                  ! V.VO5!  4      !  # r&   )rW   Ú_prettyr   r=   r[   )r   r*   r+   rA   s   &&* r    rë   ÚOuterProduct._prettyÜ  sC   € Ø—‘× Ò  Ð0¨4Ó0ˆÜ˜5Ÿ;™; t§x¡x×'7Ò'7¸Ð'GÀ$Ó'GÓHÑIÐIr#   c                óŠ   € VP                   ! V P                  .VO5!  pVP                   ! V P                  .VO5!  pW4,           # r&   rã   )r   r*   r+   ÚkÚbs   &&*  r    Ú_latexÚOuterProduct._latexà  s7   € Ø�NŠN˜4Ÿ8™8Ð+ dÓ+ˆØ�NŠN˜4Ÿ8™8Ð+ dÓ+ˆØ�uˆr#   c                ó‚   € V P                   P                  ! R/ VB pV P                  P                  ! R/ VB pW#,          # )Nr   )rW   Ú
_representr[   )r   rO   rî   rï   s   &,  r    ró   ÚOuterProduct._representå  s7   € Ø�H‰H×ÒÑ* 'Ñ*ˆØ�H‰H×ÒÑ* 'Ñ*ˆØ�sˆ
r#   c                óP   € V P                   P                  ! V P                  3/ VB # r&   )rW   Ú_eval_tracer[   )r   Úkwargss   &,r    rö   ÚOuterProduct._eval_traceê  s"   € ð �x‰x×#Ò# D§H¡HÑ7°Ñ7Ð7r#   r   N)r(   ru   rv   rw   rx   Úis_commutativerÊ   rÁ   rW   r[   r�   rå   rè   rë   rð   ró   rö   r~   r   r€   s   @r    r   r   Y  sl   ø‡ € ñ3ðh €Nò6ðp ñó ðð ñó ðò@òCòNòJòò
÷
8ð 8r#   c                   ó|   a € ] tR tRt o Rt]R 4       t]R 4       t]R 4       t]R 4       t	R t
R tR	 tR
 tRtV tR# )r   iñ  a¯  An operator for representing the differential operator, i.e. d/dx

It is initialized by passing two arguments. The first is an arbitrary
expression that involves a function, such as ``Derivative(f(x), x)``. The
second is the function (e.g. ``f(x)``) which we are to replace with the
``Wavefunction`` that this ``DifferentialOperator`` is applied to.

Parameters
==========

expr : Expr
       The arbitrary expression which the appropriate Wavefunction is to be
       substituted into

func : Expr
       A function (e.g. f(x)) which is to be replaced with the appropriate
       Wavefunction when this DifferentialOperator is applied

Examples
========

You can define a completely arbitrary expression and specify where the
Wavefunction is to be substituted

>>> from sympy import Derivative, Function, Symbol
>>> from sympy.physics.quantum.operator import DifferentialOperator
>>> from sympy.physics.quantum.state import Wavefunction
>>> from sympy.physics.quantum.qapply import qapply
>>> f = Function('f')
>>> x = Symbol('x')
>>> d = DifferentialOperator(1/x*Derivative(f(x), x), f(x))
>>> w = Wavefunction(x**2, x)
>>> d.function
f(x)
>>> d.variables
(x,)
>>> qapply(d*w)
Wavefunction(2, x)

c                ó<   € V P                   R,          P                   # )a  
Returns the variables with which the function in the specified
arbitrary expression is evaluated

Examples
========

>>> from sympy.physics.quantum.operator import DifferentialOperator
>>> from sympy import Symbol, Function, Derivative
>>> x = Symbol('x')
>>> f = Function('f')
>>> d = DifferentialOperator(1/x*Derivative(f(x), x), f(x))
>>> d.variables
(x,)
>>> y = Symbol('y')
>>> d = DifferentialOperator(Derivative(f(x, y), x) +
...                          Derivative(f(x, y), y), f(x, y))
>>> d.variables
(x, y)
rj   rÛ   r   s   &r    Ú	variablesÚDifferentialOperator.variables  s   € ð. �y‰y˜�}×!Ñ!Ð!r#   c                ó(   € V P                   R,          # )aä  
Returns the function which is to be replaced with the Wavefunction

Examples
========

>>> from sympy.physics.quantum.operator import DifferentialOperator
>>> from sympy import Function, Symbol, Derivative
>>> x = Symbol('x')
>>> f = Function('f')
>>> d = DifferentialOperator(Derivative(f(x), x), f(x))
>>> d.function
f(x)
>>> y = Symbol('y')
>>> d = DifferentialOperator(Derivative(f(x, y), x) +
...                          Derivative(f(x, y), y), f(x, y))
>>> d.function
f(x, y)
rj   rÛ   r   s   &r    ÚfunctionÚDifferentialOperator.function4  s   € ð, �y‰y˜�}Ðr#   c                ó(   € V P                   ^ ,          # )a'  
Returns the arbitrary expression which is to have the Wavefunction
substituted into it

Examples
========

>>> from sympy.physics.quantum.operator import DifferentialOperator
>>> from sympy import Function, Symbol, Derivative
>>> x = Symbol('x')
>>> f = Function('f')
>>> d = DifferentialOperator(Derivative(f(x), x), f(x))
>>> d.expr
Derivative(f(x), x)
>>> y = Symbol('y')
>>> d = DifferentialOperator(Derivative(f(x, y), x) +
...                          Derivative(f(x, y), y), f(x, y))
>>> d.expr
Derivative(f(x, y), x) + Derivative(f(x, y), y)
rÛ   r   s   &r    ÚexprÚDifferentialOperator.exprL  s   € ð. �y‰y˜�|Ðr#   c                ó.   € V P                   P                  # )z,
Return the free symbols of the expression.
)r  Úfree_symbolsr   s   &r    r  Ú!DifferentialOperator.free_symbolse  s   € ð �y‰y×%Ñ%Ð%r#   c                óÖ   € ^ RI Hp V P                  pVP                  R,          pV P                  pV P
                  P                  Wa! V!  4      pVP                  4       pV! V.VO5!  # )r†   )ÚWavefunction:r2   NN)rÆ   r  rü   r+   rÿ   r  ÚsubsÚdoit)r   ÚfuncrO   r  ÚvarÚwf_varsÚfÚnew_exprs   &&,     r    Ú_apply_operator_WavefunctionÚ1DifferentialOperator._apply_operator_Wavefunctionm  sW   € Ý<Ø�n‰nˆØ—)‘)˜B•-ˆà�M‰MˆØ—9‘9—>‘> ! T¨3¡ZÓ0ˆØ—=‘=“?ˆá˜HÐ/ wÓ/Ð/r#   c                óf   € \        V P                  V4      p\        W P                  R,          4      # ri   )r   r  r   r+   )r   Úsymbolr  s   && r    Ú_eval_derivativeÚ%DifferentialOperator._eval_derivativex  s%   € Ü˜dŸi™i¨Ó0ˆÜ# H¯i©i¸­mÓ<Ð<r#   c                ó^   € V P                   ! V.VO5!  : R V P                  ! V.VO5!  : R2# )r3   r4   )r,   r7   r)   s   &&*r    rä   ÚDifferentialOperator._print€  s2   € à×%Ò% gÐ5°Ö5Ø×Ò˜gÐ-¨Ö-ð
ð 	
r#   c                óº   € V P                   ! V.VO5!  pV P                  ! V.VO5!  p\        VP                  R RR7      !  p\        VP	                  V4      !  pV# )r3   r4   r;   )r/   r>   r   r?   r=   r@   s   &&*  r    Ú_print_prettyÚ"DifferentialOperator._print_pretty†  sc   € Ø×0Ò0°Ð@¸4Ó@ˆØ×.Ò.¨wÐ>¸Ó>ˆÜ Ø×Ñ S°ÐÓ4ñ
ˆô ˜EŸK™K¨Ó4Ñ5ˆØˆr#   r   N)r(   ru   rv   rw   rx   rÁ   rü   rÿ   r  r  r  r  rä   r  r~   r   r€   s   @r    r   r   ñ  st   ø‡ € ñ'ðR ñ"ó ð"ð0 ñó ðð. ñó ðð0 ñ&ó ð&ò	0ò=ò
÷ð r#   N)r   r   r   r   r   r   )$rx   Útypingr   Úsympy.core.addr   Úsympy.core.exprr   Úsympy.core.functionr   r   Úsympy.core.mulr   Úsympy.core.numbersr	   rˆ   r   Ú sympy.printing.pretty.stringpictr   Úsympy.physics.quantum.daggerr   Úsympy.physics.quantum.kindr   Úsympy.physics.quantum.qexprr   r   Úsympy.matricesr   Úsympy.utilities.exceptionsr   Ú__all__r   r   r   r   r   r   r   r#   r    Ú<module>r(     sŽ   ðñ	õ å Ý  ß 4Ý Ý !Ý "Ý 7Ý /Ý 3ß >Ý Ý @ò€ôUˆuô Uôp$/˜ô $/ôN$�hô $ô.V�xô VôrU8�8ô U8ôp\˜8ö \r#   