+
    i                         ^ RI Ht ^ RIHt ^ RIHtHtHt ^ RIH	t	H
t
HtHtHtHtHtHt ^ RIHt ^ RIHt ]! ^^.^^..4      tR tR t]! R	4      tR
 tR t]! RRR./R7      tR tRtR tR tR t R# )    )randint)Integer)Matrixoneszeros)to_sympyto_numpyto_scipy_sparsematrix_tensor_productmatrix_to_zeromatrix_zerosnumpy_ndarrayscipy_sparse_matrix)import_module)skipc                  :    \        \        4      \        8X  g   Q hR # )N)r   m     j/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/quantum/tests/test_matrixutils.pytest_sympy_to_sympyr      s    A;!r   c                      \        \        4      \        8X  g   Q h\        \        ^ ^ .^ ^ ..4      4      \        ^ 4      8X  g   Q hR# )r   N)r   r   r   r   r   r   r   test_matrix_to_zeror      s>    !!!!&1a&1a&!123wqzAAAr   numpyc                      \         '       g   \        R 4       \         P                  ^^.^^..RR7      p \        \        4      V 8H  P                  4       '       g   Q hR# )numpy not installed.complexdtypeN)npr   arrayr	   r   all)results    r   test_to_numpyr$      sM    2#$XX1v1v&iX8FQK6!&&((((r   c                  ~   \         '       g   \        R 4       \        ^4      p \        ^4       F  p^V,          W&   K  	  \        ^4      p\        ^4       F  pWV&   K	  	  \        ^4      p\        ^4       F  pWV&   K	  	  \	        . RO4      p\         P                  V P                  4       4      p\         P                  VP                  4       4      p\         P                  WV4      pW.p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  We4      pW .p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  VP                  4       4      p\         P                  WV4      pW.p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  We4      pW0.p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  VP                  4       4      p\         P                  WV4      pW.p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  We4      pW@.p\        V!  p	VP                  4       V	P                  4       8X  g   Q h\         P                  P                  \        ^^4      \        ^^4      4      p
\         P                  P                  \        ^^4      \        ^^4      4      p\         P                  W4      p\	        V
P                  4       4      \	        VP                  4       4      .p\        V!  p	V	\	        VP                  4       4      ,
          P                  4       \        V	P                  V	P                  4      \        ,          P                  4       8  d   Q h\        WV4      p	\         P                  V \         P                  WB4      4      pVP                  4       V	P                  4       8X  g   Q hR# )r   N)         )r    r   r   ranger   r!   tolistkronr   randomrandr   r   rowscolsepsilon)l1il2l3vecnumpyl1numpyl2numpy_productargssympy_productrandom_matrix1random_matrix2s               r   test_matrix_tensor_productr=   $   sd   2#$	qB2Y1 	qB2Y1 	qB1X1 

C hhryy{#Ghhryy{#GGGG-M8D)40M!]%9%9%;;;;GGG-M8D)40M!]%9%9%;;;; hhryy{#GGGG-M8D)40M!]%9%9%;;;;GGG-M8D)40M!]%9%9%;;;; hhszz|$GGGG-M9D)40M!]%9%9%;;;;GGG-M9D)40M!]%9%9%;;;; YY^^GAqM71a=ANYY^^GAqM71a=ANGGN;M>((*+VN4I4I4K-LMD)40M}';';'= >>FFH	m  -"4"4	5g	=EEGH H H *"26MGGB 01M!]%9%9%;;;;r   scipyfromlistsparse)import_kwargsc                  F   \         '       g   \        R 4       \        '       g   \        R4       M\        P                  p X P	                  ^^.^^..RR7      p\         P
                  P                  \        \        4      V,
          P                  4       4      R8X  g   Q hR# )r   scipy not installed.r   r   g        N)
r    r   r>   r@   
csr_matrixlinalgnormr
   r   todense)r@   r#   s     r   test_to_scipy_sparserH   h   sw    2#$5#$AA/yAF99>>?1-6??ABcIIIr   gư>c                  R    \        ^^RR7      p \        V \        4      '       g   Q hR# )   sympyformatN)r   
isinstancer   )syms    r   test_matrix_zeros_sympyrP   v   s#    
q!G
,Cc6""""r   c                      \         '       g   \        R 4       \        ^^RR7      p \        V \        4      '       g   Q hR# )r   r   rL   N)r    r   r   rN   r   )nums    r   test_matrix_zeros_numpyrS   z   s1    2#$
q!G
,Cc=))))r   c                      \         '       g   \        R 4       \        '       g   \        R4       \        ^^RR7      p \	        V \
        4      '       g   Q hR# )r   rC   zscipy.sparserL   N)r    r   r>   r   rN   r   )scis    r   test_matrix_zeros_scipyrV      s@    2#$5#$
q!N
3Cc.////r   N)!sympy.core.randomr   sympy.core.numbersr   sympy.matrices.denser   r   r   !sympy.physics.quantum.matrixutilsr   r	   r
   r   r   r   r   r   sympy.externalr   sympy.testing.pytestr   r   r   r   r    r$   r=   r>   rH   r0   rP   rS   rV   r   r   r   <module>r]      s    % & 6 6  
 ) %
QFQFB 7)><B 	gj8*-EF	J #*0r   