+
    i9                        ^ RI HtHt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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!H"t"H#t#H$t$H%t% ^ RI&H't'H(t(H)t) ^ RI*H+t+ ^ RI,H-t- ^ RIH.t. ]! ^].]) ^..4      t/]! ^^.^^..4      t0]! ^.]..4      t1 ! R R]4      t2 ! R R]4      t3 ! R R]4      t4 ! R R]4      t5]2! R4      t6]3! R4      t7]4! R4      t8]5! R4      t9]7]! ]14      3]! ]74      ]13]6]13]! ]64      ]! ]14      3]8]/3]! ]84      ]! ]/4      3]! ]6]74      ]1]1Pt                  ,          3]! ]8]94      ]! ]/]04      3]8^,          ]/^,          3]8]9,          ^]8,          ,           ]/]0,          ^]/,          ,           3]! ]8]94      ]/]0,          ]0]/,          ,
          3]! ]8]94      ]/]0,          ]0]/,          ,           3]! ]7]64      ]1Pt                  ]1,          ^ ,          3.t;R t<R t=]! R 4      t>R! t?R" t@]! R#R$R%./R&7      tAR' tBR( tC]'! R)4      tD])! R)4      tE](! R*4      tFR+ tGR, tHR- tIR.# )/    )FloatIInteger)Matrix)import_module)skip)Dagger)	representrep_innerproductrep_expectationenumerate_states)BraKet)OperatorOuterProduct)TensorProduct)matrix_tensor_product)
Commutator)AntiCommutator)InnerProduct)numpy_ndarrayscipy_sparse_matrixto_numpyto_scipy_sparseto_sympy)XKetXOpXBra)qapply)operators_to_state)raisesc                   <   a  ] tR t^t o ]R 4       tR tR tRtV t	R# )AKetc                    \         # N)ABraselfs   &h/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/quantum/tests/test_represent.py
dual_classAKet.dual_class           c                &    V P                   ! R/ VB # Nr%   _represent_AOpr(   optionss   &,r)   _represent_default_basisAKet._represent_default_basis#       ""3733r-   c                    \         # r%   )Avecr(   basisr3   s   &&,r)   r1   AKet._represent_AOp&       r-    N)
__name__
__module____qualname____firstlineno__classmethodr*   r4   r1   __static_attributes____classdictcell____classdict__s   @r)   r#   r#      s&      4 r-   r#   c                   0   a  ] tR t^*t o ]R 4       tRtV tR# )r&   c                    \         # r%   )r#   r'   s   &r)   r*   ABra.dual_class,   r,   r-   r=   N)r>   r?   r@   rA   rB   r*   rC   rD   rE   s   @r)   r&   r&   *   s      r-   r&   c                   ,   a  ] tR t^1t o R tR tRtV tR# )AOpc                &    V P                   ! R/ VB # r/   r0   r2   s   &,r)   r4   AOp._represent_default_basis3   r6   r-   c                    \         # r%   )Amatr9   s   &&,r)   r1   AOp._represent_AOp6   r<   r-   r=   Nr>   r?   r@   rA   r4   r1   rC   rD   rE   s   @r)   rK   rK   1        4 r-   rK   c                   ,   a  ] tR t^:t o R tR tRtV tR# )BOpc                &    V P                   ! R/ VB # r/   r0   r2   s   &,r)   r4   BOp._represent_default_basis<   r6   r-   c                    \         # r%   )Bmatr9   s   &&,r)   r1   BOp._represent_AOp?   r<   r-   r=   NrQ   rE   s   @r)   rT   rT   :   rR   r-   rT   aABc                      \          F6  p \        V ^ ,          \        RR7      p\        V ^,          4      pW8X  d   K6  Q h	  R# )r   sympyr:   formatN)_testsr
   r[   r   testlhsrhss      r)   test_format_sympyrf   c   s6    Qq9tAwzz r-   c                      \        \        ^4      4      \        ^4      8X  g   Q h\        \        R4      4      \        R4      8X  g   Q h\        R\        ,           4      R\        ,           8X  g   Q hR# )         ?N)r
   r   r   r   r=   r-   r)   test_scalar_sympyrj   j   sS    WQZ GAJ...U3Z E#J...S1Wq(((r-   numpyc                     \         '       g   \        R 4       \         Fh  p \        V ^ ,          \        RR7      p\        V ^,          4      p\        V\        4      '       d   W8H  P                  4       '       g   Q hK`  W8X  d   Kh  Q h	  R# )numpy not installed.rk   r_   N)	npr   ra   r
   r[   r   
isinstancer   allrb   s      r)   test_format_numpyrq   s   sh    2#$Qq9tAwc=))J##%%%%:: r-   c                      \         '       g   \        R 4       \        \        ^4      RR7      ^8X  g   Q h\        \	        R4      RR7      R8X  g   Q h\        R\
        ,           RR7      R8X  g   Q hR# )rm   rk   r`   ri   N      ?      ?)rn   r   r
   r   r   r   r=   r-   r)   test_scalar_numpyru      s[    2#$WQZ0A555U3Z0C777S1WW-;;;r-   scipyfromlistsparse)import_kwargsc                     \         '       g   \        R 4       \        '       g   \        R4       \         F  p \	        V ^ ,          \
        RR7      p\        V ^,          4      p\        V\        4      '       d=   \         P                  P                  W,
          P                  4       4      R8X  g   Q hK  W8X  d   K  Q h	  R# )rm   scipy not installed.scipy.sparser_   g        N)rn   r   rv   ra   r
   r[   r   ro   r   linalgnormtodenserb   s      r)   test_format_scipy_sparser      s    2#$5#$Qq@d1g&c.//99>>39"5"5"78C???:: r-   c                     \         '       g   \        R 4       \        '       g   \        R4       \        \	        ^4      RR7      ^8X  g   Q h\        \        R4      RR7      R8X  g   Q h\        R\        ,           RR7      R8X  g   Q hR# )rm   r{   r|   rs   ri   Nrt   )rn   r   rv   r
   r   r   r   r=   r-   r)   test_scalar_scipy_sparser      si    2#$5#$WQZ71<<<U3Z73>>>S1W^4
