+
    iw                         R t ^ RIHt ^ RIHt ^ RIHt ^ RI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# )zFermionic quantum operators.)IntegerS)Operator)HilbertSpaceKetBra)KroneckerDelta	FermionOpFermionFockKetFermionFockBrac                      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R tRtV tR# )r
   a  A fermionic operator that satisfies {c, Dagger(c)} == 1.

Parameters
==========

name : str
    A string that labels the fermionic mode.

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

Examples
========

>>> from sympy.physics.quantum import Dagger, AntiCommutator
>>> from sympy.physics.quantum.fermion import FermionOp
>>> c = FermionOp("c")
>>> AntiCommutator(c, Dagger(c)).doit()
1
c                (    V P                   ^ ,          #     )argsselfs   &}/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/physics/quantum/fermion.pynameFermionOp.name'   s    yy|    c                :    \        V P                  ^,          4      #    )boolr   r   s   &r   is_annihilationFermionOp.is_annihilation+   s    DIIaL!!r   c                    R# )c)r   T r   s   &r   default_argsFermionOp.default_args/   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(   FermionOp.__new__3   st    4yF"ADHIIt9>GQUU#Dt9>GWT!W-.D+d++r   c                R    R V9   d    VR ,          '       d   \         P                  # R# independentNr   Zeror   otherr*   s   &&,r   _eval_commutator_FermionOp$FermionOp._eval_commutator_FermionOp?   s     E!eM&:&:66Mr   c                    V P                   VP                   8X  d7   V P                  '       g#   VP                  '       d   \        P                  # R# R V9   d    VR ,          '       d   ^V ,          V,          # R# r-   )r   r   r   r'   r1   s   &&,r   _eval_anticommutator_FermionOp(FermionOp._eval_anticommutator_FermionOpF   s]    99

"'''E,A,A,Auu 	 e#m(<(<t8e##r   c                "    ^V ,          V,          # )r$   r    r1   s   &&,r   _eval_anticommutator_BosonOp&FermionOp._eval_anticommutator_BosonOpR   s    4x%r   c                "    \         P                  # Nr/   r1   s   &&,r   _eval_commutator_BosonOp"FermionOp._eval_commutator_BosonOpV   s    vvr   c                ^    \        \        V P                  4      V P                  '       * 4      # r<   )r
   strr   r   r   s   &r   _eval_adjointFermionOp._eval_adjointY   s     TYYT-A-A)ABBr   c                    V P                   '       d   R \        V P                  4      ,          # R\        V P                  4      ,          # )z{%s}z{{%s}^\dagger}r   r@   r   r   printerr   s   &&*r   _print_contents_latexFermionOp._print_contents_latex\   s4    S^++$s499~55r   c                    V P                   '       d   R \        V P                  4      ,          # R\        V P                  4      ,          # )z%sz
Dagger(%s)rD   rE   s   &&*r   _print_contentsFermionOp._print_contentsb   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.stringpictrM   _printr   r   )r   rF   r   rM   pforms   &&*  r   _print_contents_pretty FermionOp._print_contents_prettyh   sA    ?tyy|3d3L*\222r   c                   ^ RI Hp V^ 8X  d   VP                  # V^8X  d   V # V^8  R8X  d   VP                  R8X  d   VP                  # V^ 8  R8X  g   VP                  R8X  d   \        R4      h\        P                  ! W4      # )r   r   TFzBFermionic operators can only be raised to a positive integer power)sympy.core.singletonr   r'   
is_integerr0   r&   r   _eval_power)r   expr   s   && r   rV   FermionOp._eval_powerp   s{    *!855LAXKAg$3>>T#966MAg$#..E"9 * + +##D..r   r    N)__name__
__module____qualname____firstlineno____doc__propertyr   r   classmethodr!   r(   r3   r6   r9   r=   rA   rG   rJ   rQ   rV   __static_attributes____classdictcell____classdict__s   @r   r
   r
      s~     *   " "  
,
 C623/ /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   zdFock state ket for a fermionic mode.

Parameters
==========

n : Number
    The Fock state number.

c                R    VR9  d   \        R4      h\        P                  ! W4      # r   zn must be 0 or 1)r   r   )r&   r   r(   r)   ns   &&r   r(   FermionFockKet.__new__   $    F?/00{{3""r   c                (    V P                   ^ ,          # r   labelr   s   &r   rh   FermionFockKet.n       zz!}r   c                    \         # r<   )r   r   s   &r   
dual_classFermionFockKet.dual_class       r   c                    \        4       # r<   )r   )r)   rm   s   &&r   _eval_hilbert_space"FermionFockKet._eval_hilbert_space   s
    ~r   c                B    \        V P                  VP                  4      # r<   )r	   rh   )r   brar*   s   &&,r   !_eval_innerproduct_FermionFockBra0FermionFockKet._eval_innerproduct_FermionFockBra   s    dffcee,,r   c                    VP                   '       d-   V P                  ^8X  d   \        ^ 4      # \        P                  # V P                  ^ 8X  d   \        ^4      # \        P                  # r   )r   rh   r   r   r0   )r   opoptionss   &&,r   _apply_from_right_to_FermionOp-FermionFockKet._apply_from_right_to_FermionOp   sL    vv{%a((vvvv{%a((vvr   r    N)rY   rZ   r[   r\   r]   r(   r^   rh   r_   rq   ru   ry   r~   r`   ra   rb   s   @r   r   r   }   sZ     #
      -
 
r   c                   J   a  ] tR t^t o RtR t]R 4       t]R 4       t	Rt
V tR# )r   zdFock state bra for a fermionic mode.

Parameters
==========

n : Number
    The Fock state number.

c                R    VR9  d   \        R4      h\        P                  ! W4      # rf   )r&   r   r(   rg   s   &&r   r(   FermionFockBra.__new__   rj   r   c                (    V P                   ^ ,          # r   rl   r   s   &r   rh   FermionFockBra.n   ro   r   c                    \         # r<   )r   r   s   &r   rq   FermionFockBra.dual_class   rs   r   r    N)rY   rZ   r[   r\   r]   r(   r^   rh   r_   rq   r`   ra   rb   s   @r   r   r      s7     #
    r   N)r
   r   r   )r]   sympy.core.numbersr   rT   r   sympy.physics.quantumr   r   r   r   (sympy.functions.special.tensor_functionsr	   __all__r
   r   r   r    r   r   <module>r      sI    " & " * 8 8 Cj/ j/X)S )XS r   