+
    i                         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HtHt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# )zBosonic quantum operators.)Integer)S)	conjugate)exp)sqrt)Operator)HilbertSpace	FockSpaceKetBra)KroneckerDeltaBosonOpBosonFockKetBosonFockBraBosonCoherentKetBosonCoherentBrac                      a  ] tR t^t o Rt]R 4       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V tR# )r   a  A bosonic operator that satisfies [a, Dagger(a)] == 1.

Parameters
==========

name : str
    A string that labels the bosonic mode.

annihilation : bool
    A bool that indicates if the bosonic operator is an annihilation (True,
    default value) or creation operator (False)

Examples
========

>>> from sympy.physics.quantum import Dagger, Commutator
>>> from sympy.physics.quantum.boson import BosonOp
>>> a = BosonOp("a")
>>> Commutator(a, Dagger(a)).doit()
1
c                (    V P                   ^ ,          #     )argsselfs   &{/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/physics/quantum/boson.pynameBosonOp.name-   s    yy|    c                :    \        V P                  ^,          4      #    )boolr   r   s   &r   is_annihilationBosonOp.is_annihilation1   s    DIIaL!!r   c                    R# )a)r$   T r   s   &r   default_argsBosonOp.default_args5   s    r   c                   \        V4      R9   g   \        RV,          4      h\        V4      ^8X  d   V^ ,          \        P                  3p\        V4      ^8X  d   V^ ,          \	        V^,          4      3p\
        P                  ! V .VO5!  # )r   z"1 or 2 parameters expected, got %s)r      )len
ValueErrorr   Oner   r   __new__)clsr   hintss   &*,r   r-   BosonOp.__new__9   st    4yF"ADHIIt9>GQUU#Dt9>GWT!W-.D+d++r   c                    V P                   VP                   8X  d7   V P                  '       g#   VP                  '       d   \        P                  # R# R V9   d    VR ,          '       d   \        P                  # R# independentN)r   r!   r   NegativeOneZeror   otherr/   s   &&,r   _eval_commutator_BosonOp BosonOp._eval_commutator_BosonOpE   sX    99

"'''E,A,A,A}}$ 	 e#m(<(<66Mr   c                "    \         P                  # N)r   r5   r6   s   &&,r   _eval_commutator_FermionOp"BosonOp._eval_commutator_FermionOpQ   s    vvr   c                R    R V9   d    VR ,          '       d   ^V ,          V,          # R# r2   r%   r6   s   &&,r   _eval_anticommutator_BosonOp$BosonOp._eval_anticommutator_BosonOpT   s&    E!eM&:&:t8e##r   c                ^    \        \        V P                  4      V P                  '       * 4      # r;   )r   strr   r!   r   s   &r   _eval_adjointBosonOp._eval_adjoint[   s     s499~4+?+?'?@@r   c                    V P                   '       d   R \        V P                  4      ,          # R\        V P                  4      ,          # )z{%s}z{{%s}^\dagger}r!   rB   r   r   printerr   s   &&*r   _print_contents_latexBosonOp._print_contents_latex^   s4    S^++$s499~55r   c                    V P                   '       d   R \        V P                  4      ,          # R\        V P                  4      ,          # )z%sz
Dagger(%s)rF   rG   s   &&*r   _print_contentsBosonOp._print_contentsd   s4    3tyy>)) 3tyy>11r   c                    ^ RI Hp VP                  ! V P                  ^ ,          .VO5!  pV P                  '       d   V# WC! R4      ,          # )r   )
prettyFormu   †) sympy.printing.pretty.stringpictrO   _printr   r!   )r   rH   r   rO   pforms   &&*  r   _print_contents_prettyBosonOp._print_contents_prettyj   sA    ?tyy|3d3L*\222r   r%   N)__name__
__module____qualname____firstlineno____doc__propertyr   r!   classmethodr&   r-   r8   r<   r?   rC   rI   rL   rS   __static_attributes____classdictcell____classdict__s   @r   r   r      st     ,   " "  
,
A623 3r   c                   f   a  ] tR t^st o RtR t]R 4       t]R 4       t	]R 4       t
R tR tRtV tR	# )
r   zbFock state ket for a bosonic mode.

Parameters
==========

n : Number
    The Fock state number.