BBBr-   xXc                     \        \        4      \        \        R 4      \        4      P	                  4       8X  g   Q h\        \
        4      \        \
        \        R 4      4      P	                  4       8X  g   Q h\        \        R 4       R# )x_1c                       \        \        4      # r%   )r   x_opr=   r-   r)   <lambda>*test_innerprod_represent.<locals>.<lambda>   s
    .t4r-   N)	r   x_ketr   r   doitx_brar   r!   	TypeErrorr=   r-   r)   test_innerprod_representr      s[    E"l4;&F&K&K&MMMME"l5$u+&F&K&K&MMMM
945r-   c                      \        \        \        4      ^^4      p \        \        4      \	        V ^,          P
                  \        ,          V ^ ,          ,          4      8X  g   Q hR# )rh   N)r   r    r   r   r   dual)
basis_ketss    r)   test_operator_representr      sP    !"4T":AqAJ
1**4/
1=>? ? ?r-   c                      \        R 4      p \        V ^^4      \        R4      .8X  g   Q h\        V . RO4      \        R4      \        R4      \        R4      .8X  g   Q hR# )foofoo_1foo_2foo_4N)rh         )r   r   )rc   s    r)   test_enumerate_statesr      s]    ;DD!Q'DM?:::i!']DM4=IJ J Jr-   N)Jsympy.core.numbersr   r   r   sympy.matrices.denser   sympy.externalr   sympy.testing.pytestr   sympy.physics.quantum.daggerr	   sympy.physics.quantum.representr
   r   r   r   sympy.physics.quantum.stater   r   sympy.physics.quantum.operatorr   r   #sympy.physics.quantum.tensorproductr   r    sympy.physics.quantum.commutatorr   $sympy.physics.quantum.anticommutatorr   "sympy.physics.quantum.innerproductr   !sympy.physics.quantum.matrixutilsr   r   r   r   r   sympy.physics.quantum.cartesianr   r   r   sympy.physics.quantum.qapplyr   !sympy.physics.quantum.operatorsetr    r!   rO   rX   r8   r#   r&   rK   rT   kbr[   r\   Hra   rf   rj   rn   rq   ru   rv   r   r   r   r   r   r   r   r   r=   r-   r)   <module>r      s[   2 2 ' ( % /P P 0 A = E 7 ? ;J J < ; / @ '1vAw 1v1vsQCj
3 
3 ( (  	IIHH tAYIAYtIAYt!Qdff%1a/d;<T47OqS1Q3YT	AdF"#1tDy49,-Aq49tDy01!Q$&&+q)*/
6) 7
< 	gj8*-EFC 	S	S	
3x6?Jr-   