Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:language_reference:objects:matrix:functions:tooperator [2024/12/12 15:41] – created Maurits W. Haverkortdocumentation:language_reference:objects:matrix:functions:tooperator [2024/12/12 18:09] (current) Maurits W. Haverkort
Line 3: Line 3:
  
 ### ###
-alligned paragraph text+Matrix.Operator(M) creates an operator $O = \sum_{i,j} M[i][j] a^{\dagger}_{i-1} a_{j-1}^{\phantom{\dagger}}$ from the matrix $M$
 ### ###
  
 ===== Example ===== ===== Example =====
- 
-### 
-description text 
-### 
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- some example code+M = {{1,2*I}, 
 +    {-2*I,4}} 
 +  
 +O = Matrix.ToOperator(M) 
 +print(O)
 </code> </code>
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-text produced as output+Operator: Operator 
 +QComplex                  1 (Real==0 or Complex==1 or Mixed==2) 
 +MaxLength        =          2 (largest number of product of lader operators) 
 +NFermionic modes =          2 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) 
 +NBosonic modes            0 (Number of bosonic modes (phonon modes, ...) in the one particle basis) 
 + 
 +Operator of Length   2 
 +QComplex      =          1 (Real==0 or Complex==1) 
 +N                      4 (number of operators of length   2) 
 +C  0 A  0 |  1.00000000000000E+00  0.00000000000000E+00 
 +C  0 A  1 |  0.00000000000000E+00  2.00000000000000E+00 
 +C  1 A  0 | -0.00000000000000E+00 -2.00000000000000E+00 
 +C  1 A  1 |  4.00000000000000E+00  0.00000000000000E+00
 </file> </file>
  
Print/export