c                .    \         P                  ! W4      # r;   r
   r-   r.   ns   &&r   r-   BosonFockKet.__new__~       {{3""r   c                (    V P                   ^ ,          # r   labelr   s   &r   rd   BosonFockKet.n       zz!}r   c                    \         # r;   )r   r   s   &r   
dual_classBosonFockKet.dual_class       r   c                    \        4       # r;   r	   r.   ri   s   &&r   _eval_hilbert_space BosonFockKet._eval_hilbert_space   
    {r   c                B    \        V P                  VP                  4      # r;   )r   rd   r   brar/   s   &&,r   _eval_innerproduct_BosonFockBra,BosonFockKet._eval_innerproduct_BosonFockBra   s    dffcee,,r   c                   VP                   '       d7   \        V P                  4      \        V P                  ^,
          4      ,          # \        V P                  ^,           4      \        V P                  ^,           4      ,          # r   )r!   r   rd   r   r   opoptionss   &&,r   _apply_from_right_to_BosonOp)BosonFockKet._apply_from_right_to_BosonOp   sS    <,tvvz":::
#l466A:&>>>r   r%   N)rU   rV   rW   rX   rY   r-   rZ   rd   r[   rm   rs   ry   r   r\   r]   r^   s   @r   r   r   s   sZ     #      -? ?r   c                   Z   a  ] tR t^t o RtR t]R 4       t]R 4       t	]R 4       t
RtV tR# )r   zbFock state bra for a bosonic mode.

Parameters
==========

n : Number
    The Fock state number.

c                .    \         P                  ! W4      # r;   r   r-   rc   s   &&r   r-   BosonFockBra.__new__   rf   r   c                (    V P                   ^ ,          # r   rh   r   s   &r   rd   BosonFockBra.n   rk   r   c                    \         # r;   )r   r   s   &r   rm   BosonFockBra.dual_class   ro   r   c                    \        4       # r;   rq   rr   s   &&r   rs    BosonFockBra._eval_hilbert_space   ru   r   r%   N)rU   rV   rW   rX   rY   r-   rZ   rd   r[   rm   rs   r\   r]   r^   s   @r   r   r      sK     #      r   c                   f   a  ] tR t^t o RtR t]R 4       t]R 4       t	]R 4       t
R tR tRtV tR	# )
r   zCoherent state ket for a bosonic mode.

Parameters
==========

alpha : Number, Symbol
    The complex amplitude of the coherent state.

c                .    \         P                  ! W4      # r;   rb   r.   alphas   &&r   r-   BosonCoherentKet.__new__       {{3&&r   c                (    V P                   ^ ,          # r   rh   r   s   &r   r   BosonCoherentKet.alpha   rk   r   c                    \         # r;   )r   r   s   &r   rm   BosonCoherentKet.dual_class       r   c                    \        4       # r;   )r   rr   s   &&r   rs   $BosonCoherentKet._eval_hilbert_space   s
    ~r   c                X   V P                   VP                   8X  d   \        P                  # \        \	        V P                   4      ^,          \	        VP                   4      ^,          ,           ^\        VP                   4      ,          V P                   ,          ,
          ) ^,          4      # )r)   )r   r   r,   r   absr   rw   s   &&,r   #_eval_innerproduct_BosonCoherentBra4BosonCoherentKet._eval_innerproduct_BosonCoherentBra   sp    ::"55LTZZ!+c#))na.??!iPSPYPYFZBZ]a]g]gBgghijjkkr   c                P    VP                   '       d   V P                  V ,          # R # r;   r!   r   r|   s   &&,r   r   -BosonCoherentKet._apply_from_right_to_BosonOp   s     ::$$r   r%   N)rU   rV   rW   rX   rY   r-   rZ   r   r[   rm   rs   r   r   r\   r]   r^   s   @r   r   r      s[     '        l r   c                   P   a  ] tR t^t o RtR t]R 4       t]R 4       t	R t
RtV tR# )r   zCoherent state bra for a bosonic mode.

Parameters
==========

alpha : Number, Symbol
    The complex amplitude of the coherent state.

c                .    \         P                  ! W4      # r;   r   r   s   &&r   r-   BosonCoherentBra.__new__   r   r   c                (    V P                   ^ ,          # r   rh   r   s   &r   r   BosonCoherentBra.alpha   rk   r   c                    \         # r;   )r   r   s   &r   rm   BosonCoherentBra.dual_class   r   r   c                P    VP                   '       g   V P                  V ,          # R # r;   r   r|   s   &&,r   _apply_operator_BosonOp(BosonCoherentBra._apply_operator_BosonOp   s     !!!::$$r   r%   N)rU   rV   rW   rX   rY   r-   rZ   r   r[   rm   r   r\   r]   r^   s   @r   r   r      sA     '       r   N)r   r   r   r   r   )rY   sympy.core.numbersr   sympy.core.singletonr   $sympy.functions.elementary.complexesr   &sympy.functions.elementary.exponentialr   (sympy.functions.elementary.miscellaneousr   sympy.physics.quantumr   r   r	   r
   r   (sympy.functions.special.tensor_functionsr   __all__r   r   r   r   r   r%   r   r   <module>r      sk      & " : 6 9 * C C CZ3h Z3z!?3 !?H3 6$s $Ns r   